Ticket #88 (assigned enhancement)
Simplify sequence node naming and manipulation in script
| Reported by: | dumoulin | Owned by: | dumoulin |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.4 |
| Component: | core | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by dumoulin) (diff)
A sequence node is named by its nested node (recursively if it is a sequence node). For example, if I create such a structure :
ComplexNode : "myStructure"
\__ SequenceNode
\___ ComplexNode : "element"
\___ Prototype : "value" : Integer
The corresponding class is generated :
public class CmyStructure implements DataContainer, DataModifier { public List<CmyStructureCelement> element = []; @Override public Object getValue(String name) { return this[name]; } @Override public void setValue(String name, Object value) { this[name] = value; } }
Well. First, the naming of the sequence node is ambiguous : your inner node is singular, so you wan't use a plural form, and give the name "element". But, the attribute is a sequence and a plural form ("elements" in this exemple) would be more appropriate.
Then, we need a convenient way to populate the sequence with new elements, or else, user should populate the list like this :
myStructure.element[i] = new org.simexplorer.user.data.CmyStructureCelement();Change History
Note: See
TracTickets for help on using
tickets.





