public static OntModel createOntModelWithPellet(OntModel base) {
return ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC, base);
}
private static void addDefaultEntriesTo(OntModel ontModel) {
OntDocumentManager documentManager = ontModel.getDocumentManager();
try {
String dir = EvolizerOntologyPlugin.getDefault().getAbsoluteFSPath(ONTOLOGY_DIR);
// Sem. Web defaults
documentManager.addAltEntry(RDF.BASE, "file:" + dir + RDF.LOCAL);
documentManager.addAltEntry(RDFS.BASE, "file:" + dir + RDFS.LOCAL);
documentManager.addAltEntry(OWL.BASE, "file:" + dir + OWL.LOCAL);
documentManager.addAltEntry(DCES.BASE, "file:" + dir + DCES.LOCAL);
// Seon defaults
documentManager.addAltEntry(SeonRelations.BASE, "file:" + dir + SeonRelations.LOCAL);
} catch (IOException e) {
throw new EvolizerRuntimeException("Error while resolving ontology directory.", e); // TODO own exception?
}
}