/** * @param pe The property expression whose domains are to be retrieved. * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * Return the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with * {@code N} if {@code N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe) { return getObjectPropertyDomains(pe, false); }
public NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression arg0, boolean arg1) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { return reasoner.getObjectPropertyDomains(arg0, arg1); }
@Override public NodeSet<OWLClass> getObjectPropertyDomains( OWLObjectPropertyExpression pe, boolean direct) { return delegate_.getObjectPropertyDomains(pe, direct); }
@Override public NodeSet<OWLClass> getObjectPropertyDomains( OWLObjectPropertyExpression pe, boolean direct) { return delegate_.getObjectPropertyDomains(pe, direct); }
@Override public NodeSet<OWLClass> getObjectPropertyDomains( OWLObjectPropertyExpression pe, boolean direct) { return delegate_.getObjectPropertyDomains(pe, direct); }
/** * @param pe The property expression whose domains are to be retrieved. * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * Return the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with * {@code N} if {@code N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe) { return getObjectPropertyDomains(pe, false); }
@Override public synchronized NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { return r.getObjectPropertyDomains(pe, direct); }
/** * @param pe The property expression whose domains are to be retrieved. * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * Return the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with * {@code N} if {@code N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe) { return getObjectPropertyDomains(pe, false); }
/** * @param pe The property expression whose domains are to be retrieved. * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * Return the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with * {@code N} if {@code N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default Stream<OWLClass> objectPropertyDomains(OWLObjectPropertyExpression pe) { return getObjectPropertyDomains(pe).entities(); }
/** * @param pe The property expression whose domains are to be retrieved. * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * Return the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with * {@code N} if {@code N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default Stream<OWLClass> objectPropertyDomains(OWLObjectPropertyExpression pe) { return getObjectPropertyDomains(pe).entities(); }
/** * @param pe The property expression whose domains are to be retrieved. * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * Return the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with * {@code N} if {@code N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default Stream<OWLClass> objectPropertyDomains(OWLObjectPropertyExpression pe) { return getObjectPropertyDomains(pe).entities(); }
/** * @param pe The property expression whose domains are to be retrieved. * @param depth Specifies if the direct domains should be retrieved ( {@code DIRECT} ), or if * all domains should be retrieved ( {@code ALL}). * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * If {@code direct} is {@code DIRECT}: then if {@code N} is not empty then the return * value is {@code N}, else the return value is the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe * owl:Thing), true)} . <br> * If {@code direct} is {@code ALL}: then the result of {@code * getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with {@code N} if {@code * N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, InferenceDepth depth) { return getObjectPropertyDomains(pe, depth.isDirectOnly()); }
/** * @param pe The property expression whose domains are to be retrieved. * @param depth Specifies if the direct domains should be retrieved ( {@code DIRECT} ), or if * all domains should be retrieved ( {@code ALL}). * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * If {@code direct} is {@code DIRECT}: then if {@code N} is not empty then the return * value is {@code N}, else the return value is the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe * owl:Thing), true)} . <br> * If {@code direct} is {@code ALL}: then the result of {@code * getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with {@code N} if {@code * N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default NodeSet<OWLClass> getObjectPropertyDomains(OWLObjectPropertyExpression pe, InferenceDepth depth) { return getObjectPropertyDomains(pe, depth.isDirectOnly()); }
/** * @param pe The property expression whose domains are to be retrieved. * @param depth Specifies if the direct domains should be retrieved ( {@code DIRECT} ), or if * all domains should be retrieved ( {@code ALL}). * @return Let {@code N = getEquivalentClasses(ObjectSomeValuesFrom(pe owl:Thing))} . <br> * If {@code direct} is {@code DIRECT}: then if {@code N} is not empty then the return * value is {@code N}, else the return value is the result of * {@code getSuperClasses(ObjectSomeValuesFrom(pe * owl:Thing), true)} . <br> * If {@code direct} is {@code ALL}: then the result of {@code * getSuperClasses(ObjectSomeValuesFrom(pe owl:Thing), false)} together with {@code N} if {@code * N} is non-empty. * @see OWLReasoner#getObjectPropertyDomains(OWLObjectPropertyExpression, boolean) Gets the * named classes that are the direct or indirect domains of this property with respect to * the imports closure of the root ontology. The classes are returned as a * {@link org.semanticweb.owlapi.reasoner.NodeSet} . */ default Stream<OWLClass> objectPropertyDomains(OWLObjectPropertyExpression pe, InferenceDepth depth) { return getObjectPropertyDomains(pe, depth).entities(); }
protected NodeSet<OWLClass> getInferredDomains() { OWLReasoner reasoner = getOWLModelManager().getReasoner(); OWLObjectProperty p = getRootObject(); OWLDataFactory factory = getOWLModelManager().getOWLOntologyManager().getOWLDataFactory(); if (p.equals(factory.getOWLTopObjectProperty())) { return new OWLClassNodeSet(reasoner.getTopClassNode()); } OWLClassExpression domain = factory.getOWLObjectSomeValuesFrom(p, factory.getOWLThing()); Node<OWLClass> domainNode = reasoner.getEquivalentClasses(domain); if (domainNode != null && !domainNode.getEntities().isEmpty()) { return new OWLClassNodeSet(domainNode); } else { return reasoner.getObjectPropertyDomains(getRootObject(), true); } }
protected NodeSet<OWLClass> getInferredDomains() { OWLReasoner reasoner = getOWLModelManager().getReasoner(); OWLObjectProperty p = getRootObject(); OWLDataFactory factory = getOWLModelManager().getOWLOntologyManager().getOWLDataFactory(); if (p.equals(factory.getOWLTopObjectProperty())) { return new OWLClassNodeSet(reasoner.getTopClassNode()); } OWLClassExpression domain = factory.getOWLObjectSomeValuesFrom(p, factory.getOWLThing()); Node<OWLClass> domainNode = reasoner.getEquivalentClasses(domain); if (domainNode != null && !domainNode.getEntities().isEmpty()) { return new OWLClassNodeSet(domainNode); } else { return reasoner.getObjectPropertyDomains(getRootObject(), true); } }
protected NodeSet<OWLClass> getInferredDomains() { OWLReasoner reasoner = getOWLModelManager().getReasoner(); OWLObjectProperty p = getRootObject(); OWLDataFactory factory = getOWLModelManager().getOWLOntologyManager().getOWLDataFactory(); if (p.equals(factory.getOWLTopObjectProperty())) { return new OWLClassNodeSet(reasoner.getTopClassNode()); } OWLClassExpression domain = factory.getOWLObjectSomeValuesFrom(p, factory.getOWLThing()); Node<OWLClass> domainNode = reasoner.getEquivalentClasses(domain); if (domainNode != null && !domainNode.getEntities().isEmpty()) { return new OWLClassNodeSet(domainNode); } else { return reasoner.getObjectPropertyDomains(getRootObject(), true); } }
protected NodeSet<OWLClass> getInferredDomains() { OWLReasoner reasoner = getOWLModelManager().getReasoner(); OWLObjectProperty p = getRootObject(); OWLDataFactory factory = getOWLModelManager().getOWLOntologyManager().getOWLDataFactory(); if (p.equals(factory.getOWLTopObjectProperty())) { return new OWLClassNodeSet(reasoner.getTopClassNode()); } OWLClassExpression domain = factory.getOWLObjectSomeValuesFrom(p, factory.getOWLThing()); Node<OWLClass> domainNode = reasoner.getEquivalentClasses(domain); if (domainNode != null && !domainNode.getEntities().isEmpty()) { return new OWLClassNodeSet(domainNode); } else { return reasoner.getObjectPropertyDomains(getRootObject(), true); } }
@Test public void testOnlyProperties() throws OWLOntologyCreationException { try (final OWLManagerGroup group = new OWLManagerGroup()) { final OWLOntologyID ontId = OWLHelper.getVersion(IRI.create(NS + "owlapi.only.properties"), 1.0); final OWLHelper owl = new OWLGenericTools(group, ontId, true); // final OWLNamedIndividual x1 = i.apply("I1"); // final OWLNamedIndividual x2 = i.apply("I2"); //owl.addAxiom(OWL.propertyAssertion(x1, propA, x2)); owl.addAxiom(OWL.inverseProperties(o.apply("A"), o.apply("B"))); //owl.addAxiom(OWL.declaration(ClsA)); owl.getReasoner().getObjectPropertyDomains(o.apply("A")); } // The test is just about not crash. }
@Test public void testOnlyProperties() throws OWLOntologyCreationException { try (final OWLManagerGroup group = new OWLManagerGroup()) { final OWLOntologyID ontId = OWLHelper.getVersion(IRI.create(NS + "owlapi.only.properties"), 1.0); final OWLHelper owl = new OWLGenericTools(group, ontId, true); // final OWLNamedIndividual x1 = i.apply("I1"); // final OWLNamedIndividual x2 = i.apply("I2"); //owl.addAxiom(OWL.propertyAssertion(x1, propA, x2)); owl.addAxiom(OWL.inverseProperties(o.apply("A"), o.apply("B"))); //owl.addAxiom(OWL.declaration(ClsA)); owl.getReasoner().getObjectPropertyDomains(o.apply("A")); } // The test is just about not crash. }