use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.DomainRestrictionType in project hale by halestudio.
the class OmlRdfGenerator method getDomainRestrictionTypes.
/**
* converts from the list of the FeatureClass to the collection of the
* FeatureClass
*
* @param domainRestriction
* @return
*/
private Collection<? extends DomainRestrictionType> getDomainRestrictionTypes(List<FeatureClass> features) {
if (features != null) {
ArrayList<DomainRestrictionType> drTypes = new ArrayList<DomainRestrictionType>(features.size());
DomainRestrictionType drType;
FeatureClass feature;
Iterator<?> iterator = features.iterator();
while (iterator.hasNext()) {
feature = (FeatureClass) iterator.next();
drType = getDomainRestrictionType(feature);
drTypes.add(drType);
}
return drTypes;
}
return new ArrayList<DomainRestrictionType>();
}
use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.DomainRestrictionType in project hale by halestudio.
the class OmlRdfReader method getDomainRestriction.
/**
* Converts from the List of DomainRestrictionType to the List of the
* FeatureClass
*
* @param domainRestriction
* @return
*/
private List<FeatureClass> getDomainRestriction(// TODO discuss the propertytype-field
List<DomainRestrictionType> domainRestriction) {
List<FeatureClass> classes = new ArrayList<FeatureClass>(domainRestriction.size());
DomainRestrictionType restriction = null;
FeatureClass fClass;
ClassType clazz;
Iterator<DomainRestrictionType> iterator = domainRestriction.iterator();
while (iterator.hasNext()) {
restriction = iterator.next();
clazz = restriction.getClazz();
fClass = new FeatureClass(null);
// set about
About fAbout = new About(java.util.UUID.randomUUID());
if (clazz.getAbout() != null) {
fAbout.setAbout(clazz.getAbout());
}
fClass.setAbout(fAbout);
// set attributeValueCondition list
if (clazz.getAttributeValueCondition() != null) {
fClass.setAttributeValueCondition(getRestrictions(clazz.getAttributeValueCondition()));
}
// set attributeTypeCondition list
if (clazz.getAttributeTypeCondition() != null) {
fClass.setAttributeTypeCondition(getRestrictions(clazz.getAttributeTypeCondition()));
}
// set attributeOccurenceCondition
if (clazz.getAttributeOccurenceCondition() != null) {
fClass.setAttributeOccurenceCondition(getRestrictions(clazz.getAttributeOccurenceCondition()));
}
classes.add(fClass);
}
return classes;
}
use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.DomainRestrictionType in project hale by halestudio.
the class OmlRdfGenerator method getDomainRestrictionType.
/**
* Converts from OML FeatureClass to the JAXB generated
* DomainRestrictionType
*
* @param feature
* @return
*/
private DomainRestrictionType getDomainRestrictionType(FeatureClass feature) {
DomainRestrictionType drType = new DomainRestrictionType();
// set one property in case of the PropertyQualifier only
drType.setClazz(getClassType(feature));
return drType;
}
Aggregations