@Override public DataPropertyAssertion createDataPropertyAssertion(String dp, ObjectConstant o, ValueConstant v) throws InconsistentOntologyException { return OntologyBuilderImpl.createDataPropertyAssertion(new DataPropertyExpressionImpl(dp), o, v); } };
@Override public ObjectPropertyAssertion createObjectPropertyAssertion(String op, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { return OntologyBuilderImpl.createObjectPropertyAssertion(new ObjectPropertyExpressionImpl(op), o1, o2); }
@Override public ClassAssertion createClassAssertion(String c, ObjectConstant o) throws InconsistentOntologyException { return OntologyBuilderImpl.createClassAssertion(new ClassImpl(c), o); }
CollectRDFVocabulary(RDF rdfFactory) { this.vb = OntologyBuilderImpl.builder(rdfFactory); }
/** * Normalizes and adds object property disjointness axiom * <p> * DisjointObjectProperties := 'DisjointObjectProperties' '(' axiomAnnotations * ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'<br> * <p> * Implements rule [O2]:<br> * - eliminates all occurrences of bot and if the result contains<br> * - no top and at least two elements then disjointness<br> * - one top then emptiness of all other elements<br> * - two tops then inconsistency (this behavior is an extension of OWL 2, where duplicates are removed from the list) */ @Override public void addDisjointObjectPropertiesAxiom(ObjectPropertyExpression... opes) throws InconsistentOntologyException { for (ObjectPropertyExpression p : opes) checkSignature(p); objectPropertyAxioms.addDisjointness(opes); }
public SemanticIndexRDFHandler(SIRepository repository, Connection connection, TypeFactory typeFactory, TermFactory termFactory, RDF rdfFactory) { this.repository = repository; this.typeFactory = typeFactory; this.termFactory = termFactory; this.builder = OntologyBuilderImpl.assertionSupplier(rdfFactory); this.connection = connection; this.rdfFactory = rdfFactory; }
public static ABoxAssertionSupplier assertionSupplier(RDF rdfFactory) { return new ABoxAssertionSupplier() { @Override public ClassAssertion createClassAssertion(String c, ObjectConstant o) throws InconsistentOntologyException { return OntologyBuilderImpl.createClassAssertion(new ClassImpl(rdfFactory.createIRI(c)), o); } @Override public ObjectPropertyAssertion createObjectPropertyAssertion(String op, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { return OntologyBuilderImpl.createObjectPropertyAssertion(new ObjectPropertyExpressionImpl(rdfFactory.createIRI(op)), o1, o2); } @Override public DataPropertyAssertion createDataPropertyAssertion(String dp, ObjectConstant o, ValueConstant v) throws InconsistentOntologyException { return OntologyBuilderImpl.createDataPropertyAssertion(new DataPropertyExpressionImpl(rdfFactory.createIRI(dp)), o, v); } }; }
ObjectPropertyExpressionImpl(IRI iri) { this.iri = iri; this.isInverse = false; this.string = iri.getIRIString(); this.isTop = iri.equals(OWL.TOP_OBJECT_PROPERTY); this.isBottom = iri.equals(OWL.BOTTOM_OBJECT_PROPERTY); if (isTop || isBottom) this.inverseProperty = this; // rule [R6] else this.inverseProperty = new ObjectPropertyExpressionImpl(iri, this); this.domain = new ObjectSomeValuesFromImpl(this); }
DataPropertyExpressionImpl(IRI iri) { this.name = iri.getIRIString(); this.iri = iri; this.isTop = iri.equals(OWL.TOP_DATA_PROPERTY); this.isBottom = iri.equals(OWL.BOTTOM_DATA_PROPERTY); this.domains.put(DatatypeImpl.rdfsLiteral, new DataSomeValuesFromImpl(this, DatatypeImpl.rdfsLiteral)); this.range = new DataPropertyRangeExpressionImpl(this); }
/** * Creates an annotation assertion * AnnotationAssertion := 'AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')' * AnnotationSubject := IRI | AnonymousIndividual * */ public static AnnotationAssertion createAnnotationAssertion(AnnotationProperty ap, ObjectConstant o, Constant c) { return new AnnotationAssertionImpl(ap,o,c); }
public static OntologyBuilder builder() { return new OntologyBuilderImpl(); }
@Override public DataPropertyAssertion createDataPropertyAssertion(String dp, ObjectConstant o, ValueConstant v) throws InconsistentOntologyException { return OntologyBuilderImpl.createDataPropertyAssertion(new DataPropertyExpressionImpl(rdfFactory.createIRI(dp)), o, v); } };
@Override public ObjectPropertyAssertion createObjectPropertyAssertion(String op, ObjectConstant o1, ObjectConstant o2) throws InconsistentOntologyException { return OntologyBuilderImpl.createObjectPropertyAssertion(new ObjectPropertyExpressionImpl(rdfFactory.createIRI(op)), o1, o2); }
@Override public ClassAssertion createClassAssertion(String c, ObjectConstant o) throws InconsistentOntologyException { return OntologyBuilderImpl.createClassAssertion(new ClassImpl(rdfFactory.createIRI(c)), o); }
/** * Normalizes and adds object property disjointness axiom * <p> * DisjointObjectProperties := 'DisjointObjectProperties' '(' axiomAnnotations * ObjectPropertyExpression ObjectPropertyExpression { ObjectPropertyExpression } ')'<br> * <p> * Implements rule [O2]:<br> * - eliminates all occurrences of bot and if the result contains<br> * - no top and at least two elements then disjointness<br> * - one top then emptiness of all other elements<br> * - two tops then inconsistency (this behavior is an extension of OWL 2, where duplicates are removed from the list) */ @Override public void addDisjointObjectPropertiesAxiom(ObjectPropertyExpression... opes) throws InconsistentOntologyException { for (ObjectPropertyExpression p : opes) checkSignature(p); objectPropertyAxioms.addDisjointness(opes); }
/** * Creates an annotation assertion * AnnotationAssertion := 'AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')' * AnnotationSubject := IRI | AnonymousIndividual * */ public static AnnotationAssertion createAnnotationAssertion(AnnotationProperty ap, ObjectConstant o, Constant c) { return new AnnotationAssertionImpl(ap,o,c); }
public static OntologyBuilder builder(RDF rdfFactory) { return new OntologyBuilderImpl(rdfFactory); }
/** * Normalizes and adds class disjointness axiom * <p> * DisjointClasses := 'DisjointClasses' '(' axiomAnnotations * subClassExpression subClassExpression { subClassExpression } ')'<br> * <p> * Implements rule [C2]:<br> * - eliminates all occurrences of bot and if the result contains<br> * - no top and at least two elements then disjointness<br> * - one top then emptiness of all other elements<br> * - two tops then inconsistency (this behavior is an extension of OWL 2, where duplicates are removed from the list) */ @Override public void addDisjointClassesAxiom(ClassExpression... ces) throws InconsistentOntologyException { for (ClassExpression c : ces) checkSignature(c); classAxioms.addDisjointness(ces); }