01: package jtaDiscRack.presentation.delements;
02:
03: /**
04: * Represents the collection element - thus means that it has simple element
05: * with ID attribute.
06: *
07: * @author Sasa Bojanic
08: * @version 1.0
09: */
10: public class DCollectionElement extends DComplexElement {
11:
12: protected DSimpleElement attrId = new DSimpleElement("Id"); //required
13: protected DCollection myCollection;
14:
15: // element by itself doesn't fill the structure - it is up
16: // to extended classes to do it
17: public DCollectionElement(String name, DCollection myCollection) {
18: super (name);
19:
20: this .myCollection = myCollection;
21: }
22:
23: public String getID() {
24: return attrId.value.toString();
25: }
26:
27: public DCollection getCollection() {
28: return myCollection;
29: }
30:
31: protected void fillStructure() {
32: attrId.setRequired(true);
33: attrId.setReadOnly(true);
34:
35: complexStructure.add(attrId);
36: }
37:
38: }
|