Package edu.stanford.bmir.protege.web.client.rpc.data

Examples of edu.stanford.bmir.protege.web.client.rpc.data.EntityData


            return; // nothing to do
        }

        //TODO: implement multiple selection

        EntityData selection = null;
        if (newSelection != null && newSelection.size() > 0) {
            selection = newSelection.iterator().next();
        }

        for (final EntityPortlet portlet : getPortlets()) {
View Full Code Here


        if (showClsesPanel) {
            Panel clsesPanel = createClsesPanel();
            add(clsesPanel, new ColumnLayoutData(0.5));
        } else {
            EntityData firstItem = UIUtil.getFirstItem(clses);
            indListPorlet.setEntity(firstItem); //TODO: handle multiple classes
        }
    }
View Full Code Here

       indPortlet.setHeight(390);
        return indPortlet;
    }

    protected ClassTreePortlet createClassTreePortlet(boolean allClasses) {
        EntityData topCls = allClasses ? null : UIUtil.getFirstItem(clses);
        ClassTreePortlet clsPortlet = new ClassTreePortlet(project, true, true, true, allowMultipleSelection, topCls == null null : topCls.getName());
        clsPortlet.setDraggable(false);
        clsPortlet.setClosable(false);
        clsPortlet.setCollapsible(false);
        clsPortlet.setHeight(390);
        clsPortlet.setWidth(375);
View Full Code Here

    }

    protected void updateTitle() {
        StringBuilder sb = new StringBuilder();
        sb.append("Relationships");
        EntityData currentEntity = getEntity();
        if(currentEntity != null) {
            sb.append(" for ");
            sb.append(currentEntity.getBrowserText());
        }
        setTitle(sb.toString());
    }
View Full Code Here

    }

    private void onMove() {
        final Set<EntityData> parentsToAdd = parentsPanel.getParentsToAdd();
        final Set<EntityData> parentsToRemove = parentsPanel.getParentsToRemove();
        EntityData clsValue = classField.getClsValue();
        final String clsName = clsValue == null ? null : clsValue.getName();
        final String reasonForChange = reasonField.getValueAsString();

        if (clsName == null) {
            MessageBox.alert("No class selected", "No class to move in hierarchy is selected." +
                "<br />Please select a class in the <i>Class to move in hierarchy</i> field.");
View Full Code Here

                    final Collection<EntityData> selected = selectable.getSelection();

                    for (EntityData data : selected) {
                        final BioPortalReferenceData bpRefData = createBioPortalReferenceData(data);
                        if (isReplace()){
                           EntityData oldValueEntityData = new EntityData(store.getAt(0).getAsString(INSTANCE_FIELD_NAME));
                            OntologyServiceManager.getInstance().replaceExternalReference(
                                getProjectId(),
                                getSubject().getName(),
                                bpRefData,
                                    oldValueEntityData,
View Full Code Here

        doLayout();
    }

    @Override
    protected void handleAfterSetEntity(Optional<OWLEntityData> ed) {
        EntityData entityData = getEntity();
        if (selectable != null) {
            selectable.setSelection(UIUtil.createCollection(entityData));
        }
    }
View Full Code Here

    public List<EntityData> getSelection() {
        Optional<OWLNamedIndividualData> selection = individualsList.getSelectedEntity();
        if(selection.isPresent()) {
            List<EntityData> result = new ArrayList<EntityData>();
            OWLNamedIndividual entity = selection.get().getEntity();
            EntityData entityData = new EntityData(entity.getIRI().toString(), selection.get().getBrowserText());
            entityData.setValueType(ValueType.Instance);
            result.add(entityData);
            return result;
        }
        else {
            return Collections.emptyList();
View Full Code Here

        if (clsTreePortlet != null && indListPorlet != null) {
            clsTreePortlet.addSelectionListener(new SelectionListener() {
                public void selectionChanged(SelectionEvent event) {
                    List<EntityData> clsSel = clsTreePortlet.getSelection();
                    if (!clsSel.isEmpty()) {
                        EntityData selection = clsSel.get(0);
                        clsTreePortlet.setEntity(selection); //might cause later infinite cycles, if anything will happen in setEntity
                        Collection<EntityPortlet> portlets = getPortlets();
                        for (EntityPortlet portlet : portlets) {
                            portlet.setEntity(selection);
                        }
View Full Code Here

        clsTreePortlet.setSelection(selection);

        // Then, try the instance selection

        //TODO: support multiple selection
        final EntityData individual = selection.iterator().next();
        OntologyServiceManager.getInstance().getDirectTypes(this.project.getProjectId(), individual.getName(),
                new AbstractAsyncHandler<List<EntityData>>() {
            @Override
            public void handleFailure(Throwable caught) {
                GWT.log("Could not select " + individual);
            }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.client.rpc.data.EntityData

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.