use of eu.esdihumboldt.hale.io.oml.internal.model.align.ISchema in project hale by halestudio.
the class OmlRdfReader method getSchema.
/**
* converts from JAXB Ontology {@link OntologyType} to OML schema
* {@link ISchema}
*
* @param onto Ontology
* @return schema
*/
private ISchema getSchema(OntologyType onto) {
// creates formalism
// create Formalism
Formalism formalism = null;
if (onto.getFormalism() != null) {
formalism = getFormalism(onto.getFormalism());
}
ISchema schema = new Schema(onto.getLocation(), formalism);
// set about
IAbout about = new About(UUID.randomUUID());
if (onto.getAbout() != null) {
((About) about).setAbout(onto.getAbout());
}
((Schema) schema).setAbout(about);
// set labels
if (onto.getLabel() != null) {
((Schema) schema).getLabels().addAll(onto.getLabel());
}
return schema;
}
Aggregations