View Javadoc

1   /*
2    * Copyright (c) 2005, The K-Wf Grid Consortium
3    * Fraunhofer Institute for Computer Architecture and Software Technology
4    * See http://www.kwfgrid.eu and http://www.first.fraunhofer.de for more details.
5    */
6   package net.kwfgrid.gwui.graphview;
7   
8   import de.fzi.wim.guibase.graphview.graph.DefaultNode;
9   
10  import net.kwfgrid.gworkflowdl.structure.Place;
11  import org.apache.log4j.Logger;
12  
13  /***
14     A node representing a place.
15   */
16  public class PlaceNode extends DefaultNode implements WorkflowGraphElement {
17      protected Place _place;
18      protected boolean _quasilive;
19      protected boolean _hasfault;
20  
21      /***
22         The constructor. 
23         The properties are not initialized by the constructor. This has to be done by the client.
24       */
25      public PlaceNode(Place p) {
26  	_place = p;
27  	_quasilive = true;
28  	_hasfault = false;
29      }
30  
31      public Object getStructureObject() {
32  	return _place;
33      }
34      
35      public Place getPlace() {
36  	return _place;
37      }
38  
39      protected void setQuasiLive(boolean ql) {
40  	_quasilive = ql;
41      }
42  
43      public boolean isQuasiLive() {
44  	return _quasilive;
45      }
46  
47      protected void setPlace(Place p) {
48  	_place = p;
49      }
50  
51      protected void setHasFault(boolean hasfault) {
52  	_hasfault = hasfault;
53      }
54  
55      public boolean hasFault() {
56  	return _hasfault;
57      }
58  
59      public String[] getText() {
60      String[] ret = new String[1];
61      ret[0] = _place.getID();
62      return ret;
63      }
64  
65  }