use of edu.stanford.bmir.protege.web.shared.dispatch.actions.GetOntologyAnnotationsResult in project webprotege by protegeproject.
the class GetOntologyAnnotationsActionHandler method execute.
@Nonnull
@Override
public GetOntologyAnnotationsResult execute(@Nonnull GetOntologyAnnotationsAction action, @Nonnull ExecutionContext executionContext) {
List<OWLAnnotation> result = new ArrayList<>(rootOntology.getAnnotations());
ImmutableList.Builder<PropertyAnnotationValue> annotationValues = ImmutableList.builder();
result.stream().map(annotation -> new PropertyAnnotationValue(renderingManager.getRendering(annotation.getProperty()), renderingManager.getRendering(annotation.getValue()), State.ASSERTED)).sorted(propertyValueComparator).forEach(annotationValues::add);
return new GetOntologyAnnotationsResult(annotationValues.build());
}
Aggregations