KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* TransitionRef.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 import org.w3c.dom.*;
16
17 /**
18 * Represents a WfMC DTD element that has the similar name.
19 */

20 public class TransitionRef extends XMLComplexElement {
21
22    private XMLAttribute attrId=new XMLAttribute("Id"); //required
23

24    /**
25    * Creates a new instance of the class.
26    */

27    public TransitionRef () {
28       super ();
29
30       fillStructure();
31    }
32
33    protected void fillStructure() {
34       attrId.setRequired(true);
35       complexStructure.add(attrId);
36       attributes.add(attrId);
37    }
38
39    /**
40    * Overides super-class method to set the value to
41    * this element's 'Id' attribute.
42    *
43    * @param v The value to set.
44    */

45    public void setValue (Object JavaDoc v) {
46       attrId.setValue(v);
47    }
48
49    public Object JavaDoc toValue () {
50       return attrId.toValue();
51    }
52
53    /**
54    * Used to create exact copy of instance of this class.
55    * The newly created instance will have all the properties
56    * same as the copied one.
57    *
58    * @return The newly created instance of this class.
59    */

60    public Object JavaDoc clone () {
61       TransitionRef t=(TransitionRef)super.clone();
62       t.attrId=(XMLAttribute)this.attrId.clone();
63       t.fillStructure();
64
65       return t;
66    }
67
68
69    public String JavaDoc toString () {
70       return attrId.toString();
71    }
72
73 }
74
Popular Tags