You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a closed issue #745 which asks about using getAnnotations to retrieve all annotations in the import closure for a given class. The answer before closing says "all methods are overloaded to accept a single ontology or a collection/stream of ontologies" but this does not seem to be the case for getAnnotations.
There are two. The comment meant there was either a collection or a stream argument; the arguments for these methods are Iterable instances.
/**
* Obtains the annotations on e where the annotation has the specified annotation property. This
* includes the annotations on annotation assertion axioms with matching annotation property.
*
* @param e entity
* @param ontologies The ontologies to examine for annotation axioms
* @param annotationProperty The annotation property
* @return A set of {@code OWLAnnotation} objects that have the specified URI.
*/
@Nonnull
public static Collection<OWLAnnotation> getAnnotations(@Nonnull OWLAnnotationSubject e,
@Nonnull Iterable<OWLOntology> ontologies,
@Nonnull OWLAnnotationProperty annotationProperty) {
Set<OWLAnnotation> toReturn = new HashSet<>();
for (OWLOntology o : ontologies) {
assert o != null;
toReturn.addAll(getAnnotations(e, o, annotationProperty));
}
return toReturn;
}
/**
* Obtains the annotations on e where the annotation has the specified annotation property. This
* includes the annotations on annotation assertion axioms with matching annotation property.
*
* @param e entity
* @param ontologies The ontologies to examine for annotation axioms
* @param annotationProperty The annotation property
* @return A set of {@code OWLAnnotation} objects that have the specified URI.
*/
@Nonnull
public static Collection<OWLAnnotation> getAnnotations(@Nonnull OWLEntity e,
@Nonnull Iterable<OWLOntology> ontologies,
@Nonnull OWLAnnotationProperty annotationProperty) {
Set<OWLAnnotation> toReturn = new HashSet<>();
for (OWLOntology o : ontologies) {
assert o != null;
toReturn.addAll(getAnnotations(e, o, annotationProperty));
}
return toReturn;
}
There is a closed issue #745 which asks about using getAnnotations to retrieve all annotations in the import closure for a given class. The answer before closing says "all methods are overloaded to accept a single ontology or a collection/stream of ontologies" but this does not seem to be the case for
getAnnotations
.owlapi/api/src/main/java/org/semanticweb/owlapi/search/EntitySearcher.java
Lines 64 to 105 in b683b03
There is no overload which accepts a stream of ontologies, as far as I can see.
The text was updated successfully, but these errors were encountered: