use of org.semanticweb.owlapi.model.ImportChange in project goci by EBISPOT.
the class DefaultGWASOWLConverter method createConversionOntology.
public OWLOntology createConversionOntology() throws OWLConversionException {
try {
// create a new graph to represent our data dump
OWLOntology conversion = getManager().createOntology(IRI.create(OntologyConstants.GWAS_ONTOLOGY_BASE_IRI + "/" + new SimpleDateFormat("yyyy/MM/dd").format(new Date())));
// import the gwas ontology schema and efo
OWLImportsDeclaration gwasImportDecl = getDataFactory().getOWLImportsDeclaration(IRI.create(OntologyConstants.GWAS_ONTOLOGY_SCHEMA_IRI));
ImportChange gwasImport = new AddImport(conversion, gwasImportDecl);
getManager().applyChange(gwasImport);
OWLImportsDeclaration efoImportDecl = getDataFactory().getOWLImportsDeclaration(IRI.create(OntologyConstants.EFO_ONTOLOGY_SCHEMA_IRI));
ImportChange efoImport = new AddImport(conversion, efoImportDecl);
getManager().applyChange(efoImport);
return conversion;
} catch (OWLOntologyCreationException e) {
throw new OWLConversionException("Failed to create new ontology", e);
}
}
Aggregations