KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > xpdl > XMLCollectionElement


1 package org.enhydra.shark.xpdl;
2
3 /**
4  * Class that represents the member of collection from XML schema
5  * that has unique Id attribute.
6  *
7  * @author Sasa Bojanic
8  */

9 public abstract class XMLCollectionElement extends XMLComplexElement {
10
11    public XMLCollectionElement (XMLCollection parent, boolean isRequired) {
12       super(parent, isRequired);
13    }
14
15    protected void fillStructure () {
16       XMLAttribute attrId=new XMLAttribute(this,"Id", true); //required
17
super.add(attrId);
18    }
19    
20    public final String JavaDoc getId () {
21       return get("Id").toValue();
22    }
23    public final void setId (String JavaDoc id) {
24       set("Id",id);
25    }
26
27 }
28
Popular Tags