Package edu.stanford.bmir.protege.web.shared.frame

Examples of edu.stanford.bmir.protege.web.shared.frame.AnnotationPropertyFrame


    }

    @Override
    protected GetObjectResult<LabelledFrame<AnnotationPropertyFrame>> execute(GetAnnotationPropertyFrameAction action, OWLAPIProject project, ExecutionContext executionContext) {
        AnnotationPropertyFrameTranslator translator = new AnnotationPropertyFrameTranslator();
        AnnotationPropertyFrame frame = translator.getFrame(action.getSubject(), project.getRootOntology(), project);
        LabelledFrame<AnnotationPropertyFrame> labelledFrame = new LabelledFrame<AnnotationPropertyFrame>(project.getRenderingManager().getBrowserText(action.getSubject()), frame);
        return new RenderableGetObjectResult<LabelledFrame<AnnotationPropertyFrame>>(labelledFrame, BrowserTextMap.build(project.getRenderingManager(), frame.getSignature().toArray()));
    }
View Full Code Here


            }
            for(OWLAnnotationPropertyRangeAxiom ax : ont.getAnnotationPropertyRangeAxioms(subject)) {
                ranges.addAll(rootOntology.getEntitiesInSignature(ax.getRange()));
            }
        }
        return new AnnotationPropertyFrame(subject, propertyValues, domains, ranges);
    }
View Full Code Here

    @Override
    public void setValue(LabelledFrame<AnnotationPropertyFrame> object) {
        dirty = false;
        displayNameField.setText(object.getDisplayName());
        final AnnotationPropertyFrame frame = object.getFrame();
        iriField.setText(frame.getSubject().getIRI().toString());
        annotations.setValue(frame.getPropertyValueList());
        RenderingServiceManager.getManager().execute(new GetRendering(projectId, frame.getDomains()), new AsyncCallback<GetRenderingResponse>() {
            @Override
            public void onFailure(Throwable caught) {
            }

            @Override
            public void onSuccess(GetRenderingResponse result) {
                List<OWLPrimitiveData> primitiveDatas = new ArrayList<OWLPrimitiveData>();
                for (OWLEntity cls : frame.getDomains()) {
                    final Optional<OWLEntityData> entityData = result.getEntityData(cls);
                    if (entityData.isPresent()) {
                        primitiveDatas.add(entityData.get());
                    }
                }
                domains.setValue(primitiveDatas);
            }
        });
        RenderingServiceManager.getManager().execute(new GetRendering(projectId, frame.getRanges()), new AsyncCallback<GetRenderingResponse>() {
            @Override
            public void onFailure(Throwable caught) {
            }

            @Override
            public void onSuccess(GetRenderingResponse result) {
                List<OWLPrimitiveData> primitiveDatas = new ArrayList<OWLPrimitiveData>();
                for (OWLEntity dt : frame.getRanges()) {
                    final Optional<OWLEntityData> entityData = result.getEntityData(dt);
                    if (entityData.isPresent()) {
                        primitiveDatas.add(entityData.get());
                    }
                }
View Full Code Here

        }
        final Set<OWLEntity> rangeTypes = Sets.newHashSet();
        for(OWLPrimitiveData data : ranges.getValue().get()) {
            rangeTypes.add((OWLEntity) data.getObject());
        }
        AnnotationPropertyFrame frame = new AnnotationPropertyFrame(property, annotations.getValue().get().getAnnotationPropertyValues(), domainsClasses, rangeTypes);
        return Optional.of(new LabelledFrame<AnnotationPropertyFrame>(getDisplayName(), frame));
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.frame.AnnotationPropertyFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.