OntologyHelper { public static Set<String> getValues(Set<OWLAnnotation> annotations) { Set<String> results = new HashSet<>(); for (OWLAnnotation annotation : annotations) { String value = getValue(annotation); if (value != null) { results.add(value); } } return results; }  static void addAxiomAnnotation(
      OWLOntology ontology, OWLAxiom axiom, IRI propertyIRI, OWLAnnotationValue value); static void addAxiomAnnotation(
      OWLOntology ontology, OWLAxiom axiom, Set<OWLAnnotation> annotations); static void addAxiomAnnotations(
      OWLOntology ontology, IRI propertyIRI, OWLAnnotationValue value); static void addOntologyAnnotation(
      OWLOntology ontology, IRI propertyIRI, OWLAnnotationValue value); static void addOntologyAnnotation(OWLOntology ontology, OWLAnnotation annotation); static void collapseOntology(OWLOntology ontology, Set<IRI> precious); static void collapseOntology(
      OWLOntology ontology, int threshold, Set<IRI> precious, boolean repeat); static void copy(
      OWLOntology inputOntology,
      OWLOntology outputOntology,
      OWLEntity entity,
      Set<OWLAnnotationProperty> annotationProperties); static void copyAnnotations(
      OWLOntology inputOntology,
      OWLOntology outputOntology,
      OWLEntity entity,
      Set<OWLAnnotationProperty> annotationProperties); static Set<IRI> filterExistingTerms(
      OWLOntology ontology, Set<IRI> IRIs, boolean allowEmpty); static Set<IRI> filterExistingTerms(
      OWLOntology ontology, Set<IRI> IRIs, boolean allowEmpty, Imports imports); static Set<OWLObject> getNamedObjects(OWLOntology ontology); static Set<OWLObject> getNamedObjects(OWLAxiom axiom); static Set<IRI> getIRIsInSignature(OWLAxiom axiom); static Set<OWLObject> getObjects(OWLOntology ontology); static Set<OWLObject> getObjects(OWLAxiom axiom); static Set<OWLAxiom> getAnonymousAncestorAxioms(OWLOntology ontology, OWLEntity entity); static Set<OWLAxiom> getAnonymousDescendantAxioms(OWLOntology ontology, OWLEntity entity); static Set<OWLAxiom> getAnonymousEquivalentAxioms(OWLOntology ontology, OWLEntity entity); static Set<OWLAxiom> getAnonymousParentAxioms(OWLOntology ontology, OWLEntity entity); static Set<OWLAnnotationAssertionAxiom> getAnnotationAxioms(
      OWLOntology ontology, OWLAnnotationProperty property); static Set<OWLAnnotationAssertionAxiom> getAnnotationAxioms(
      OWLOntology ontology, OWLAnnotationProperty property, IRI subject); static Set<OWLAnnotationAssertionAxiom> getAnnotationAxioms(
      OWLOntology ontology, Set<OWLAnnotationProperty> properties, Set<IRI> subjects); static String getAnnotationString(
      OWLOntology ontology, OWLAnnotationProperty property, IRI subject); static String getAnnotationString(
      OWLOntology ontology, Set<OWLAnnotationProperty> properties, Set<IRI> subjects); static Set<String> getAnnotationStrings(
      OWLOntology ontology, OWLAnnotationProperty property, IRI subject); static Set<String> getAnnotationStrings(
      OWLOntology ontology, Set<OWLAnnotationProperty> properties, Set<IRI> subjects); static Set<OWLAnnotationValue> getAnnotationValues(
      OWLOntology ontology, OWLAnnotationProperty property, IRI subject); static Set<OWLAnnotationValue> getAnnotationValues(
      OWLOntology ontology, Set<OWLAnnotationProperty> properties, Set<IRI> subjects); static OWLEntity getEntity(OWLOntology ontology, IRI iri); static OWLEntity getEntity(OWLOntology ontology, IRI iri, boolean allowNull); static Set<OWLEntity> getEntities(OWLOntology ontology, Set<IRI> iris); static Set<OWLEntity> getEntities(OWLOntology ontology); static Set<IRI> getIRIs(OWLOntology ontology); static Function<OWLNamedObject, String> getLabelFunction(
      OWLOntology ontology, boolean useIriAsDefault); static Map<String, IRI> getLabelIRIs(OWLOntology ontology); static Map<IRI, String> getLabels(OWLOntology ontology); static OWLDatatype getType(OWLAnnotationValue value); static IRI getTypeIRI(OWLAnnotationValue value); static String getValue(OWLAnnotationValue value); static String getValue(OWLAnnotation annotation); static String getValue(OWLAnnotationAssertionAxiom axiom); static String getValue(Set<OWLAnnotation> annotations); static Set<String> getValues(Set<OWLAnnotation> annotations); static boolean extendsAxiomTypes(
      OWLAxiom axiom, Set<Class<? extends OWLAxiom>> axiomTypes); static boolean extendsAxiomTypes(
      Class<? extends OWLAxiom> axiom, Set<Class<? extends OWLAxiom>> axiomTypes); static void removeImports(OWLOntology ontology); static void removeOntologyAnnotations(OWLOntology ontology); static String renderManchester(OWLObject object, ShortFormProvider provider); static String renderManchester(
      OWLObject object, ShortFormProvider provider, RendererType rt); static void setOntologyIRI(
      OWLOntology ontology, String ontologyIRIString, String versionIRIString); static void setOntologyIRI(OWLOntology ontology, IRI ontologyIRI, IRI versionIRI); static void trimOntology(OWLOntology ontology);  }
@Test public void testGetValues() throws IOException { IRI iri = IRI.create(base + "simple.owl#test1"); OWLOntology simple = loadOntology("/simple.owl"); OWLDataFactory df = simple.getOWLOntologyManager().getOWLDataFactory(); Set<String> actual = OntologyHelper.getAnnotationStrings(simple, df.getRDFSLabel(), iri); Set<String> expected = new HashSet<>(); expected.add("Test 1"); expected.add("test one"); assertEquals(expected, actual); }