1
2
3
4
5
6
7
8 package net.kwfgrid.gworkflowdl.structure;
9
10
11 /***
12 * interface for internal Java representation of a Workflow.
13 */
14 public interface Workflow extends Owls{
15 String DEFAULT_DESCRIPTION = null;
16 String DEFAULT_ID = "No_ID";
17
18 /***
19 Rebuild the workflow from an XML description.
20 @param gworkflowdl The XML description of the Workflow in GWorkflowDL syntax.
21 */
22 void fromXML(String gworkflowdl) throws WorkflowFormatException, CapacityException;
23
24
25
26 /***
27 * Get identifier of this workflow.
28 * Format according to xs:ID (derived from xs:String, form XML NCName).
29 * Has to start with a letter or "_", may contain letters, digits, ".", "-", or "_", must not contain "/", ":", " ".
30 * @return The identifier of this workflow.
31 */
32 String getID();
33
34 /***
35 * Appends a place to the registered places.
36 *
37 * @param place to add
38 */
39 void addPlace(Place place);
40
41 String[] getPlaceIDs();
42
43 /***
44 * retrieve a place by its identifier ID.
45 *
46 * @param id place ID
47 * @return place place to find
48 */
49 Place getPlace(String id);
50
51 int getPlaceIndex(String id);
52
53 Place getPlace(int i);
54
55 void removePlace(int i);
56
57 int placeCount();
58
59 /***
60 * add a AnalysisTransition.
61 *
62 * @param transition the AnalysisTransition to add
63 */
64 void addTransition(Transition transition);
65
66 void removeTransition(int i);
67 /***
68 * get all AnalysisTransition identifiers.
69 *
70 * @return array of all transition identifiers
71 */
72 String[] getTransitionIDs();
73
74 /***
75 * retrieve a transition by its identifier ID.
76 *
77 * @param id transition ID
78 * @return transition
79 */
80 Transition getTransition(String id);
81
82 int getTransitionIndex(String id);
83
84 Transition getTransition(int i);
85
86 int transitionCount();
87
88 /***
89 * set workflow description.
90 *
91 * @param description Workflow description
92 */
93 void setDescription(String description);
94
95 /***
96 * get workflow description.
97 *
98 * @return description
99 */
100 String getDescription();
101
102 GenericProperties getProperties();
103
104 void setProperties(GenericProperties props);
105
106
107 /***
108 * clear workflow's transition container and add the transitions of the array.
109 *
110 * @param transitions Transitions to be set
111 */
112 void setTransitions(Transition[] transitions);
113
114 /***
115 * return the transitions of the workflow as an array.
116 *
117 * @return transition array
118 */
119 Transition[] getTransitions();
120
121 /***
122 * clear workflow's place container and add the places of the array.
123 *
124 * @param places array
125 */
126 void setPlaces(Place[] places);
127
128 /***
129 * return the places of the workflow as array.
130 *
131 * @return place array
132 */
133 Place[] getPlaces();
134
135
136
137
138
139
140 /***
141 * return the workflow's isEnabled transitions as array.
142 *
143 * @return array of enabeled transitions
144 */
145 Transition[] getEnabledTransitions();
146
147 }