use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityProxy method getChildrenByDefinitionId.
@ExternalizedProperty
public Map<Integer, List<NodeProxy>> getChildrenByDefinitionId() {
Map<Integer, List<NodeProxy>> result = new HashMap<Integer, List<NodeProxy>>();
for (NodeDefinition childDefinition : availableChildDefinitions) {
List<Node<?>> nodes = this.entity.getChildren(childDefinition);
List<NodeProxy> proxies = NodeProxy.fromList(this, nodes, context);
result.put(childDefinition.getId(), proxies);
}
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityProxy method getChildrenMaxCountValidation.
@ExternalizedProperty
public List<ValidationResultFlag> getChildrenMaxCountValidation() {
List<ValidationResultFlag> result = new ArrayList<ValidationResultFlag>(availableChildDefinitions.size());
for (NodeDefinition childDefinition : availableChildDefinitions) {
ValidationResultFlag valid = entity.getMaxCountValidationResult(childDefinition);
result.add(valid);
}
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class SchemaProxy method getKeyAttributeDefinitionIdsByRootEntityId.
@ExternalizedProperty
public Map<Integer, List<Integer>> getKeyAttributeDefinitionIdsByRootEntityId() {
Map<Integer, List<Integer>> result = new HashMap<Integer, List<Integer>>();
List<EntityDefinition> rootEntityDefinitions = schema.getRootEntityDefinitions();
for (EntityDefinition rootEntity : rootEntityDefinitions) {
List<Integer> keyDefnIds = new ArrayList<Integer>();
List<AttributeDefinition> keyDefns = rootEntity.getKeyAttributeDefinitions();
for (AttributeDefinition keyDefn : keyDefns) {
keyDefnIds.add(keyDefn.getId());
}
result.put(rootEntity.getId(), keyDefnIds);
}
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class CodeAttributeProxy method getCodeListItem.
@ExternalizedProperty
public CodeListItemProxy getCodeListItem() {
if (isEnumerator()) {
CodeListService codeListManager = getCodeListService();
CodeListItem codeListItem = codeListManager.loadItem(codeAttribute);
return codeListItem == null ? null : new CodeListItemProxy(codeListItem);
} else {
return null;
}
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityProxy method getChildrenRelevance.
@ExternalizedProperty
public List<Boolean> getChildrenRelevance() {
List<Boolean> result = new ArrayList<Boolean>(availableChildDefinitions.size());
for (NodeDefinition childDefinition : availableChildDefinitions) {
boolean relevant = entity.isRelevant(childDefinition);
result.add(relevant);
}
return result;
}
Aggregations