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

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


    public void deletePropertyValue(ProjectId projectId, String entityName, String propName, ValueType propValueType,
            String value, UserId userId, String operationDescription, AsyncCallback<Void> asyncCallback) {
        EntityData oldEntityData = new EntityData(value);
        oldEntityData.setValueType(propValueType);
        OntologyServiceManager.getInstance().removePropertyValue(projectId, entityName,
                new PropertyEntityData(propName), oldEntityData, userId, operationDescription,
                new RemovePropertyValueHandler(entityName, propName, asyncCallback));
    }
View Full Code Here


        EntityData oldEntityData = new EntityData(oldValue);
        oldEntityData.setValueType(propValueType);
        EntityData newEntityData = new EntityData(newValue);
        newEntityData.setValueType(propValueType);
        OntologyServiceManager.getInstance().replacePropertyValue(projectId, entityName,
                new PropertyEntityData(propName), oldEntityData, newEntityData, userId, operationDescription,
                new ReplacePropertyValueHandler(entityName, propName, newEntityData, asyncCallback));
    }
View Full Code Here

        }
        else {
            newEntityData = null;
        }
        OntologyServiceManager.getInstance().setPropertyValues(projectId, entityName,
                new PropertyEntityData(propName), newEntityData, userId, operationDescription,
                new SetPropertyValuesHandler(entityName, propName, newEntityData, asyncCallback));
    }
View Full Code Here

    public void addPropertyValue(ProjectId projectId, String entityName, String propName, ValueType propValueType,
            String newValue, UserId userId, String operationDescription, AsyncCallback<Void> asyncCallback) {
        EntityData newEntityData = new EntityData(newValue);
        newEntityData.setValueType(propValueType);
        OntologyServiceManager.getInstance().addPropertyValue(projectId, entityName,
                new PropertyEntityData(propName), newEntityData, userId, operationDescription,
                new AddPropertyValueHandler(entityName, propName, asyncCallback));
    }
View Full Code Here

//    public EntityData getEntityData(IRI entityIRI) {
//        return getEntityData(entityIRI.toString());
//    }

    public PropertyEntityData getPropertyEntityData(OWLEntity entity) {
        final PropertyEntityData entityData = new PropertyEntityData(entity.getIRI().toString());
        // Don't know if this is correct.
        entityData.setBrowserText(getShortForm(entity));
        entity.accept(new OWLEntityVisitor() {
            public void visit(OWLClass owlClass) {
            }

            public void visit(OWLObjectProperty owlObjectProperty) {
                entityData.setPropertyType(PropertyType.OBJECT);
                // Correct or not? Grrrrr
                entityData.setValueType(ValueType.Instance);
            }

            public void visit(OWLDataProperty owlDataProperty) {
                entityData.setPropertyType(PropertyType.DATATYPE);
                // Correct or not? Grrrrr
                entityData.setValueType(ValueType.Literal);
            }

            public void visit(OWLNamedIndividual owlNamedIndividual) {
            }

            public void visit(OWLDatatype owlDatatype) {
            }

            public void visit(OWLAnnotationProperty owlAnnotationProperty) {
                // Correct or not? Grrrrr
                entityData.setPropertyType(PropertyType.ANNOTATION);
                entityData.setValueType(ValueType.Any);
            }
        });
        return entityData;
    }
View Full Code Here

        switch (valueType) {
            case Cls:
                return getEntity(entityData.getName(), EntityType.CLASS);
            case Property:
                if(entityData instanceof PropertyEntityData) {
                    PropertyEntityData ped = (PropertyEntityData) entityData;
                    PropertyType propertyType = ped.getPropertyType();
                    if(propertyType == PropertyType.OBJECT) {
                        return getEntity(entityData.getName(), EntityType.OBJECT_PROPERTY);
                    }
                    else if(propertyType == PropertyType.DATATYPE) {
                        return getEntity(entityData.getName(), EntityType.DATA_PROPERTY);
View Full Code Here

        if (allowedValues != null && !allowedValues.isEmpty()) {
            type = allowedValues.iterator().next().getName();
        }

        OntologyServiceManager.getInstance().createInstanceValueWithPropertyValue(getProjectId(), null, type,
            subject.getName(), propName, new PropertyEntityData(property), newEntityData,
            Application.get().getUserId(), operationDescription,
            new AddInstanceValueWithPropertyValueHandler(subject, newEntityData, getValues()));
    }
View Full Code Here

    }


    protected PropertyWidget createTextField(Map<String, Object> conf, String property) {
        TextFieldWidget textFieldWidget = new TextFieldWidget(project);
        textFieldWidget.setup(conf, new PropertyEntityData(property));
        return textFieldWidget;
    }
View Full Code Here

        return textFieldWidget;
    }

    protected ClassSelectionFieldWidget createClassSelectionField(Map<String, Object> conf, String property) {
        ClassSelectionFieldWidget widget = new ClassSelectionFieldWidget(project);
        widget.setup(conf, new PropertyEntityData(property));
        return widget;
    }
View Full Code Here

        return widget;
    }

    protected PropertySelectionFieldWidget createPropertySelectionField(Map<String, Object> conf, String property) {
        PropertySelectionFieldWidget widget = new PropertySelectionFieldWidget(project);
        widget.setup(conf, new PropertyEntityData(property));
        return widget;
    }
View Full Code Here

TOP

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

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.