use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityProxy method getChildrenMaxCount.
@ExternalizedProperty
public List<Integer> getChildrenMaxCount() {
List<Integer> result = new ArrayList<Integer>(availableChildDefinitions.size());
for (NodeDefinition childDefinition : availableChildDefinitions) {
Integer count = entity.getMaxCount(childDefinition);
result.add(count);
}
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityProxy method getChildrenMinCount.
@ExternalizedProperty
public List<Integer> getChildrenMinCount() {
List<Integer> result = new ArrayList<Integer>(availableChildDefinitions.size());
for (NodeDefinition childDefinition : availableChildDefinitions) {
int count = entity.getMinCount(childDefinition);
result.add(count);
}
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityProxy method getChildrenMinCountValidation.
@ExternalizedProperty
public List<ValidationResultFlag> getChildrenMinCountValidation() {
List<ValidationResultFlag> result = new ArrayList<ValidationResultFlag>(availableChildDefinitions.size());
for (NodeDefinition childDefinition : availableChildDefinitions) {
ValidationResultFlag valid = entity.getMinCountValidationResult(childDefinition);
result.add(valid);
}
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class CoordinateAttributeDefinitionProxy method getFieldsOrder.
@ExternalizedProperty
public CoordinateAttributeFieldsOrder getFieldsOrder() {
CollectSurvey survey = (CollectSurvey) nodeDefinition.getSurvey();
UIOptions uiOptions = survey.getUIOptions();
return uiOptions.getFieldsOrder((CoordinateAttributeDefinition) nodeDefinition);
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class AttributeDefinitionProxy method getVisibleFieldIndexes.
@ExternalizedProperty
public List<Integer> getVisibleFieldIndexes() {
List<Integer> result = new ArrayList<Integer>();
UIOptions uiOptions = getUIOptions();
String[] fieldNames = uiOptions.getVisibleFields(attributeDefinition);
for (String fieldName : fieldNames) {
int fieldIdx = attributeDefinition.getFieldNames().indexOf(fieldName);
if (fieldIdx < 0) {
throw new IllegalStateException(String.format("Field %s not found in attribute definition %s", fieldName, attributeDefinition.getName()));
}
result.add(fieldIdx);
}
return result;
}
Aggregations