@Override public Stream<OWLDataPropertyAssertionAxiom> dataPropertyAssertionAxioms( OWLIndividual individual) { return withReadLock(() -> delegate.dataPropertyAssertionAxioms(individual)); }
/** * @param i individual * @param p property to search * @param ontology ontology to search * @return literal values */ public static Stream<OWLLiteral> getDataPropertyValues(OWLIndividual i, OWLDataPropertyExpression p, OWLOntology ontology) { return Searcher.values(ontology.dataPropertyAssertionAxioms(i), p); }
/** * @param i individual * @param p property to search * @param ontology ontology to search * @return true if values are present */ public static boolean hasDataPropertyValues(OWLIndividual i, OWLDataPropertyExpression p, OWLOntology ontology) { return Searcher.values(ontology.dataPropertyAssertionAxioms(i), p).findAny().isPresent(); }
/** * @param i individual * @param p property to search * @param ontology ontology to search * @return true if values are present */ public static boolean hasDataPropertyValues(OWLIndividual i, OWLDataPropertyExpression p, OWLOntology ontology) { return Searcher.values(ontology.dataPropertyAssertionAxioms(i), p).findAny().isPresent(); }
/** * @param i individual * @param p property to search * @param ontology ontology to search * @return literal values */ public static Stream<OWLLiteral> getDataPropertyValues(OWLIndividual i, OWLDataPropertyExpression p, OWLOntology ontology) { return Searcher.values(ontology.dataPropertyAssertionAxioms(i), p); }
@Override public Stream<OWLDataPropertyAssertionAxiom> dataPropertyAssertionAxioms( OWLIndividual individual) { return withReadLock(() -> delegate.dataPropertyAssertionAxioms(individual)); }
/** * @param i individual * @param p property to search * @param ontology ontology to search * @return true if values are present */ public static boolean hasDataPropertyValues(OWLIndividual i, OWLDataPropertyExpression p, OWLOntology ontology) { return Searcher.values(ontology.dataPropertyAssertionAxioms(i), p).findAny().isPresent(); }
@Override public Stream<OWLDataPropertyAssertionAxiom> dataPropertyAssertionAxioms( OWLIndividual individual) { return withReadLock(() -> delegate.dataPropertyAssertionAxioms(individual)); }
@Override public Stream<OWLDataPropertyAssertionAxiom> dataPropertyAssertionAxioms( OWLIndividual individual) { return withReadLock(() -> delegate.dataPropertyAssertionAxioms(individual)); }
/** * @param i individual * @param p property to search * @param ontology ontology to search * @return literal values */ public static Stream<OWLLiteral> getDataPropertyValues(OWLIndividual i, OWLDataPropertyExpression p, OWLOntology ontology) { return Searcher.values(ontology.dataPropertyAssertionAxioms(i), p); }
/** * @param i individual * @param p property to search * @param lit literal to search * @param ontology ontology to search * @return true if value present */ public static boolean hasDataPropertyValue(OWLIndividual i, OWLDataPropertyExpression p, OWLLiteral lit, OWLOntology ontology) { return contains(Searcher.values(ontology.dataPropertyAssertionAxioms(i), p), lit); }
protected void addAnnotations(OWLNamedIndividual ind, OWLOntology ont) { ont.dataPropertyAssertionAxioms(ind).filter(ax -> !ax.getProperty().isAnonymous()) .forEach(ax -> addAnnotation( ind, ont, ax)); }
/** * @param i individual * @param ontology ontology to search * @return property values */ public static Multimap<OWLDataPropertyExpression, OWLLiteral> getDataPropertyValues( OWLIndividual i, OWLOntology ontology) { Multimap<OWLDataPropertyExpression, OWLLiteral> map = LinkedListMultimap.create(); ontology.dataPropertyAssertionAxioms(i) .forEach(ax -> map.put(ax.getProperty(), ax.getObject())); return map; }
protected void addAnnotations(OWLNamedIndividual ind, OWLOntology ont) { ont.dataPropertyAssertionAxioms(ind).filter(ax -> !ax.getProperty().isAnonymous()) .forEach(ax -> addAnnotation( ind, ont, ax)); }
protected void addAnnotations(OWLNamedIndividual ind, OWLOntology ont) { ont.dataPropertyAssertionAxioms(ind).filter(ax -> !ax.getProperty().isAnonymous()) .forEach(ax -> addAnnotation( ind, ont, ax)); }
/** * @param i individual * @param p property to search * @param lit literal to search * @param ontology ontology to search * @return true if value present */ public static boolean hasDataPropertyValue(OWLIndividual i, OWLDataPropertyExpression p, OWLLiteral lit, OWLOntology ontology) { return contains(Searcher.values(ontology.dataPropertyAssertionAxioms(i), p), lit); }
/** * @param i individual * @param ontology ontology to search * @return property values */ public static Multimap<OWLDataPropertyExpression, OWLLiteral> getDataPropertyValues( OWLIndividual i, OWLOntology ontology) { Multimap<OWLDataPropertyExpression, OWLLiteral> map = LinkedListMultimap.create(); ontology.dataPropertyAssertionAxioms(i) .forEach(ax -> map.put(ax.getProperty(), ax.getObject())); return map; }
/** * @param i individual * @param p property to search * @param lit literal to search * @param ontology ontology to search * @return true if value present */ public static boolean hasDataPropertyValue(OWLIndividual i, OWLDataPropertyExpression p, OWLLiteral lit, OWLOntology ontology) { return contains(Searcher.values(ontology.dataPropertyAssertionAxioms(i), p), lit); }
/** * @param i individual * @param ontology ontology to search * @return property values */ public static Multimap<OWLDataPropertyExpression, OWLLiteral> getDataPropertyValues( OWLIndividual i, OWLOntology ontology) { Multimap<OWLDataPropertyExpression, OWLLiteral> map = LinkedListMultimap.create(); ontology.dataPropertyAssertionAxioms(i) .forEach(ax -> map.put(ax.getProperty(), ax.getObject())); return map; }
@Override public Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind, OWLDataProperty pe) { ensurePrepared(); Set<OWLLiteral> literals = new HashSet<>(); Set<OWLDataProperty> superProperties = asUnorderedSet( Stream.concat(getSuperDataProperties(pe, false) .entities(), getEquivalentDataProperties(pe).entities())); getRootOntology().importsClosure().flatMap(o -> o.dataPropertyAssertionAxioms(ind)) .forEach(ax -> { if (superProperties.contains(ax.getProperty().asOWLDataProperty())) { literals.add(ax.getObject()); } }); return literals; }