public Ontology getOntology() { return ofac.createOntology(vb); }
public QuestDBClassicStore(String name, String tboxFile, QuestPreferences config) throws Exception { super(name); Ontology tbox = null; if (tboxFile == null) { OntologyVocabulary voc = ofac.createVocabulary(); tbox = ofac.createOntology(voc); } else { tbox = readOntology(tboxFile); } setup(tbox, config); }
private Ontology getTBox(Dataset dataset) throws Exception { // Merge default and named graphs to filter duplicates Set<URI> graphURIs = new HashSet<>(); graphURIs.addAll(dataset.getDefaultGraphs()); graphURIs.addAll(dataset.getNamedGraphs()); OntologyVocabulary vb = ofac.createVocabulary(); for (URI graphURI : graphURIs) { Ontology o = getOntology(graphURI, graphURI); vb.merge(o.getVocabulary()); // TODO: restore copying ontology axioms (it was copying from result into result, at least since July 2013) //for (SubPropertyOfAxiom ax : result.getSubPropertyAxioms()) // result.add(ax); //for (SubClassOfAxiom ax : result.getSubClassAxioms()) // result.add(ax); } Ontology result = ofac.createOntology(vb); return result; }
tbox = OntologyFactoryImpl.getInstance().createOntology(voc); if (obdaModel.getSources().size() == 0) obdaModel.addSource(getMemOBDADataSource("MemH2"));