public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties(OWLObjectPropertyExpression arg0, boolean arg1) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { return reasoner.getSuperObjectProperties(arg0, arg1); }
@Override public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties( OWLObjectPropertyExpression pe, boolean direct) { return delegate_.getSuperObjectProperties(pe, direct); }
@Override public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties( OWLObjectPropertyExpression pe, boolean direct) { return delegate_.getSuperObjectProperties(pe, direct); }
@Override public NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties( OWLObjectPropertyExpression pe, boolean direct) { return delegate_.getSuperObjectProperties(pe, direct); }
@Override public synchronized NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties(OWLObjectPropertyExpression pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { return r.getSuperObjectProperties(pe, direct); }
/** * @param pe The object property expression whose strict (direct) super properties are to be * retrieved. * @return A {@code NodeSet} of <a href="#spe">simplified object property expressions</a>, such * that for each <a href="#spe">simplified object property expression</a>, {@code P}, in * the {@code NodeSet} , the set of reasoner axioms entails * {@code StrictSubObjectPropertyOf(pe, * P)} . <br> * If {@code pe} is equivalent to {@code owl:topObjectProperty} then the empty {@code * NodeSet} will be returned. * @see OWLReasoner#getSuperObjectProperties(OWLObjectPropertyExpression, boolean) Gets the set * of all <a href="#spe">simplified object property expressions</a> that are the strict * (potentially direct) super properties of the specified object property expression with * respect to the imports closure of the root ontology. Note that the properties are * returned as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. */ default NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties( OWLObjectPropertyExpression pe) { return getSuperObjectProperties(pe, false); }
/** * @param pe The object property expression whose strict (direct) super properties are to be * retrieved. * @return A {@code NodeSet} of <a href="#spe">simplified object property expressions</a>, such * that for each <a href="#spe">simplified object property expression</a>, {@code P}, in * the {@code NodeSet} , the set of reasoner axioms entails * {@code StrictSubObjectPropertyOf(pe, * P)} . <br> * If {@code pe} is equivalent to {@code owl:topObjectProperty} then the empty {@code * NodeSet} will be returned. * @see OWLReasoner#getSuperObjectProperties(OWLObjectPropertyExpression, boolean) Gets the set * of all <a href="#spe">simplified object property expressions</a> that are the strict * (potentially direct) super properties of the specified object property expression with * respect to the imports closure of the root ontology. Note that the properties are * returned as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. */ default NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties( OWLObjectPropertyExpression pe) { return getSuperObjectProperties(pe, false); }
/** * @param pe The object property expression whose strict (direct) super properties are to be * retrieved. * @return A {@code NodeSet} of <a href="#spe">simplified object property expressions</a>, such * that for each <a href="#spe">simplified object property expression</a>, {@code P}, in * the {@code NodeSet} , the set of reasoner axioms entails * {@code StrictSubObjectPropertyOf(pe, * P)} . <br> * If {@code pe} is equivalent to {@code owl:topObjectProperty} then the empty {@code * NodeSet} will be returned. * @see OWLReasoner#getSuperObjectProperties(OWLObjectPropertyExpression, boolean) Gets the set * of all <a href="#spe">simplified object property expressions</a> that are the strict * (potentially direct) super properties of the specified object property expression with * respect to the imports closure of the root ontology. Note that the properties are * returned as a {@link org.semanticweb.owlapi.reasoner.NodeSet}. */ default NodeSet<OWLObjectPropertyExpression> getSuperObjectProperties( OWLObjectPropertyExpression pe) { return getSuperObjectProperties(pe, false); }
public Set<OWLObjectProperty> getParents(OWLObjectProperty objectProperty) { Set<OWLObjectPropertyExpression> supers = getReasoner().getSuperObjectProperties(objectProperty, true).getFlattened(); supers.remove(objectProperty); Set<OWLObjectProperty> parents = new HashSet<OWLObjectProperty>(); for (OWLObjectPropertyExpression p : supers) { if (p instanceof OWLObjectProperty) { parents.add((OWLObjectProperty) p); } } return parents; }
public Set<OWLObjectProperty> getParents(OWLObjectProperty objectProperty) { Set<OWLObjectPropertyExpression> supers = getReasoner().getSuperObjectProperties(objectProperty, true).getFlattened(); supers.remove(objectProperty); Set<OWLObjectProperty> parents = new HashSet<OWLObjectProperty>(); for (OWLObjectPropertyExpression p : supers) { if (p instanceof OWLObjectProperty) { parents.add((OWLObjectProperty) p); } } return parents; }
protected void addAxioms(OWLObjectProperty entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLSubObjectPropertyOfAxiom> result) { for (OWLObjectProperty prop : reasoner.getSuperObjectProperties(entity, true).getFlattened()) { result.add(dataFactory.getOWLSubObjectPropertyOfAxiom(entity, prop)); } }
public Set<OWLObjectProperty> getParents(OWLObjectProperty objectProperty) { try { if(!getReasoner().isConsistent()) { return Collections.emptySet(); } Set<OWLObjectPropertyExpression> supers = getReasoner().getSuperObjectProperties(objectProperty, true).getFlattened(); supers.remove(objectProperty); Set<OWLObjectProperty> parents = new HashSet<>(); for (OWLObjectPropertyExpression p : supers) { if (p instanceof OWLObjectProperty) { parents.add((OWLObjectProperty) p); } } return parents; } catch (Exception e) { logger.error("An error occurred whilst asking the reasoner for the super-properties of an object property: {}", e.getMessage(), e); return Collections.emptySet(); } }
@Override protected TreeSet<OWLObjectProperty> getSuperPropertiesImpl(OWLObjectProperty objectProperty) { NodeSet<OWLObjectPropertyExpression> properties; try { properties = reasoner .getSuperObjectProperties(objectProperty, true); } catch (UnsupportedOperationException e) { if (useFallbackReasoner) { properties = fallbackReasoner.getSubObjectProperties( objectProperty, true); } else { throw e; } } return getFirstObjectProperties(properties); }
@Override protected void addAxioms(OWLObjectProperty entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLSubObjectPropertyOfAxiom> result, Set<OWLObjectPropertyExpression> nonSimpleProperties) { checkNotNull(dataFactory, "dataFactory cannot be null"); checkNotNull(reasoner, "reasoner cannot be null"); checkNotNull(result, "result cannot be null"); checkNotNull(entity, "entity cannot be null"); reasoner.getSuperObjectProperties(entity, true).entities().forEach( p -> addIfSimple(p, entity, dataFactory, result, nonSimpleProperties, reasoner)); }
@Override protected void addAxioms(OWLObjectProperty entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLSubObjectPropertyOfAxiom> result, Set<OWLObjectPropertyExpression> nonSimpleProperties) { checkNotNull(dataFactory, "dataFactory cannot be null"); checkNotNull(reasoner, "reasoner cannot be null"); checkNotNull(result, "result cannot be null"); checkNotNull(entity, "entity cannot be null"); reasoner.getSuperObjectProperties(entity, true).entities().forEach( p -> addIfSimple(p, entity, dataFactory, result, nonSimpleProperties, reasoner)); }
@Override protected void addAxioms(OWLObjectProperty entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLSubObjectPropertyOfAxiom> result, Set<OWLObjectPropertyExpression> nonSimpleProperties) { checkNotNull(dataFactory, "dataFactory cannot be null"); checkNotNull(reasoner, "reasoner cannot be null"); checkNotNull(result, "result cannot be null"); checkNotNull(entity, "entity cannot be null"); reasoner.getSuperObjectProperties(entity, true).entities().forEach( p -> addIfSimple(p, entity, dataFactory, result, nonSimpleProperties, reasoner)); }
private void populateObjectProperties(OWLReasoner r, Model m) { OWLObjectPropertyExpression bottom = r.getBottomObjectPropertyNode() .getRepresentativeElement(); populateObjectProperty(bottom, r, m); for (OWLObjectPropertyExpression op : r.getSuperObjectProperties( bottom, false).getFlattened()) { populateObjectProperty(op, r, m); } }
public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLObjectProperty topProperty = getOWLModelManager().getOWLDataFactory().getOWLTopObjectProperty(); for (OWLObjectPropertyExpression infSup : getOWLModelManager().getReasoner().getSuperObjectProperties(getRootObject(),true).getFlattened()) { if (!added.contains(infSup) && !topProperty.equals(infSup)) { addRow(new OWLSubObjectPropertyAxiomSuperPropertyFrameSectionRow(getOWLEditorKit(), OWLSubObjectPropertyAxiomSuperPropertyFrameSection.this, null, getRootObject(), getOWLDataFactory().getOWLSubObjectPropertyOfAxiom(getRootObject(), infSup))); } } } });
public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } for (OWLObjectPropertyExpression infSup : getOWLModelManager().getReasoner().getSuperObjectProperties(getRootObject(),true).getFlattened()) { if (!added.contains(infSup)) { addInferredRowIfNontrivial(new OWLSubObjectPropertyAxiomSuperPropertyFrameSectionRow(getOWLEditorKit(), OWLSubObjectPropertyAxiomSuperPropertyFrameSection.this, null, getRootObject(), getOWLDataFactory().getOWLSubObjectPropertyOfAxiom(getRootObject(), infSup))); } } } });
protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_SUPER_OBJECT_PROPERTIES, () -> { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } for (OWLObjectPropertyExpression infSup : getOWLModelManager().getReasoner().getSuperObjectProperties(getRootObject(),true).getFlattened()) { if (!added.contains(infSup)) { addInferredRowIfNontrivial(new OWLSubObjectPropertyAxiomSuperPropertyFrameSectionRow(getOWLEditorKit(), OWLSubObjectPropertyAxiomSuperPropertyFrameSection.this, null, getRootObject(), getOWLDataFactory().getOWLSubObjectPropertyOfAxiom(getRootObject(), infSup))); } } }); }