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

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


    });
   
    TreeNode root = new TreeNode();
    root.setText(getProject().getDisplayName());
    root.setId(getProjectId().getId());
    root.setUserObject(new EntityData(getProjectId().getId(), getProject().getDisplayName()));

    importsTree.setRootNode(root);
    importsTree.setRootVisible(true);

    add(importsTree);
View Full Code Here


            Button selectButton = new Button("Select", new ButtonListenerAdapter() {
                @Override
                public void onClick(Button button, EventObject e) {
                    Collection<EntityData> selection = SelectionDialog.this.selectable.getSelection();
                    if (selection != null && selection.size() > 0) {
                        EntityData singleSelection = selection.iterator().next();
                        SelectionDialog.this.parent.close();
                        onChangeValue(getSubject(), UIUtil.getFirstItem(getValues()), singleSelection);
                    }
                }
            });
View Full Code Here

 
  private void addImports(ImportsData data, TreeNode node) {
    String nodeName = data.getName();
    node.setText(nodeName);
    node.setId(nodeName);
    node.setUserObject(new EntityData(data.getName(), data.getName()));
   
    ArrayList<ImportsData> imports = data.getImports();
    for (ImportsData importData : imports) {
      TreeNode childNode = new TreeNode();
      addImports(importData, childNode);
View Full Code Here

    private void updateDisplayForSelectedEntity() {
        store.removeAll();

        String entityName = "";

        EntityData entity = getEntity();

        if (entity != null) {
            entityName = entity.getName();
            setTitle("Change history for " + UIUtil.getDisplayText(getEntity()));
        } else {
            setTitle("Change history (nothing selected)");
        }
View Full Code Here

            oldVal = UIUtil.getFirstItem(values);
        }

        if (UIUtil.getDisplayText(oldVal).length() == 0) {
            if (UIUtil.getDisplayText(newVal).length() > 0) {
                EntityData newValEntityData = convertToEntityData(newVal);
                addPropertyValue(subj, getProperty().getName(), getProperty().getValueType(),
                        newValEntityData, oldVal, getAddValueOperationDescription(subj, newValEntityData));
            }
        }
        else if (UIUtil.getDisplayText(newVal).length() == 0) {
            EntityData oldValEntityData = convertToEntityData(oldVal);
            deletePropertyValue(subj, getProperty().getName(), getProperty().getValueType(),
                    oldValEntityData, oldVal, getDeleteValueOperationDescription());
        }
        else {
            EntityData oldValEntityData = convertToEntityData(oldVal);
            EntityData newValEntityData = convertToEntityData(newVal);

            replacePropertyValue(subj, getProperty().getName(), getProperty().getValueType(),
                    oldValEntityData, newValEntityData, oldVal,
                    getReplaceValueOperationDescription(subj,
                            oldValEntityData, newValEntityData));
View Full Code Here

            else {
                return convertToEntityData(collectionFieldValue.iterator().next());
            }
        }

        return new EntityData(UIUtil.getDisplayText(fieldValue));
    }
View Full Code Here

    }

    protected Anchor createCommentHyperLink() {
        String text = "<img src=\"images/comment.gif\" title=\""
                + "Add a comment on this value\" " + AbstractPropertyWidgetWithNotes.COMMENT_ICON_STYLE_STRING + "></img>";
        EntityData value = UIUtil.getFirstItem(values);
        int annotationsCount = (value == null ? 0 : value.getLocalAnnotationsCount());
        if (annotationsCount > 0) {
            text = "<img src=\"images/comment.gif\" title=\""
                    + UIUtil.getNiceNoteCountText(annotationsCount)
                    + " on this value. \nClick on the icon to see existing or to add new note(s).\" " + AbstractPropertyWidgetWithNotes.COMMENT_ICON_STYLE_STRING + "></img>"
                    + "<span style=\"vertical-align:super;font-size:95%;color:#15428B;font-weight:bold;\">"
View Full Code Here

        OWLEntity entity = event.getEntity();
        TreeNode treeNode = findTreeNode(entity);
        if(treeNode != null) {
            final Object userObject = treeNode.getUserObject();
            if (userObject instanceof EntityData) {
                EntityData entityData = (EntityData) userObject;
                entityData.setBrowserText(event.getNewBrowserText());
                treeNode.setText(getNodeText(entityData));
            }

        }
    }
View Full Code Here

    }

    protected void onImportReference(Record record) {
        BioPortalReferenceData bpRefData = createBioPortalReferenceDataFromRecord(record);
        if(replaceExisting && isSingleValued){
            EntityData oldValueEntityData = new EntityData(currentValue);
            OntologyServiceManager.getInstance().replaceExternalReference(projectId, currentEntity.getName(), bpRefData,
                    oldValueEntityData, Application.get().getUserId(),
                    getReplaceReferenceApplyToString(bpRefData, oldValueEntityData),
                    getImportBioPortalConceptHandler());
        } else {
View Full Code Here

        if (property.getValueType() == ValueType.Instance) {
            //FIXME This solution will not work when multiple property values are specified:
            //  it will add the comment always to the first instance.
            //  This method should be generalized OR overwritten in subclasses that can deal
            //  with multiple property values.
            EntityData firstValue = UIUtil.getFirstItem(getValues());
            if (firstValue != null) {
                annotEntityName = firstValue.getName();
            }
            onEditNotes(annotEntityName);
        }
        else {
            //TODO this is a hack. Fix it when the Changes API will provide
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.