aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java')
-rw-r--r--Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java84
1 files changed, 42 insertions, 42 deletions
diff --git a/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java b/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java
index f9041e87..3fea18de 100644
--- a/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java
+++ b/Domains/crossingScenario/src/crossingScenario/run/QueryDebug.java
@@ -34,48 +34,48 @@ public class QueryDebug {
34 } 34 }
35 35
36 public static void checkPrevLanes(String pathSrc, String pathTgt) throws FileNotFoundException { 36 public static void checkPrevLanes(String pathSrc, String pathTgt) throws FileNotFoundException {
37 Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put("*", new XMIResourceFactoryImpl()); 37// Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put("*", new XMIResourceFactoryImpl());
38 EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, CrossingScenarioPackage.eINSTANCE); 38// EPackage.Registry.INSTANCE.put(CrossingScenarioPackage.eNS_URI, CrossingScenarioPackage.eINSTANCE);
39 ResourceSet rs = new ResourceSetImpl(); 39// ResourceSet rs = new ResourceSetImpl();
40 Resource res = rs.getResource(URI.createFileURI(pathSrc), true); 40// Resource res = rs.getResource(URI.createFileURI(pathSrc), true);
41 41//
42 PrintWriter printer = new PrintWriter(pathTgt); 42// PrintWriter printer = new PrintWriter(pathTgt);
43 43//
44 CrossingScenario cs = ((CrossingScenario) res.getContents().get(0)); 44// CrossingScenario cs = ((CrossingScenario) res.getContents().get(0));
45 45//
46 for (Actor o : cs.getActors()) { 46// for (Actor o : cs.getActors()) {
47 String nodeName = "A(" + rndbl(o.getXPos(), 1)+","+rndbl(o.getYPos(), 1) + ")"; 47// String nodeName = "A(" + rndbl(o.getXPos(), 1)+","+rndbl(o.getYPos(), 1) + ")";
48 printer.println(o.hashCode() + " " + nodeName); 48// printer.println(o.hashCode() + " " + nodeName);
49 } 49// }
50 50//
51 for (Lane o : cs.getLanes()) { 51// for (Lane o : cs.getLanes()) {
52 String prefix = ""; 52// String prefix = "";
53 if (cs.getHorizontal_head().equals(o) || cs.getVertical_head().equals(o)) { 53// if (cs.getHorizontal_head().equals(o) || cs.getVertical_head().equals(o)) {
54 prefix = "HEAD"; 54// prefix = "HEAD";
55 } 55// }
56 String nodeName = prefix + "L(" + rndbl(o.getReferenceCoord(), 3) + ")" + 56// String nodeName = prefix + "L(" + rndbl(o.getReferenceCoord(), 3) + ")" +
57 o.eClass().getName().substring(5, 9); 57// o.eClass().getName().substring(5, 9);
58 printer.println(o.hashCode() + " " + nodeName); 58// printer.println(o.hashCode() + " " + nodeName);
59 } 59// }
60 printer.println("#"); 60// printer.println("#");
61 for (Lane o : cs.getLanes()) { 61// for (Lane o : cs.getLanes()) {
62 if (o.getPrevLane() != null){ 62// if (o.getPrevLane() != null){
63 int curName = o.hashCode(); 63// int curName = o.hashCode();
64 int curPrev = o.getPrevLane().hashCode(); 64// int curPrev = o.getPrevLane().hashCode();
65 double edgeLabel = rndbl(o.getPrevLane().getNumWidth(), 1); 65// double edgeLabel = rndbl(o.getPrevLane().getNumWidth(), 1);
66 printer.println(curName + " " + curPrev + " " + edgeLabel); 66// printer.println(curName + " " + curPrev + " " + edgeLabel);
67 } 67// }
68 } 68// }
69 69//
70 for (Actor o : cs.getActors()) { 70// for (Actor o : cs.getActors()) {
71 int actName = o.hashCode(); 71// int actName = o.hashCode();
72 int lanName = o.getPlacedOn().hashCode(); 72// int lanName = o.getPlacedOn().hashCode();
73 printer.println(actName + " " + lanName ); 73// printer.println(actName + " " + lanName );
74 } 74// }
75 75//
76 printer.flush(); 76// printer.flush();
77 printer.close(); 77// printer.close();
78 System.out.println("TGF CREATED"); 78// System.out.println("TGF CREATED");
79 79
80 } 80 }
81 81