Decompose/PetriNet4.java
private void ParseNet(String netFile) throws FileNotFoundException, Exception {
		DummyContext context = new DummyContext();
		Object[] res = (Object[]) importNet(context.getContext(), netFile);
		net = (PetrinetGraph) res[0];

		for (PetrinetEdge edge : net.getEdges()) {
			DirectedGraphNode s = (DirectedGraphNode) edge.getSource();
			DirectedGraphNode e = (DirectedGraphNode) edge.getTarget();
			if (s instanceof Place) {
				Place ss = (Place) s;
				Transition ee = (Transition) e;

				List<Transition> v = p2t.get(ss);
				if (v == null) {
					v = new ArrayList<Transition>();
					v.add(ee);
					p2t.put(ss, v);
				} else {
					v.add(ee);
				}
				places.add(ss);
				transitions.add(ee);
			} else {
				Place ss = (Place) e;
				Transition ee = (Transition) s;
				List<Place> v = t2p.get(ee);
				if (v == null) {
					v = new ArrayList<Place>();
					v.add(ss);
					t2p.put(ee, v);
				} else {
					v.add(ss);
				}
				transitions.add(ee);
				places.add(ss);
			}
		}
	}
// construct a PN based on input string, only used for the initial graph G
construct a PN based on input string, only used for the initial graph G
construct a PN based on input string only used for the initial graph G
private void ParseNet(String netFile) throws FileNotFoundException, Exception {
		DummyContext context = new DummyContext();
		Object[] res = (Object[]) importNet(context.getContext(), netFile);
		net = (PetrinetGraph) res[0];
		for (PetrinetEdge edge : net.getEdges()) {
			DirectedGraphNode s = (DirectedGraphNode) edge.getSource();
			DirectedGraphNode e = (DirectedGraphNode) edge.getTarget();
			if (s instanceof Place) {
				Place ss = (Place) s;
				Transition ee = (Transition) e;
				List<Transition> v = p2t.get(ss);
				if (v == null) {
					v = new ArrayList<Transition>();
					v.add(ee);
					p2t.put(ss, v);
				} else {
					v.add(ee);
				}
				places.add(ss);
				transitions.add(ee);
			} else {
				Place ss = (Place) e;
				Transition ee = (Transition) s;
				List<Place> v = t2p.get(ee);
				if (v == null) {
					v = new ArrayList<Place>();
					v.add(ss);
					t2p.put(ee, v);
				} else {
					v.add(ss);
				}
				transitions.add(ee);
				places.add(ss);
			}
		}
	}
private void ParseNet ( String netFile ) throws FileNotFoundException , Exception { DummyContext context = new DummyContext ( ) ; Object [ ] res = ( Object [ ] ) importNet ( context . getContext ( ) , netFile ) ; net = ( PetrinetGraph ) res [ 0 ] ; for ( PetrinetEdge edge : net . getEdges ( ) ) { DirectedGraphNode s = ( DirectedGraphNode ) edge . getSource ( ) ; DirectedGraphNode e = ( DirectedGraphNode ) edge . getTarget ( ) ; if ( s instanceof Place ) { Place ss = ( Place ) s ; Transition ee = ( Transition ) e ; List < Transition > v = p2t . get ( ss ) ; if ( v == null ) { v = new ArrayList < Transition > ( ) ; v . add ( ee ) ; p2t . put ( ss , v ) ; } else { v . add ( ee ) ; } places . add ( ss ) ; transitions . add ( ee ) ; } else { Place ss = ( Place ) e ; Transition ee = ( Transition ) s ; List < Place > v = t2p . get ( ee ) ; if ( v == null ) { v = new ArrayList < Place > ( ) ; v . add ( ss ) ; t2p . put ( ee , v ) ; } else { v . add ( ss ) ; } transitions . add ( ee ) ; places . add ( ss ) ; } } }
construct a PN based on input string, only used for the initial graph G
construct a PN based on input string only used for the initial graph G