/** * @param iri property * @return property * @since 2.5.1 */ default OWLDataProperty toDataProperty(final IRI iri) { return getFactory().getOWLDataProperty(iri); }
/** * @param iri individual * @return individual * @since 2.5.1 */ default OWLNamedIndividual toIndividual(final IRI iri) { return getFactory().getOWLNamedIndividual(iri); }
/** * @param iri class * @return class * @since 2.5.1 */ default OWLClass toClass(final IRI iri) { return getFactory().getOWLClass(iri); }
/** * @param iri property * @return property * @since 2.5.1 */ default OWLObjectProperty toObjectProperty(final IRI iri) { return getFactory().getOWLObjectProperty(iri); }
/** * @param iri property * @return property * @since 2.5.1 */ default OWLDataProperty toDataProperty(final IRI iri) { return getFactory().getOWLDataProperty(iri); }
/** * @param iri property * @return property * @since 2.5.1 */ default OWLDataProperty toDataProperty(final IRI iri) { return getFactory().getOWLDataProperty(iri); }
/** * add axiom into the ontology. * * @param property that carry the data * @param subject is the root of the property * @param value is the target of the property * @since 2.5.1 */ default public void addDataPropertyAxiom(final OWLDataProperty property, final OWLIndividual subject, final double value) { addDataPropertyAxiom(property, subject, getFactory().getOWLLiteral(value)); }
/** * @param subject that will receive the class * @param clazz that will be add * @since 2.5.1 */ default public void addClass(final OWLNamedIndividual subject, final OWLClassExpression clazz) { addAxiom(getFactory().getOWLClassAssertionAxiom(clazz, subject)); }
/** * add axiom into the ontology. * * @param property that carry the data * @param subject is the root of the property * @param value is the target of the property * @since 2.5.1 */ default public void addDataPropertyAxiom(final OWLDataProperty property, final OWLIndividual subject, final String value) { addDataPropertyAxiom(property, subject, getFactory().getOWLLiteral(value)); }
/** * @param subject that will receive the class * @param clazz that will be add * @since 2.5.1 */ default public void addClass(final OWLNamedIndividual subject, final OWLClassExpression clazz) { addAxiom(getFactory().getOWLClassAssertionAxiom(clazz, subject)); }
/** * add axiom into the ontology. * * @param property that carry the data * @param subject is the root of the property * @param value is the target of the property * @since 2.5.1 */ default public void addDataPropertyAxiom(final OWLDataProperty property, final OWLIndividual subject, final long value) { addDataPropertyAxiom(property, subject, getFactory().getOWLLiteral((double) value)); // This is also the default java behavior but here I want to make it explicit. }
/** * remove axiom from the ontology * * @param property that carry the data * @param subject is the root of the property * @param literal is the target of the property * @since 2.5.1 */ default public void removeDataPropertyAxiom(final OWLDataProperty property, final OWLIndividual subject, final OWLLiteral literal) { removeAxiom(getFactory().getOWLDataPropertyAssertionAxiom(property, subject, literal)); }
/** * Remove all the target of an object property that are related to an individual. This function is slow and should be optimized. * * @param property to remove * @param subject to consider. * @since 2.5.1 */ default public void removeObjectPropertyAxiom(final IRI property, final OWLNamedIndividual subject) { removeObjectPropertyAxiom(getFactory().getOWLObjectProperty(property), subject); }
/** * add axiom into the ontology. * * @param property that carry the data * @param subject is the root of the property * @param value is the target of the property * @since 2.5.1 */ default public void addDataPropertyAxiom(final OWLDataProperty property, final OWLIndividual subject, final double value) { addDataPropertyAxiom(property, subject, getFactory().getOWLLiteral(value)); }
/** * remove axiom from the ontology * * @param property that carry the data * @param subject is the root of the property * @param literal is the target of the property * @since 2.5.1 */ default public void removeDataPropertyAxiom(final OWLDataProperty property, final OWLIndividual subject, final OWLLiteral literal) { removeAxiom(getFactory().getOWLDataPropertyAssertionAxiom(property, subject, literal)); }
/** * @param named is the individual with the given name that will be test against the facette. * @param facette is an class expression that represent an acceptable type for the individual. * @return true if the individual have the given facette * @since 2.5.1 */ default public boolean individualHaveFacet(final OWLNamedIndividual named, final OWLClassExpression facette) { return getReasoner().isEntailed(getFactory().getOWLClassAssertionAxiom(facette, named)); }
/** * @param iri the desired property * @return the owl property * @since 2.5.1 */ default public OWLObjectProperty declareObjectProperty(final IRI iri) { final OWLObjectProperty baby = toObjectProperty(iri); addAxiom(getFactory().getOWLDeclarationAxiom(baby)); return baby; }
/** * @param clazz is the iri of the desired classes * @return the owl class * @since 2.5.1 */ default public OWLClass declareClass(final IRI clazz) { final OWLClass owlClazz = toClass(clazz); addAxiom(getFactory().getOWLDeclarationAxiom(owlClazz)); return owlClazz; }
/** * @param named is the individual with the given name that will be test against the facette. * @param facette is an class expression that represent an acceptable type for the individual. * @return true if the individual have the given facette * @since 2.5.1 */ default public boolean individualHaveFacet(final OWLNamedIndividual named, final OWLClassExpression facette) { return getReasoner().isEntailed(getFactory().getOWLClassAssertionAxiom(facette, named)); }
/** * @param iri to declare * @return the iri as an individual after inserting it as a declaration in the ontology. * @since 2.5.1 */ default public OWLNamedIndividual declareIndividual(final IRI iri) { final OWLNamedIndividual baby = toIndividual(iri); addAxiom(getFactory().getOWLDeclarationAxiom(baby)); return baby; }