Search in sources :

Example 1 with AbstractAttributeType

use of ddf.catalog.transformer.xml.binding.AbstractAttributeType in project ddf by codice.

the class AttributeAdapter method marshal.

@Override
public AbstractAttributeType marshal(Attribute attribute) throws CatalogTransformerException {
    if (attribute == null) {
        return null;
    }
    AbstractAttributeType element = null;
    AttributeDescriptor descriptor = metacardType.getAttributeDescriptor(attribute.getName());
    if (descriptor == null || Metacard.ID.equals(descriptor.getName()) || descriptor.getType() == null) {
        return null;
    }
    element = convertAttribute(attribute, descriptor.getType().getAttributeFormat());
    return element;
}
Also used : AbstractAttributeType(ddf.catalog.transformer.xml.binding.AbstractAttributeType) AttributeDescriptor(ddf.catalog.data.AttributeDescriptor)

Aggregations

AttributeDescriptor (ddf.catalog.data.AttributeDescriptor)1 AbstractAttributeType (ddf.catalog.transformer.xml.binding.AbstractAttributeType)1