Examples of EntityData


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

                public void onAfterEdit(GridPanel grid, Record record, String field, Object newValueO, Object oldValueO,
                        int rowIndex, int colIndex) {
                    // special handling rdfs:Literal

                    // TODO:
                    EntityData rowEntity = (EntityData) record.getAsObject(VALUE);
                    ValueType valueTypeT = rowEntity == null ? null : rowEntity.getValueType();

                    String oldPropValue = null;
                    String newPropValue = null;

                    String newValueS = newValueO.toString();
View Full Code Here

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

    public Collection<EntityData> getSelection() {
        return currentSelection;
    }

    protected void onDelete(Record record) {
        EntityData valueEd = ((EntityData) record.getAsObject(VALUE));
        String value = valueEd.getName();
        if (valueEd == null || value == null) {
            return; //nothing to delete
        }

        ValueType valueType = valueEd.getValueType();
        String lang = record.getAsString(LANGUAGE);
        if (lang != null && lang.length() > 0) {
            valueType = ValueType.Literal; //TODO: check if necessary
        }
        PropertyEntityData prop = (PropertyEntityData) (record.getAsObject(PROPERTY));
View Full Code Here

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

        @Override
        public void handleSuccess(List<Triple> triples) {
            store.removeAll();
            if (triples == null) {return;}
            for (Triple triple : triples) {
                EntityData value = triple.getValue();
                String str = value.getName();
                String lan = "";
                if (isLiteralWithLang(str)) {
                    lan = getLang(str);
                    str = getText(str);
                } else {
View Full Code Here

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

            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();
                        addEmptyPropertyRow((PropertyEntityData) singleSelection);
                    }
                }
            });
View Full Code Here

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

    public Optional<OWLEntityData> getSelectedEntityData() {
        Collection<EntityData> selection = getSelection();
        // Not sure what the difference is here
        if(selection == null || selection.isEmpty()) {
            EntityData entityData = getEntity();
            if(entityData != null) {
                selection = Collections.singleton(entityData);
            }
        }

        if(selection == null) {
            return Optional.absent();
        }
        if(selection.isEmpty()) {
            return Optional.absent();
        }
        EntityData entityData = selection.iterator().next();
        return toOWLEntityData(entityData);
    }
View Full Code Here

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

                }
            }
        }
        else {
            for(OWLIndividual individual : cls.getIndividuals(rootOntology.getImportsClosure())) {
                EntityData entityData = null;
                if(individual.isAnonymous()) {
                    entityData = rm.getEntityData(individual.asOWLAnonymousIndividual());
                }
                else {
                    entityData = rm.getEntityData(individual.asOWLNamedIndividual());
View Full Code Here

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

    public List<Triple> getAnnotationAssertionTriples() {
        List<Triple> result = new ArrayList<Triple>();
        for (OWLOntology ontology : getRootOntologyImportsClosure()) {
            for(OWLAnnotationAssertionAxiom ax : ontology.getAnnotationAssertionAxioms(entity.getIRI())) {
                RenderingManager rm = getRenderingManager();
                EntityData subjectData = rm.getEntityData(entity);
                PropertyEntityData propData = rm.getPropertyEntityData(ax.getProperty());
                EntityData valueData = rm.getEntityData(ax.getValue());
                Triple triple = new Triple(subjectData, propData, valueData);
                result.add(triple);
            }
        }
        return result;
View Full Code Here

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

                // children are already fetched? Maybe?
                // TODO: think about this situation

                if (getSubpropertiesOfSubproperties) {
                    for (Object element2 : children) {
                        EntityData child = (EntityData) element2;
                        getSubProperties(child.getName(), false);
                    }
                }
                return;
            }

            for (Object element2 : children) {
                EntityData childData = (EntityData) element2;

                // if (!hasChild(clsName, childName)) {
                parentNode.appendChild(createTreeNode(childData));
                // }
            }

            if (getSubpropertiesOfSubproperties) {
                for (Object element2 : children) {
                    EntityData childName = (EntityData) element2;
                    getSubProperties(childName.getName(), false);
                }
            }
        }
View Full Code Here

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

            public boolean doBeforeSelect(ComboBox comboBox, Record record, int index) {
                if (!isWriteOperationAllowed()) {
                    return false;
                }
                int oldIndex = store.find(ENTITY_NAME_FIELD, comboBox.getValue(), 0, true, true);
                EntityData oldValueEd = new EntityData(comboBox.getValue(), oldIndex >= 0 ? store.getAt(oldIndex).getAsString(BROWSER_TEXT_FIELD) : null);
                EntityData newValue = new EntityData(record.getAsString(ENTITY_NAME_FIELD), record.getAsString(BROWSER_TEXT_FIELD));
                onChangeValue(getSubject(), oldValueEd, newValue);
                return true;
            }
        });
    }
View Full Code Here

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

    protected void displayValues(Collection<EntityData> values) {
        if (values == null || values.size() == 0) {
            comboBox.clearValue();
        } else {
            //FIXME: for now only deal with one value
            EntityData value = values.iterator().next();
            if (value != null) {
                comboBox.setValue(value.getName());
            } else {
                comboBox.clearValue();
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.