Examples of EntityData


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

    @Override
    protected void displayValues(Collection<EntityData> values) {
        List<EntityData> dispValues = new ArrayList<EntityData>();
        if (values != null) {
            for (EntityData value : values) {
                EntityData displayValue = valuesToDisplayValuesMap.get(value);
                if (displayValue != null) {
                    dispValues.add(displayValue);
                }
                else {
                    GWT.log("No display text for instance property value: " + value);
View Full Code Here

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

        }
    }


    protected EntityData findInstanceForValue(EntityData displayValueEntityData) {
        EntityData instanceValueEntityData = null;
        //try to find the value that has the display text
        for (EntityData value : getValues()) {
            if (valuesToDisplayValuesMap.get(value).equals(displayValueEntityData)) {
                instanceValueEntityData = value;
                break;
View Full Code Here

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

    @Override
    protected void deletePropertyValue(EntityData subject, String propName, ValueType propValueType,
            EntityData oldEntityData, Object oldBrowserText, String operationDescription) {
       
        EntityData oldInstanceEntityData = findInstanceForValue(oldEntityData);
       
        //overwrite the oldEntityData that has been created from the display text,
        //with a (hopefully correctly identified) instance value
        if (oldInstanceEntityData != null) {
            oldEntityData = oldInstanceEntityData;  //FIXME Check this!!!
View Full Code Here

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

    @Override
    protected void replacePropertyValue(EntityData subject, String propName, ValueType propValueType,
            EntityData oldEntityData, EntityData newEntityData, Object oldDisplayedValue, String operationDescription) {
       
        EntityData oldInstanceEntityData = findInstanceForValue(oldEntityData);
       
        if (oldInstanceEntityData != null) {
            propertyValueUtil.replacePropertyValue(getProjectId(), oldInstanceEntityData.getName(),
                    property, null, oldEntityData.getName(), newEntityData.getName(),
                    Application.get().getUserId(), operationDescription,
                    new ReplaceInstancePropertyValueHandler(subject, oldInstanceEntityData,
                            oldEntityData, newEntityData, getValues()));
        }
View Full Code Here

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

    protected void onAddExistingValue() {
        String type = UIUtil.getStringConfigurationProperty(getWidgetConfiguration(), FormConstants.ONT_TYPE, null);
        if (type == null) { return} //TODO: not type specified, maybe use range of property

        SelectionUtil.selectIndividuals(getProject(), UIUtil.createCollection(new EntityData(type)), true, false, new SelectionCallback() {
            public void onSelect(Collection<EntityData> selection) {
                addExistingValues(selection);
            }
        });
    }
View Full Code Here

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

                    properties.get(colIndex), ValueType.valueOf(valueType),
                            oldValue == null ? null : oldValue.toString(),
                            newValue == null ? null : newValue.toString(),
                            Application.get().getUserId(),
                            getReplaceValueOperationDescription(colIndex, oldValue, newValue),
                            new ReplacePropertyValueHandler(new EntityData(newValue == null ? null : newValue.toString(), newValue == null ? null : newValue.toString())));
        }
    }
View Full Code Here

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

        for(String shortForm : shortForms) {
            Matcher matcher = pattern.matcher(shortForm);
            if(matcher.find()) {
                Set<OWLEntity> entities = sfp.getEntities(shortForm);
                for(OWLEntity entity : entities) {
                    EntityData entityData = rm.getEntityData(entity);
                    result.add(entityData);
                }
            }
        }
        Collections.sort(result, new Comparator<EntityData>() {
            @Override
            public int compare(EntityData entityData, EntityData entityData2) {
                String browserText1 = entityData.getBrowserText();
                String browserText2 = entityData2.getBrowserText();
                if (browserText1 == null) {
                    if(browserText2 == null) {
                        return 0;
                    }
View Full Code Here

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

    protected void valueChanged(CheckBox checkBox) {
        if (isWriteOperationAllowed()) {
            String newValue = checkBox.getElement().getId();
            if (checkBox.getValue() == true) {
                addPropertyValue(getSubject().getName(), getProperty().getName(), ValueType.Instance, new EntityData(newValue),
                    getAddValueOperationDescription(newValue, checkBox.getText()));
            }
            else {
                removePropertyValue(getSubject().getName(), getProperty().getName(), ValueType.Instance, new EntityData(newValue),
                        getRemoveValueOperationDescription(newValue, checkBox.getText()));
            }

        } else {
            refresh();
View Full Code Here

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

        Map<String, String> allowedValuesMap = UIUtil.getAllowedValuesConfigurationProperty(widgetConfiguration);
        List<EntityData> allowedValues = null;
        if (allowedValuesMap != null) {
            allowedValues = new ArrayList<EntityData>(allowedValuesMap.size());
            for (String allowedValueLabel : allowedValuesMap.keySet()) {
                EntityData entityData = new EntityData(allowedValuesMap.get(allowedValueLabel), allowedValueLabel);
                entityData.setValueType(ValueType.Instance);
                allowedValues.add(entityData);
            }
        }
        propertyEntityData.setAllowedValues(allowedValues);
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.