KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* TimeEstimation.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 org.w3c.dom.*;
18
19 /**
20 * Represents a WfMC DTD element that has the similar name.
21 *
22 * @see XML
23 */

24 public class TimeEstimation extends XMLComplexElement {
25    private WaitingTime refWaitingTime=new WaitingTime(); // min=0
26
private WorkingTime refWorkingTime=new WorkingTime(); // min=0
27
private Duration refDuration=new Duration(); // min=0
28

29    /**
30    * Creates a new instance of the class.
31    */

32    public TimeEstimation () {
33       super();
34
35       fillStructure();
36    }
37
38    /**
39    * Defines the super-class method. Read the explanation for
40    * this method within XMLComplexElement class.
41    */

42    protected void fillStructure () {
43       complexStructure.add(refWaitingTime);
44       complexStructure.add(refWorkingTime);
45       complexStructure.add(refDuration);
46    }
47
48    /**
49    * Used to create exact copy of instance of this class.
50    * The newly created instance will have all the properties
51    * same as the copied one.
52    *
53    * @return The newly created instance of this class.
54    */

55    public Object JavaDoc clone () {
56       TimeEstimation t=(TimeEstimation)super.clone();
57
58       t.refWaitingTime=(WaitingTime)this.refWaitingTime.clone();
59       t.refWorkingTime=(WorkingTime)this.refWorkingTime.clone();
60       t.refDuration=(Duration)this.refDuration.clone();
61
62       t.fillStructure();
63
64       return t;
65    }
66
67 }
68
Popular Tags