Commit d5893391 authored by kai's avatar kai
Browse files

Moved core workflow code from eu.simstadt.admin and eu.simstadt.desktop to...

Moved core workflow code from eu.simstadt.admin and eu.simstadt.desktop to module HierarchicWorkflow.
Changed directory suffix .simstadt to .proj.
Made WorkflowApplication extendable and did some other refactorings.
parent 1abaf9af
...@@ -17,6 +17,13 @@ ...@@ -17,6 +17,13 @@
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKTReader;
import eu.simstadt.nf4j.ExportJobFromJavaFXRegionChooser;
import javafx.application.Application; import javafx.application.Application;
import javafx.beans.value.ObservableValue; import javafx.beans.value.ObservableValue;
import javafx.concurrent.Task; import javafx.concurrent.Task;
...@@ -31,13 +38,6 @@ ...@@ -31,13 +38,6 @@
import javafx.stage.FileChooser; import javafx.stage.FileChooser;
import javafx.stage.Stage; import javafx.stage.Stage;
import netscape.javascript.JSObject; import netscape.javascript.JSObject;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKTReader;
import eu.simstadt.nf4j.ExportJobFromJavaFXRegionChooser;
public class RegionChooserFX extends Application public class RegionChooserFX extends Application
...@@ -71,8 +71,7 @@ public JavaScriptFXBridge() { ...@@ -71,8 +71,7 @@ public JavaScriptFXBridge() {
String repoString = userPrefs.get("RECENT_REPOSITORY", null); String repoString = userPrefs.get("RECENT_REPOSITORY", null);
if (repoString == null) { if (repoString == null) {
repo = Paths.get("../TestRepository"); repo = Paths.get("../TestRepository");
} } else {
else {
repo = Paths.get(repoString); repo = Paths.get(repoString);
} }
} }
...@@ -180,7 +179,7 @@ private File selectSaveFileWithDialog(String project, String citygml, String suf ...@@ -180,7 +179,7 @@ private File selectSaveFileWithDialog(String project, String citygml, String suf
FileChooser fileChooser = new FileChooser(); FileChooser fileChooser = new FileChooser();
fileChooser.setTitle("Save CITYGML ids"); fileChooser.setTitle("Save CITYGML ids");
if (project != null) { if (project != null) {
fileChooser.setInitialDirectory(repo.resolve(project + ".simstadt").toFile()); fileChooser.setInitialDirectory(repo.resolve(project + ".proj").toFile());
} else { } else {
fileChooser.setInitialDirectory(repo.toFile()); fileChooser.setInitialDirectory(repo.toFile());
} }
...@@ -199,13 +198,12 @@ public boolean checkIfCityGMLSAreAvailable(String project, String citygml) { ...@@ -199,13 +198,12 @@ public boolean checkIfCityGMLSAreAvailable(String project, String citygml) {
return Files.isReadable(p); return Files.isReadable(p);
} }
public void log(String text) public void log(String text) {
{
System.out.println(text); System.out.println(text);
} }
private Path citygmlPath(String project, String citygml) { private Path citygmlPath(String project, String citygml) {
return repo.resolve(project + ".simstadt").resolve(citygml); return repo.resolve(project + ".proj").resolve(citygml);
} }
public void importNovaFactoryBoundingBoxes() throws IOException { public void importNovaFactoryBoundingBoxes() throws IOException {
...@@ -256,7 +254,7 @@ public Browser() { ...@@ -256,7 +254,7 @@ public Browser() {
} }
// try { // try {
// fxapp.selectRegionDirectlyFromCityGML( // fxapp.selectRegionDirectlyFromCityGML(
// Paths.get("../TestRepository").resolve("Gruenbuehl.simstadt") // Paths.get("../TestRepository").resolve("Gruenbuehl.proj")
// .resolve("Gruenbuehl_LOD2_validated+ADE.gml"), // .resolve("Gruenbuehl_LOD2_validated+ADE.gml"),
// "POLYGON((3515896.6132767177 5415942.563662692,3516013.1135652466 5415930.341095623,3516035.1608944996 5415925.696283888,3516052.531667652 5415905.3452489935,3516053.640043498 5415793.1428597355,3516092.996199113 5415790.117097386,3516086.9957373445 5415687.30812527,3515953.2106800284 5415687.710348818,3515893.4419519473 5415673.416324939,3515876.73573549 5415736.92758554,3515896.6132767177 5415942.563662692))" // "POLYGON((3515896.6132767177 5415942.563662692,3516013.1135652466 5415930.341095623,3516035.1608944996 5415925.696283888,3516052.531667652 5415905.3452489935,3516053.640043498 5415793.1428597355,3516092.996199113 5415790.117097386,3516086.9957373445 5415687.30812527,3515953.2106800284 5415687.710348818,3515893.4419519473 5415673.416324939,3515876.73573549 5415736.92758554,3515896.6132767177 5415942.563662692))"
// ); // );
...@@ -265,8 +263,8 @@ public Browser() { ...@@ -265,8 +263,8 @@ public Browser() {
// //
// } // }
// System.exit(0); // System.exit(0);
} }
}); });
//add the web view to the scene //add the web view to the scene
getChildren().add(browser); getChildren().add(browser);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment