/** * @param p filter predicate for annotations. Can be used to match the annotation property or * the annotation value * @return a stream of OWLAnnotations on this object, with filter applied. This will only * include the annotations contained in this object, not the value of annotation * assertion axioms in an ontology or in other ontologies. Use the EntitySearcher * methods for that purpose. */ default Stream<OWLAnnotation> annotations(Predicate<OWLAnnotation> p) { // Default implementation returns a sorted stream already. return annotations().filter(p).sorted(); }
/** * @param p filter predicate for annotations. Can be used to match the annotation property or * the annotation value * @return a stream of OWLAnnotations on this object, with filter applied. This will only * include the annotations contained in this object, not the value of annotation * assertion axioms in an ontology or in other ontologies. Use the EntitySearcher * methods for that purpose. */ default Stream<OWLAnnotation> annotations(Predicate<OWLAnnotation> p) { // Default implementation returns a sorted stream already. return annotations().filter(p).sorted(); }
/** * @param p filter predicate for annotations. Can be used to match the annotation property or * the annotation value * @return a stream of OWLAnnotations on this object, with filter applied. This will only * include the annotations contained in this object, not the value of annotation * assertion axioms in an ontology or in other ontologies. Use the EntitySearcher * methods for that purpose. */ default Stream<OWLAnnotation> annotations(Predicate<OWLAnnotation> p) { // Default implementation returns a sorted stream already. return annotations().filter(p).sorted(); }
@Override public <T extends OWLObject> void walk(StructureWalker<T> walker, OWLObject o) { if (o instanceof HasAnnotations) { ((HasAnnotations) o).annotations().forEach(a -> a.accept(walker)); } } };
@Override public Set<C> doDefault(Object object) { return asUnorderedSet(((HasAnnotations) object).annotations().map(this::get)); }
/** * @param p annotation property to filter on * @return a stream of OWLAnnotations on this object, with filter applied. This will only * include the annotations contained in this object, not the value of annotation * assertion axioms in an ontology or in other ontologies. Use the EntitySearcher * methods for that purpose. */ default Stream<OWLAnnotation> annotations(OWLAnnotationProperty p) { // Default implementation returns a sorted stream already. return annotations().filter(a -> a.getProperty().equals(p)).sorted(); }
@Override public Set<C> doDefault(Object object) { return asUnorderedSet(((HasAnnotations) object).annotations().map(this::get)); }
/** * @param p annotation property to filter on * @return a stream of OWLAnnotations on this object, with filter applied. This will only * include the annotations contained in this object, not the value of annotation * assertion axioms in an ontology or in other ontologies. Use the EntitySearcher * methods for that purpose. */ default Stream<OWLAnnotation> annotations(OWLAnnotationProperty p) { // Default implementation returns a sorted stream already. return annotations().filter(a -> a.getProperty().equals(p)).sorted(); }
@Override public <T extends OWLObject> void walk(StructureWalker<T> walker, OWLObject o) { if (o instanceof HasAnnotations) { ((HasAnnotations) o).annotations().forEach(a -> a.accept(walker)); } } };
/** * @param p annotation property to filter on * @return a stream of OWLAnnotations on this object, with filter applied. This will only * include the annotations contained in this object, not the value of annotation * assertion axioms in an ontology or in other ontologies. Use the EntitySearcher * methods for that purpose. */ default Stream<OWLAnnotation> annotations(OWLAnnotationProperty p) { // Default implementation returns a sorted stream already. return annotations().filter(a -> a.getProperty().equals(p)).sorted(); }
@Override public <T extends OWLObject> void walk(StructureWalker<T> walker, OWLObject o) { if (o instanceof HasAnnotations) { ((HasAnnotations) o).annotations().forEach(a -> a.accept(walker)); } } };
/** @return annotation collection s list */ default List<OWLAnnotation> annotationsAsList() { return asList(annotations()); }
/** @return annotation collection s list */ default List<OWLAnnotation> annotationsAsList() { return asList(annotations()); }
@Override public Set<C> doDefault(Object object) { return asUnorderedSet(((HasAnnotations) object).annotations().map(this::get)); }
/** @return annotation collection s list */ default List<OWLAnnotation> annotationsAsList() { return asList(annotations()); }
/** * Gets the annotations whose annotation property is equal to {@code annotationProperty}. * * @param annotationProperty The annotation property that will be equal to the annotation * property of each returned annotation. * @return A set of annotations whose annotation properties is equals to {@code * annotationProperty}. * @deprecated use the stream method */ @Deprecated default Set<OWLAnnotation> getAnnotations(OWLAnnotationProperty annotationProperty) { return asSet(annotations(a -> a.getProperty().equals(annotationProperty))); } }
/** * Gets the annotations whose annotation property is equal to {@code annotationProperty}. * * @param annotationProperty The annotation property that will be equal to the annotation * property of each returned annotation. * @return A set of annotations whose annotation properties is equals to {@code * annotationProperty}. * @deprecated use the stream method */ @Deprecated default Set<OWLAnnotation> getAnnotations(OWLAnnotationProperty annotationProperty) { return asSet(annotations(a -> a.getProperty().equals(annotationProperty))); } }
private List<OWLAnnotation> a(HasAnnotations axiom) { checkNotNull(axiom, "axiom cannot be null"); return asList(axiom.annotations().map(this::t)); }
private List<OWLAnnotation> a(HasAnnotations axiom) { checkNotNull(axiom, "axiom cannot be null"); return asList(axiom.annotations().map(this::t)); }
private List<OWLAnnotation> a(HasAnnotations axiom) { checkNotNull(axiom, "axiom cannot be null"); return asList(axiom.annotations().map(this::t)); }