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

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


    }

    @Override
    protected GetObjectResult<LabelledFrame<DataPropertyFrame>> execute(GetDataPropertyFrameAction action, OWLAPIProject project, ExecutionContext executionContext) {
        DataPropertyFrameTranslator translator = new DataPropertyFrameTranslator();
        final DataPropertyFrame frame = translator.getFrame(action.getSubject(), project.getRootOntology(), project);
        String displayName = project.getRenderingManager().getBrowserText(action.getSubject());
        BrowserTextMap btm = BrowserTextMap.build(project.getRenderingManager(), frame.getSignature().toArray());
        return new RenderableGetObjectResult<LabelledFrame<DataPropertyFrame>>(new LabelledFrame<DataPropertyFrame>(displayName, frame), btm);
    }
View Full Code Here


    @Override
    public void setValue(LabelledFrame<DataPropertyFrame> object) {
        dirty = false;
        displayNameField.setText(object.getDisplayName());
        final DataPropertyFrame 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 (OWLClass 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 (OWLDatatype dt : frame.getRanges()) {
                    final Optional<OWLEntityData> entityData = result.getEntityData(dt);
                    if (entityData.isPresent()) {
                        primitiveDatas.add(entityData.get());
                    }
                }
                ranges.setValue(primitiveDatas);
            }
        });
        functionalCheckBox.setValue(frame.isFunctional());


    }
View Full Code Here

        if (ranges.getValue().isPresent()) {
            for(OWLPrimitiveData primitiveData : ranges.getValue().get()) {
                rangeTypes.add(((OWLDatatypeData) primitiveData).getEntity());
            }
        }
        DataPropertyFrame frame = new DataPropertyFrame(property, annotations.getValue().get(), domainsClasses, rangeTypes, functionalCheckBox.getValue());
        return Optional.of(new LabelledFrame<DataPropertyFrame>(getDisplayName(), frame));
    }
View Full Code Here

TOP

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

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.