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; }
obdaModelForMaterialization.getOntologyVocabulary().merge(tbox.getVocabulary());
obdaModelForMaterialization.getOntologyVocabulary().merge(translatedOntologyMerge.getVocabulary());
obdaModel.getOntologyVocabulary().merge(ontology.getVocabulary());
obdaModel.addSource(getMemOBDADataSource("MemH2")); obdaModel.getOntologyVocabulary().merge(tbox.getVocabulary());