Search in sources :

Example 1 with PropertyCollectionType

use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyCollectionType in project hale by halestudio.

the class OmlRdfGenerator method getPropertyCollection.

/**
 * Translate the list of the OML Properties To the Jaxb-based
 * PropertyCollectionType
 *
 * @param collection
 * @return
 */
private PropertyCollectionType getPropertyCollection(List<Property> collection) {
    PropertyCollectionType propCollectionType = new PropertyCollectionType();
    if (collection != null) {
        Iterator<?> iterator = collection.iterator();
        while (iterator.hasNext()) {
            // get property from a list
            Property property = (Property) iterator.next();
            // convert property to the property type
            // TODO could be the circular dependencies in case of
            // ComposedProperty
            PropertyType pType = getPropertyType(property);
            // add to the collection
            Item item = new Item();
            item.setProperty(pType);
            propCollectionType.getItem().add(item);
        }
    }
    return propCollectionType;
}
Also used : Item(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyCollectionType.Item) PropertyCollectionType(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyCollectionType) PropertyType(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyType) ComposedProperty(eu.esdihumboldt.hale.io.oml.internal.goml.omwg.ComposedProperty) Property(eu.esdihumboldt.hale.io.oml.internal.goml.omwg.Property)

Aggregations

ComposedProperty (eu.esdihumboldt.hale.io.oml.internal.goml.omwg.ComposedProperty)1 Property (eu.esdihumboldt.hale.io.oml.internal.goml.omwg.Property)1 PropertyCollectionType (eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyCollectionType)1 Item (eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyCollectionType.Item)1 PropertyType (eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.PropertyType)1