KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > xml > SequenceReader


1 package org.jbpm.bpel.xml;
2
3 import java.util.Iterator JavaDoc;
4
5 import org.w3c.dom.Element JavaDoc;
6
7 import org.jbpm.bpel.def.Activity;
8 import org.jbpm.bpel.def.Sequence;
9
10 /**
11  * Encapsulates the logic to create and connect process elements that make up
12  * the <i>sequence</i> structure.
13  * @author Juan Cantú
14  * @version $Revision: 1.4 $ $Date: 2005/06/16 19:15:34 $
15  */

16 public class SequenceReader extends ActivityReader {
17
18   protected Activity createActivity() {
19     return new Sequence();
20   }
21   
22   protected void readActivity(Activity activity, Element JavaDoc element) {
23     Sequence sequence = (Sequence) activity;
24     Iterator JavaDoc activityElemIt = bpelReader.getActivityElements(element);
25     while (activityElemIt.hasNext()) {
26       Element JavaDoc activityElem = (Element JavaDoc) activityElemIt.next();
27       bpelReader.readActivity(activityElem, sequence);
28     }
29   }
30 }
31
Popular Tags