View Javadoc

1   /*
2    * $Id: ReadEdge.java 1153 2008-07-03 09:47:47Z kwfgrid.bassheide $
3    *
4    * Copyright (c) 2008, Fraunhofer FIRST
5    * Fraunhofer Institute for Computer Architecture and Software Technology
6    * See http://www.first.fraunhofer.de and http://www.gridworkflow.org/gwes for more details.
7    */
8   package net.kwfgrid.gwui.graphview;
9   
10  import net.kwfgrid.gworkflowdl.structure.Edge;
11  
12  /***
13     A graph edge representing a petri net arc pointing from a place to a transition.
14   */
15  public class ReadEdge extends ArcEdge {
16      public ReadEdge(PlaceNode from, TransitionNode to, Edge e) {
17  	super(from, to, e);
18      }
19  
20      public PlaceNode getPlace() {
21  	return (PlaceNode)getFrom();
22      }
23  
24      public TransitionNode getTransition() {
25  	return (TransitionNode)getTo();
26      }
27  
28      public String toString() {
29  	return
30  	    (getFrom()==null?"x":((PlaceNode)getFrom()).getPlace().getID())+
31  	    " |-> "+
32  	    (getTo()==null?"x":((TransitionNode)getTo()).getTransition().getID());
33      }
34  }