use of eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IValueClass in project hale by halestudio.
the class OmlRdfGenerator method getValueClasses.
/**
* Converts from list of the OML Classes to the list of the JAXB generated
* classes
*
* @param valueClasses
* @return
*/
private List<ValueClassType> getValueClasses(List<IValueClass> valueClasses) {
List<ValueClassType> vcTypes = new ArrayList<ValueClassType>();
if (valueClasses != null) {
ValueClassType vcType = new ValueClassType();
IValueClass vClass;
Iterator<IValueClass> iterator = valueClasses.iterator();
while (iterator.hasNext()) {
vClass = iterator.next();
if (vClass.getAbout() != null) {
vcType.setAbout(vClass.getAbout());
}
if (vClass.getResource() != null) {
vcType.setResource(vClass.getResource());
}
if (vClass.getValue() != null) {
vcType.getValue().addAll(getValueExpressionTypes(vClass.getValue()));
}
vcTypes.add(vcType);
}
}
return vcTypes;
}
use of eu.esdihumboldt.hale.io.oml.internal.model.align.ext.IValueClass in project hale by halestudio.
the class OmlRdfReader method getValueClass.
/**
* Converts from List of JAXB Value Class objects to the list of the OML
* objects
*
* @param valueClass
* @return
*/
private List<IValueClass> getValueClass(List<ValueClassType> valueClass) {
List<IValueClass> oValueClasses = new ArrayList<IValueClass>();
IValueClass oValueClass = new ValueClass();
Iterator<ValueClassType> iterator = valueClass.iterator();
ValueClassType vcType;
while (iterator.hasNext()) {
vcType = iterator.next();
// set about
if (vcType.getAbout() != null) {
((ValueClass) oValueClass).setAbout(vcType.getAbout());
}
// set resource
if (vcType.getResource() != null) {
((ValueClass) oValueClass).setResource(vcType.getResource());
}
// setValueExpression
if (vcType.getValue() != null) {
((ValueClass) oValueClass).setValue(getValueExpression(vcType.getValue()));
}
oValueClasses.add(oValueClass);
}
return oValueClasses;
}
Aggregations