21 |
|
|
22 |
package nongnu.cashews.language.process; |
package nongnu.cashews.language.process; |
23 |
|
|
24 |
|
import java.net.URI; |
25 |
|
import java.net.URISyntaxException; |
26 |
import java.util.List; |
import java.util.List; |
27 |
|
|
28 |
|
import nongnu.cashews.xml.Xmlizable; |
29 |
|
|
30 |
/** |
/** |
31 |
* <p> |
* <p> |
32 |
* Represents the amalgamation of one or more <code>Performance</code>s |
* Represents the amalgamation of one or more <code>Performance</code>s |
44 |
* |
* |
45 |
* @author Andrew John Hughes (gnu_andrew@member.fsf.org) |
* @author Andrew John Hughes (gnu_andrew@member.fsf.org) |
46 |
*/ |
*/ |
47 |
public abstract class CompositeProcess |
public class CompositeProcess |
48 |
extends Process |
extends Process |
49 |
|
implements Xmlizable |
50 |
{ |
{ |
51 |
|
|
52 |
/** |
/** |
53 |
|
* The control structure which defines how this process operates. |
54 |
|
* |
55 |
|
* @serial the control structure. |
56 |
|
*/ |
57 |
|
private CProcess controlStructure; |
58 |
|
|
59 |
|
/** |
60 |
* The consumers for this composite process. |
* The consumers for this composite process. |
61 |
* |
* |
62 |
* @serial the consumers. |
* @serial the consumers. |
70 |
*/ |
*/ |
71 |
private List<Produce> producers; |
private List<Produce> producers; |
72 |
|
|
73 |
|
/** |
74 |
|
* Constructs a new <code>CompositeProcess</code> with the specified |
75 |
|
* name. |
76 |
|
* |
77 |
|
* @param name the name for this composite process. |
78 |
|
* @throws URISyntaxException if the supplied name is not a valid URI. |
79 |
|
*/ |
80 |
|
public CompositeProcess(String name) |
81 |
|
throws URISyntaxException |
82 |
|
{ |
83 |
|
super(name); |
84 |
|
} |
85 |
|
|
86 |
|
/** |
87 |
|
* Constructs a new <code>CompositeProcess</code> with the specified |
88 |
|
* name. |
89 |
|
* |
90 |
|
* @param name the name for this composite process. |
91 |
|
*/ |
92 |
|
public CompositeProcess(URI name) |
93 |
|
{ |
94 |
|
super(name); |
95 |
|
} |
96 |
|
|
97 |
|
/** |
98 |
|
* Sets the control structure used by this composite process. |
99 |
|
* |
100 |
|
* @param structure the structure to use. |
101 |
|
*/ |
102 |
|
public void setControlStructure(CProcess structure) |
103 |
|
{ |
104 |
|
controlStructure = structure; |
105 |
|
} |
106 |
|
|
107 |
|
/** |
108 |
|
* Returns a <code>String</code> representation of this process. |
109 |
|
* |
110 |
|
* @return a textual representation. |
111 |
|
*/ |
112 |
|
public String toString() |
113 |
|
{ |
114 |
|
String superString = super.toString(); |
115 |
|
return superString.substring(0, superString.length() - 1) + |
116 |
|
", controlStructure=" + |
117 |
|
controlStructure + |
118 |
|
", consumers=" + |
119 |
|
consumers + |
120 |
|
", producers=" + |
121 |
|
producers + |
122 |
|
"]"; |
123 |
|
} |
124 |
|
|
125 |
} |
} |
126 |
|
|