@@ -12880,7 +12880,7 @@ public void generateRESTWebService()
1288012880 out.close();
1288112881 }
1288212882 catch (IOException e)
12883- { System.out .println("!!! Error saving data"); }
12883+ { System.err .println("!!! Error saving data"); }
1288412884
1288512885 for (int i = 0; i < useCases.size(); i++)
1288612886 { Object obj = useCases.get(i);
@@ -12919,7 +12919,7 @@ public void generateSOAPWebService()
1291912919 out.close();
1292012920 }
1292112921 catch (IOException e)
12922- { System.out .println("Error saving data"); }
12922+ { System.err .println("!! Error saving data"); }
1292312923 }
1292412924
1292512925
@@ -12963,7 +12963,7 @@ public void saveDataToFile()
1296312963 out.close();
1296412964 }
1296512965 catch (IOException e)
12966- { System.out .println("Error saving data"); }
12966+ { System.err .println("!! Error saving data"); }
1296712967 }
1296812968 }
1296912969
@@ -13002,7 +13002,7 @@ public void saveDataToFile(String f)
1300213002 out.close();
1300313003 }
1300413004 catch (IOException e)
13005- { System.out .println("Error saving data"); }
13005+ { System.err .println("!! Error saving data"); }
1300613006 }
1300713007
1300813008 public void saveEMFToFile()
@@ -13021,7 +13021,7 @@ public void saveEMFToFile()
1302113021 out.close();
1302213022 }
1302313023 catch (IOException e)
13024- { System.out .println("Error saving EMF"); }
13024+ { System.err .println("!! Error saving EMF"); }
1302513025 }
1302613026 }
1302713027
@@ -13041,7 +13041,7 @@ public void saveKM3ToFile()
1304113041 out.close();
1304213042 }
1304313043 catch (IOException e)
13044- { System.out .println("Error saving KM3"); }
13044+ { System.err .println("!! Error saving KM3"); }
1304513045 }
1304613046 }
1304713047
@@ -13061,7 +13061,7 @@ public void saveSimpleKM3ToFile()
1306113061 out.close();
1306213062 }
1306313063 catch (IOException e)
13064- { System.out .println("Error saving KM3"); }
13064+ { System.err .println("!! Error saving KM3"); }
1306513065 }
1306613066 }
1306713067
@@ -13082,7 +13082,7 @@ public void saveEcoreToFile()
1308213082 out.close();
1308313083 }
1308413084 catch (IOException e)
13085- { System.out .println("Error saving Ecore"); }
13085+ { System.err .println("!! Error saving Ecore"); }
1308613086 }
1308713087 }
1308813088
@@ -13104,7 +13104,7 @@ public void saveInterfaceDescription(String f)
1310413104 out.close();
1310513105 }
1310613106 catch (IOException e)
13107- { System.out .println("Error saving model"); }
13107+ { System.err .println("!! Error saving model"); }
1310813108 }
1310913109
1311013110
@@ -13143,7 +13143,7 @@ else if (uc instanceof UseCase)
1314313143 out.close();
1314413144 }
1314513145 catch (IOException e)
13146- { System.out .println("Error saving model"); }
13146+ { System.err .println("!! Error saving model"); }
1314713147 }
1314813148 }
1314913149
@@ -13176,7 +13176,43 @@ public void saveUSEDataToFile(String f)
1317613176 out.close();
1317713177 }
1317813178 catch (IOException e)
13179- { System.out.println("Error saving data"); }
13179+ { System.err.println("!! Error saving data"); }
13180+ }
13181+
13182+ public void savePlantUMLToFile(String f)
13183+ { File file = new File("output/" + f);
13184+ // Vector locals = new Vector();
13185+
13186+ try
13187+ { PrintWriter out =
13188+ new PrintWriter(
13189+ new BufferedWriter(new FileWriter(file)));
13190+ out.println("@startuml");
13191+
13192+ for (int p = 0; p < entities.size(); p++)
13193+ { Entity ent = (Entity) entities.get(p);
13194+ out.println(ent.saveAsPlantUML());
13195+ // locals.addAll(ent.getInvariants());
13196+ }
13197+
13198+ for (int i = 0; i < associations.size(); i++)
13199+ { Association ast = (Association) associations.get(i);
13200+ ast.saveAsPlantUML(out);
13201+ }
13202+
13203+ /* if (locals.size() > 0)
13204+ { out.println("constraints\n\n"); }
13205+
13206+ for (int q = 0; q < locals.size(); q++)
13207+ { Constraint cc = (Constraint) locals.get(q);
13208+ out.println(cc.saveAsUSEData());
13209+ } */
13210+
13211+ out.println("@enduml");
13212+ out.close();
13213+ }
13214+ catch (IOException e)
13215+ { System.err.println("!! Error saving data"); }
1318013216 }
1318113217
1318213218
0 commit comments