private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
public void visit(OWLDataPropertyAssertionAxiom axiom) { if (!axiom.getSubject().isAnonymous()) { axiom.getSubject().asOWLNamedIndividual().accept(this); } }
public void visit(OWLDifferentIndividualsAxiom axiom) { for (OWLIndividual ind : axiom.getIndividuals()) { if (!ind.isAnonymous()) { ind.asOWLNamedIndividual().accept(this); } } }
@Override public OWLAxiom visit(OWLClassAssertionAxiom axiom) { if (axiom.getClassExpression().isAnonymous()) { return df.getOWLClassAssertionAxiom(axiom.getClassExpression().accept(classVisitor), axiom.getIndividual()); } return axiom; }
@Override public void visit(OWLClassAssertionAxiom axiom) { if (!axiom.getClassExpression().isAnonymous()) { source = axiom.getIndividual().asOWLNamedIndividual(); target = axiom.getClassExpression().asOWLClass(); } }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { OWLClassExpression sub = dataFactory .getOWLDataSomeValuesFrom(axiom.getProperty(), dataFactory .getTopDatatype()); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, axiom.getDomain()); ax.accept(this); }
@Override public void visit(OWLObjectPropertyDomainAxiom axiom) { // prop some Thing subclassOf domain OWLClassExpression sub = dataFactory .getOWLObjectSomeValuesFrom(axiom.getProperty(), dataFactory.getOWLThing()); OWLSubClassOfAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, axiom.getDomain()); ax.accept(this); }
@Override public OWLAxiom visit(OWLSubClassOfAxiom axiom) { return df.getOWLSubClassOfAxiom(axiom.getSubClass().accept(classVisitor), axiom.getSuperClass().accept(classVisitor)); }
@Override public OWLClassExpression visit(OWLObjectSomeValuesFrom ce) { OWLClassExpression filler = ce.getFiller().accept(this); if (negated) { return df.getOWLObjectAllValuesFrom(ce.getProperty(), filler); } return df.getOWLObjectSomeValuesFrom(ce.getProperty(), filler); }
@Override public OWLClassExpression visit(OWLObjectMinCardinality ce) { OWLClassExpression filler = ce.getFiller().accept(this); return df.getOWLObjectMinCardinality(ce.getCardinality(), ce.getProperty(), filler); }
static OWLAxiom create(OWLDataFactory d, OWLIndividual s, OWLAnnotation o, Collection<OWLAnnotation> anns) { if (s.isAnonymous()) { return d.getOWLAnnotationAssertionAxiom(s.asOWLAnonymousIndividual(), o, anns); } else { return d.getOWLAnnotationAssertionAxiom(s.asOWLNamedIndividual().getIRI(), o, anns); } }
@Override public OWLAxiom visit(OWLObjectPropertyDomainAxiom axiom) { return df.getOWLObjectPropertyDomainAxiom(axiom.getProperty(), axiom.getDomain().accept(classVisitor)); }
@Override public OWLAxiom visit(OWLObjectPropertyRangeAxiom axiom) { return df.getOWLObjectPropertyRangeAxiom(axiom.getProperty(), axiom.getRange().accept(classVisitor)); }
@Override public OWLClassExpression visit(OWLDataMaxCardinality ce) { int card = ce.getCardinality(); OWLDataRange filler = ce.getFiller().accept(rangeVisitor); return df.getOWLDataMaxCardinality(card, ce.getProperty(), filler); }
public void visit(OWLClassAssertionAxiom axiom) { if (!axiom.getIndividual().isAnonymous()) { axiom.getIndividual().asOWLNamedIndividual().accept(this); } }
@Override public OWLAxiom visit(OWLDataPropertyRangeAxiom axiom) { return df.getOWLDataPropertyRangeAxiom(axiom.getProperty(), axiom.getRange().accept(dataVisitor)); }
@Override public OWLClassExpression visit(OWLDataSomeValuesFrom ce) { OWLDataRange filler = ce.getFiller().accept(rangeVisitor); return df.getOWLDataSomeValuesFrom(ce.getProperty(), filler); }
public void visit(OWLNegativeDataPropertyAssertionAxiom axiom) { if (!axiom.getSubject().isAnonymous()) { axiom.getSubject().asOWLNamedIndividual().accept(this); } }
/** * @param e exception * @param importsDeclaration imports declaration */ public UnloadableImportException(OWLOntologyCreationException e, OWLImportsDeclaration importsDeclaration) { super("Could not load imported ontology: " + importsDeclaration.getIRI().toQuotedString() + " Cause: " + e.getMessage(), e); this.importsDeclaration = importsDeclaration; ontologyCreationException = e; }
private boolean datatypesMightHaveChanged(List<? extends OWLOntologyChange> changes) { for (OWLOntologyChange change : changes) { if (change instanceof OWLAxiomChange) { for (OWLEntity e : change.getAxiom().getSignature()) { if (e instanceof OWLDatatype && !e.isBuiltIn()) { return true; } } } } return false; }