01: package org.enhydra.shark.xpdl;
02:
03: /**
04: * Class that represents the member of collection from XML schema
05: * that has unique Id attribute.
06: *
07: * @author Sasa Bojanic
08: */
09: public abstract class XMLCollectionElement extends XMLComplexElement {
10:
11: public XMLCollectionElement(XMLCollection parent, boolean isRequired) {
12: super (parent, isRequired);
13: }
14:
15: public XMLCollectionElement(XMLCollection parent, String name,
16: boolean isRequired) {
17: super (parent, name, isRequired);
18: }
19:
20: protected void fillStructure() {
21: XMLAttribute attrId = new XMLAttribute(this , "Id", true); //required
22: super .add(attrId);
23: }
24:
25: public final String getId() {
26: return get("Id").toValue();
27: }
28:
29: public final void setId(String id) {
30: set("Id", id);
31: }
32:
33: }
|