protected void addImport(OWLOntologyManager man, OWLImportsDeclaration i) { man.applyChange(new AddImport(consumer.getOntology(), i)); }
protected void addOntAnn(OWLOntologyManager man, OWLAnnotation ann) { man.applyChange(new AddOntologyAnnotation(consumer.getOntology(), ann)); }
protected void addImport(OWLOntologyManager man, OWLImportsDeclaration i) { man.applyChange(new AddImport(consumer.getOntology(), i)); }
protected void addOntAnn(OWLOntologyManager man, OWLAnnotation ann) { man.applyChange(new AddOntologyAnnotation(consumer.getOntology(), ann)); }
protected void addImport(OWLOntologyManager man, OWLImportsDeclaration i) { man.applyChange(new AddImport(consumer.getOntology(), i)); }
protected void addImport(OWLOntologyManager man, OWLImportsDeclaration i) { man.applyChange(new AddImport(consumer.getOntology(), i)); }
protected void addOntAnn(OWLOntologyManager man, OWLAnnotation ann) { man.applyChange(new AddOntologyAnnotation(consumer.getOntology(), ann)); }
protected void addOntAnn(OWLOntologyManager man, OWLAnnotation ann) { man.applyChange(new AddOntologyAnnotation(consumer.getOntology(), ann)); }
OWLOntology ontology = consumer.getOntology(); OWLAxiom result = null; if (ontology.getAxiomCount() == 1) {
protected void handleImportingRDFGraphRatherThanOntology(OWLImportsDeclaration id, OWLOntologyManager man, @Nullable OWLOntology io) { if (io != null) { OWLDocumentFormat importedOntologyFormat = io.getFormat(); if (importedOntologyFormat instanceof AbstractRDFPrefixDocumentFormat && io.isAnonymous() && consumer.getConfiguration() .getMissingOntologyHeaderStrategy() == INCLUDE_GRAPH) { // We should have just included the triples rather // than imported them. So, // we remove the imports statement, add the axioms // from the imported ontology to // out importing ontology and remove the imported // ontology. // WHO EVER THOUGHT THAT THIS WAS A GOOD IDEA? man.applyChange(new RemoveImport(consumer.getOntology(), id)); io.importsDeclarations().forEach(d -> addImport(man, d)); io.annotations().forEach(ann -> addOntAnn(man, ann)); io.axioms().forEach(this::add); man.removeOntology(io); } } } }
protected void handleImportingRDFGraphRatherThanOntology(OWLImportsDeclaration id, OWLOntologyManager man, @Nullable OWLOntology io) { if (io != null) { OWLDocumentFormat importedOntologyFormat = io.getFormat(); if (importedOntologyFormat instanceof AbstractRDFPrefixDocumentFormat && io.isAnonymous() && consumer.getConfiguration() .getMissingOntologyHeaderStrategy() == INCLUDE_GRAPH) { // We should have just included the triples rather // than imported them. So, // we remove the imports statement, add the axioms // from the imported ontology to // out importing ontology and remove the imported // ontology. // WHO EVER THOUGHT THAT THIS WAS A GOOD IDEA? man.applyChange(new RemoveImport(consumer.getOntology(), id)); io.importsDeclarations().forEach(d -> addImport(man, d)); io.annotations().forEach(ann -> addOntAnn(man, ann)); io.axioms().forEach(this::add); man.removeOntology(io); } } } }
protected void handleImportingRDFGraphRatherThanOntology(OWLImportsDeclaration id, OWLOntologyManager man, @Nullable OWLOntology io) { if (io != null) { OWLDocumentFormat importedOntologyFormat = io.getFormat(); if (importedOntologyFormat instanceof AbstractRDFPrefixDocumentFormat && io.isAnonymous() && consumer.getConfiguration() .getMissingOntologyHeaderStrategy() == INCLUDE_GRAPH) { // We should have just included the triples rather // than imported them. So, // we remove the imports statement, add the axioms // from the imported ontology to // out importing ontology and remove the imported // ontology. // WHO EVER THOUGHT THAT THIS WAS A GOOD IDEA? man.applyChange(new RemoveImport(consumer.getOntology(), id)); io.importsDeclarations().forEach(d -> addImport(man, d)); io.annotations().forEach(ann -> addOntAnn(man, ann)); io.axioms().forEach(this::add); man.removeOntology(io); } } } }
protected void handleImportingRDFGraphRatherThanOntology(OWLImportsDeclaration id, OWLOntologyManager man, @Nullable OWLOntology io) { if (io != null) { OWLDocumentFormat importedOntologyFormat = io.getFormat(); if (importedOntologyFormat instanceof AbstractRDFPrefixDocumentFormat && io.isAnonymous() && consumer.getConfiguration() .getMissingOntologyHeaderStrategy() == INCLUDE_GRAPH) { // We should have just included the triples rather // than imported them. So, // we remove the imports statement, add the axioms // from the imported ontology to // out importing ontology and remove the imported // ontology. // WHO EVER THOUGHT THAT THIS WAS A GOOD IDEA? man.applyChange(new RemoveImport(consumer.getOntology(), id)); io.importsDeclarations().forEach(d -> addImport(man, d)); io.annotations().forEach(ann -> addOntAnn(man, ann)); io.axioms().forEach(this::add); man.removeOntology(io); } } } }