how to get annotation value from an owl ontology in OWL API with java

Viewed 21

i used this code to get owl annotation.

public LinkedList<String> getFuzzyDataTypes(){


for (OWLDatatype d : ontology.getDatatypesInSignature(true)) {
for (OWLAnnotation annotation1 : d.getAnnotations(ontology)) {
     
if ((annotation1.getProperty().getIRI().getFragment().contains("fuzzyLabel"))){
//fuzzydatatypes.add(d.getIRI().getFragment());
OWLLiteral literal = (OWLLiteral) annotation1.getValue();
        String literalString = literal.getLiteral();
        fuzzydatatypes.add(literalString);

}
}}
 
 return fuzzydatatypes;

}

and the result of this code is: enter image description here

Please how can i get the type and the values a,b, and c from this result.

0 Answers
Related