KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > jawe > xml > elements > PackageHeader


1 /* PackageHeader.java
2  *
3  * Authors:
4  * Stefanovic Nenad chupo@iis.ns.ac.yu
5  * Bojanic Sasa sasaboy@neobee.net
6  * Puskas Vladimir vpuskas@eunet.yu
7  * Pilipovic Goran zboniek@uns.ac.yu
8  *
9  */

10
11 package org.enhydra.jawe.xml.elements;
12
13 import org.enhydra.jawe.xml.*;
14 import org.enhydra.jawe.xml.panels.*;
15
16 import java.util.*;
17 import java.text.*;
18 import org.w3c.dom.*;
19
20 /**
21 * Represents a WfMC DTD element that has the similar name.
22 *
23 * @see XML
24 */

25 public class PackageHeader extends XMLComplexElement {
26    private XPDLVersion refXPDLVersion=new XPDLVersion();
27    private Vendor refVendor=new Vendor();
28    private Created refCreated=new Created();
29    private Description refDescription=new Description(); // min=0
30
private Documentation refDocumentation=new Documentation(); // min=0
31
private PriorityUnit refPriorityUnit=new PriorityUnit(); // min=0
32
private CostUnit refCostUnit=new CostUnit(); // min=0
33

34    /**
35    * Creates a new instance of the class.
36    */

37    public PackageHeader () {
38       super();
39
40       refXPDLVersion.setValue("1.0");
41       refVendor.setValue("Together");
42       fillStructure ();
43    }
44
45    /**
46    * Defines the super-class method. Read the explanation for
47    * this method within XMLComplexElement class.
48    */

49    protected void fillStructure () {
50       refXPDLVersion.setRequired(true);
51       refXPDLVersion.setReadOnly(true);
52       complexStructure.add(refXPDLVersion);
53       refVendor.setRequired(true);
54       complexStructure.add(refVendor);
55       refCreated.setRequired(true);
56       complexStructure.add(refCreated);
57       complexStructure.add(refDescription);
58       complexStructure.add(refDocumentation);
59       complexStructure.add(refPriorityUnit);
60       complexStructure.add(refCostUnit);
61    }
62
63    public void fromXML (Node node) {
64       refCreated.setValue("");
65       refXPDLVersion.setValue("");
66       refVendor.setValue("");
67       super.fromXML(node);
68    }
69
70 }
71
Popular Tags