@Override public Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) { return delegate_.getDataPropertyValues(ind, pe); }
@Override public Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) { return delegate_.getDataPropertyValues(ind, pe); }
public Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual arg0, OWLDataProperty arg1) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { return reasoner.getDataPropertyValues(arg0, arg1); }
@Override public synchronized Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { return r.getDataPropertyValues(ind, pe); }
@Override public Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) { return delegate_.getDataPropertyValues(ind, pe); }
/** * Gets the data property values for the specified individual and data property expression. The * values are a set of literals. Note that the results are not guaranteed to be complete for * this method. The reasoner may also return canonical literals or they may be in a form that * bears a resemblance to the syntax of the literals in the root ontology imports closure. * * @param ind The individual that is the subject of the data property values * @param pe The data property expression whose values are to be retrieved for the specified * individual * @return A set of {@code OWLLiteral}s containing literals such that for each literal {@code l} * in the set, the set of reasoner axioms entails * {@code DataPropertyAssertion(pe ind l)}. * @throws InconsistentOntologyException if the imports closure of the root ontology is * inconsistent * @throws FreshEntitiesException if the signature of the individual and property expression is * not contained within the signature of the imports closure of the root ontology and * the undeclared entity policy of this reasoner is set to * {@link FreshEntityPolicy#DISALLOW}. * @throws ReasonerInterruptedException if the reasoning process was interrupted for any * particular reason (for example if reasoning was cancelled by a client process) * @throws TimeOutException if the reasoner timed out during a basic reasoning operation. See * {@link #getTimeOut()}. * @see org.semanticweb.owlapi.reasoner.IndividualNodeSetPolicy */ default Stream<OWLLiteral> dataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) { return getDataPropertyValues(ind, pe).stream(); }
/** * Gets the data property values for the specified individual and data property expression. The * values are a set of literals. Note that the results are not guaranteed to be complete for * this method. The reasoner may also return canonical literals or they may be in a form that * bears a resemblance to the syntax of the literals in the root ontology imports closure. * * @param ind The individual that is the subject of the data property values * @param pe The data property expression whose values are to be retrieved for the specified * individual * @return A set of {@code OWLLiteral}s containing literals such that for each literal {@code l} * in the set, the set of reasoner axioms entails * {@code DataPropertyAssertion(pe ind l)}. * @throws InconsistentOntologyException if the imports closure of the root ontology is * inconsistent * @throws FreshEntitiesException if the signature of the individual and property expression is * not contained within the signature of the imports closure of the root ontology and * the undeclared entity policy of this reasoner is set to * {@link FreshEntityPolicy#DISALLOW}. * @throws ReasonerInterruptedException if the reasoning process was interrupted for any * particular reason (for example if reasoning was cancelled by a client process) * @throws TimeOutException if the reasoner timed out during a basic reasoning operation. See * {@link #getTimeOut()}. * @see org.semanticweb.owlapi.reasoner.IndividualNodeSetPolicy */ default Stream<OWLLiteral> dataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) { return getDataPropertyValues(ind, pe).stream(); }
/** * @param subject subject * @param property property * @return all values * @since 2.5.1 */ default Set<OWLLiteral> getValues(final OWLNamedIndividual subject, final OWLDataProperty property) { return getReasoner().getDataPropertyValues(subject, property); }
/** * @param subject subject * @param property property * @return all values * @since 2.5.1 */ default Set<OWLLiteral> getValues(final OWLNamedIndividual subject, final OWLDataProperty property) { return getReasoner().getDataPropertyValues(subject, property); }
/** * @param subject subject * @param property property * @return all values * @since 2.5.1 */ default Set<OWLLiteral> getValues(final OWLNamedIndividual subject, final OWLDataProperty property) { return getReasoner().getDataPropertyValues(subject, property); }
@Override public Set<OWLLiteral> getRelatedValuesImpl(OWLIndividual individual, OWLDataProperty datatypeProperty) { Set<OWLLiteral> propVals; try { propVals = reasoner.getDataPropertyValues( individual.asOWLNamedIndividual(), datatypeProperty); } catch (UnsupportedOperationException e) { if (useFallbackReasoner) { propVals = fallbackReasoner.getDataPropertyValues( individual.asOWLNamedIndividual(), datatypeProperty); } else { throw e; } } return propVals; }
@Override public Collection<OWLLiteral> getPropertyValues(OWLNamedIndividual i, OWLDataProperty p) { Set<OWLLiteral> results = new HashSet<OWLLiteral>(); results.addAll(reasoner.getDataPropertyValues(i, p)); // the behavior of getDataPropertyValues is somewhat undefined // so make sure that the asserted ones are included. for (OWLOntology imported : ontology.getImportsClosure()) { results.addAll(i.getDataPropertyValues(p, imported)); } return results; }
@Override protected void addAxioms(OWLNamedIndividual entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLPropertyAssertionAxiom<?, ?>> result) { 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.getRootOntology().objectPropertiesInSignature(INCLUDED) .forEach(p -> reasoner.getObjectPropertyValues(entity, p).entities() .forEach( i -> result.add(dataFactory.getOWLObjectPropertyAssertionAxiom(p, entity, i)))); reasoner.getRootOntology().dataPropertiesInSignature(INCLUDED) .forEach(p -> reasoner.getDataPropertyValues(entity, p) .forEach( v -> result.add(dataFactory.getOWLDataPropertyAssertionAxiom(p, entity, v)))); }
protected void addAxioms(OWLNamedIndividual entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLPropertyAssertionAxiom> result) { for (OWLObjectProperty prop : reasoner.getRootOntology().getObjectPropertiesInSignature(true)) { for (OWLNamedIndividual value : reasoner.getObjectPropertyValues(entity, prop).getFlattened()) { result.add(dataFactory.getOWLObjectPropertyAssertionAxiom(prop, entity, value)); } } for (OWLDataProperty prop : reasoner.getRootOntology().getDataPropertiesInSignature(true)) { for (OWLLiteral value : reasoner.getDataPropertyValues(entity, prop)) { result.add(dataFactory.getOWLDataPropertyAssertionAxiom(prop, entity, value)); } } }
@Override protected void addAxioms(OWLNamedIndividual entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLPropertyAssertionAxiom<?, ?>> result) { 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.getRootOntology().objectPropertiesInSignature(INCLUDED) .forEach(p -> reasoner.getObjectPropertyValues(entity, p).entities() .forEach( i -> result.add(dataFactory.getOWLObjectPropertyAssertionAxiom(p, entity, i)))); reasoner.getRootOntology().dataPropertiesInSignature(INCLUDED) .forEach(p -> reasoner.getDataPropertyValues(entity, p) .forEach( v -> result.add(dataFactory.getOWLDataPropertyAssertionAxiom(p, entity, v)))); }
@Override protected void addAxioms(OWLNamedIndividual entity, OWLReasoner reasoner, OWLDataFactory dataFactory, Set<OWLPropertyAssertionAxiom<?, ?>> result) { 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.getRootOntology().objectPropertiesInSignature(INCLUDED) .forEach(p -> reasoner.getObjectPropertyValues(entity, p).entities() .forEach( i -> result.add(dataFactory.getOWLObjectPropertyAssertionAxiom(p, entity, i)))); reasoner.getRootOntology().dataPropertiesInSignature(INCLUDED) .forEach(p -> reasoner.getDataPropertyValues(entity, p) .forEach( v -> result.add(dataFactory.getOWLDataPropertyAssertionAxiom(p, entity, v)))); }
public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } if (!getRootObject().isAnonymous()){ for (OWLDataProperty dp : getReasoner().getRootOntology().getDataPropertiesInSignature(true)) { Set<OWLLiteral> values = getReasoner().getDataPropertyValues(getRootObject().asOWLNamedIndividual(), dp); for (OWLLiteral constant : values) { OWLDataPropertyAssertionAxiom ax = getOWLDataFactory().getOWLDataPropertyAssertionAxiom(dp, getRootObject(), constant); if (!added.contains(ax)) { addRow(new OWLDataPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLDataPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } } });
public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } if (!getRootObject().isAnonymous()){ for (OWLDataProperty dp : getReasoner().getRootOntology().getDataPropertiesInSignature(true)) { Set<OWLLiteral> values = getReasoner().getDataPropertyValues(getRootObject().asOWLNamedIndividual(), dp); for (OWLLiteral constant : values) { OWLDataPropertyAssertionAxiom ax = getOWLDataFactory().getOWLDataPropertyAssertionAxiom(dp, getRootObject(), constant); if (!added.contains(ax)) { addRow(new OWLDataPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLDataPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } } });
protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_DATA_PROPERTY_ASSERTIONS, () -> { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } if (!getRootObject().isAnonymous()){ for (OWLDataProperty dp : getReasoner().getRootOntology().getDataPropertiesInSignature(true)) { Set<OWLLiteral> values = getReasoner().getDataPropertyValues(getRootObject().asOWLNamedIndividual(), dp); for (OWLLiteral constant : values) { OWLDataPropertyAssertionAxiom ax = getOWLDataFactory().getOWLDataPropertyAssertionAxiom(dp, getRootObject(), constant); if (!added.contains(ax)) { addRow(new OWLDataPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLDataPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } }); }
protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_DATA_PROPERTY_ASSERTIONS, () -> { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } if (!getRootObject().isAnonymous()){ for (OWLDataProperty dp : getReasoner().getRootOntology().getDataPropertiesInSignature(true)) { Set<OWLLiteral> values = getReasoner().getDataPropertyValues(getRootObject().asOWLNamedIndividual(), dp); for (OWLLiteral constant : values) { OWLDataPropertyAssertionAxiom ax = getOWLDataFactory().getOWLDataPropertyAssertionAxiom(dp, getRootObject(), constant); if (!added.contains(ax)) { addRow(new OWLDataPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLDataPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } }); }