Search in sources :

Example 1 with GetAnnotationPropertyFrameResult

use of edu.stanford.bmir.protege.web.shared.frame.GetAnnotationPropertyFrameResult in project webprotege by protegeproject.

the class GetAnnotationPropertyFrameActionHandler method execute.

@Nonnull
@Override
public GetAnnotationPropertyFrameResult execute(@Nonnull GetAnnotationPropertyFrameAction action, @Nonnull ExecutionContext executionContext) {
    AnnotationPropertyFrameTranslator translator = new AnnotationPropertyFrameTranslator(renderingManager, rootOntology);
    AnnotationPropertyFrame frame = translator.getFrame(renderingManager.getRendering(action.getSubject()));
    String label = renderingManager.getBrowserText(action.getSubject());
    LabelledFrame<AnnotationPropertyFrame> labelledFrame = new LabelledFrame<>(label, frame);
    logger.info(BROWSING, "{} {} retrieved AnnotationProperty frame for {} ({})", action.getProjectId(), executionContext.getUserId(), action.getSubject(), labelledFrame.getDisplayName());
    return new GetAnnotationPropertyFrameResult(labelledFrame);
}
Also used : LabelledFrame(edu.stanford.bmir.protege.web.shared.frame.LabelledFrame) GetAnnotationPropertyFrameResult(edu.stanford.bmir.protege.web.shared.frame.GetAnnotationPropertyFrameResult) AnnotationPropertyFrame(edu.stanford.bmir.protege.web.shared.frame.AnnotationPropertyFrame) Nonnull(javax.annotation.Nonnull)

Aggregations

AnnotationPropertyFrame (edu.stanford.bmir.protege.web.shared.frame.AnnotationPropertyFrame)1 GetAnnotationPropertyFrameResult (edu.stanford.bmir.protege.web.shared.frame.GetAnnotationPropertyFrameResult)1 LabelledFrame (edu.stanford.bmir.protege.web.shared.frame.LabelledFrame)1 Nonnull (javax.annotation.Nonnull)1