use of org.openforis.collect.designer.metamodel.AttributeType in project collect by openforis.
the class UIFieldView method getAttributeType.
public String getAttributeType() {
AttributeDefinition attrDef = uiObject.getAttributeDefinition();
AttributeType attrType = AttributeType.valueOf(attrDef);
return attrType.name();
}
use of org.openforis.collect.designer.metamodel.AttributeType in project collect by openforis.
the class UIColumnView method getAttributeType.
public String getAttributeType() {
AttributeDefinition attrDef = uiObject.getAttributeDefinition();
AttributeType attrType = AttributeType.valueOf(attrDef);
return attrType.name();
}
use of org.openforis.collect.designer.metamodel.AttributeType in project collect by openforis.
the class SchemaVM method getIcon.
public static String getIcon(SchemaNodeData data, boolean key, boolean calculated) {
SurveyObject surveyObject = data.getSurveyObject();
String imagesRootPath = NODE_TYPES_IMAGES_PATH;
if (surveyObject instanceof UITab) {
return imagesRootPath + "tab-small.png";
} else if (surveyObject instanceof EntityDefinition) {
return getEntityIcon((EntityDefinition) surveyObject);
} else if (key) {
return imagesRootPath + "key-small.png";
} else if (calculated) {
return imagesRootPath + "calculated-small.png";
} else {
AttributeType attributeType = AttributeType.valueOf((AttributeDefinition) surveyObject);
return getAttributeIcon(attributeType.name());
}
}
use of org.openforis.collect.designer.metamodel.AttributeType in project collect by openforis.
the class AttributeConversionVM method getAttributeTypes.
public List<String> getAttributeTypes() {
AttributeType currentType = AttributeType.valueOf(attributeDefinition);
AttributeType[] types = AttributeType.values();
List<String> typeLabels = new ArrayList<String>(types.length);
for (AttributeType type : types) {
if (type != currentType) {
typeLabels.add(type.getLabel());
}
}
return typeLabels;
}
use of org.openforis.collect.designer.metamodel.AttributeType in project collect by openforis.
the class AttributeVM method createFormObject.
@SuppressWarnings("unchecked")
@Override
protected FormObject<T> createFormObject() {
AttributeType attributeTypeEnum = AttributeType.valueOf(editedItem);
formObject = (AttributeDefinitionFormObject<T>) NodeDefinitionFormObject.newInstance(parentEntity, attributeTypeEnum);
return formObject;
}
Aggregations