@Override public ClassAssertion createClassAssertion(String c, ObjectConstant o) throws InconsistentOntologyException { return OntologyBuilderImpl.createClassAssertion(new ClassImpl(c), o); }
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); } }; }
@Override public ClassAssertion createClassAssertion(String c, ObjectConstant o) throws InconsistentOntologyException { return OntologyBuilderImpl.createClassAssertion(new ClassImpl(rdfFactory.createIRI(c)), o); }
private OntologyBuilderImpl(RDF rdfFactory) { classes = new OntologyCategoryImpl<>(s -> new ClassImpl(rdfFactory.createIRI(s)), CLASS_NOT_FOUND,""); objectProperties = new OntologyCategoryImpl<>(s -> new ObjectPropertyExpressionImpl(rdfFactory.createIRI(s)), OBJECT_PROPERTY_NOT_FOUND,""); dataProperties = new OntologyCategoryImpl<>(s -> new DataPropertyExpressionImpl(rdfFactory.createIRI(s)), DATA_PROPERTY_NOT_FOUND,""); annotationProperties = new OntologyCategoryImpl<>(s -> new AnnotationPropertyImpl(rdfFactory.createIRI(s)), ANNOTATION_PROPERTY_NOT_FOUND,""); classes.map.put(OWL.THING.getIRIString(), ClassImpl.owlThing); classes.map.put(OWL.NOTHING.getIRIString(), ClassImpl.owlNothing); objectProperties.map.put(OWL.TOP_OBJECT_PROPERTY.getIRIString(), ObjectPropertyExpressionImpl.owlTopObjectProperty); objectProperties.map.put(OWL.BOTTOM_OBJECT_PROPERTY.getIRIString(), ObjectPropertyExpressionImpl.owlBottomObjectProperty); dataProperties.map.put(OWL.TOP_DATA_PROPERTY.getIRIString(), DataPropertyExpressionImpl.owlTopDataProperty); dataProperties.map.put(OWL.BOTTOM_DATA_PROPERTY.getIRIString(), DataPropertyExpressionImpl.owlBottomDataProperty); this.rdfFactory = rdfFactory; }