diff src/java/de/intevation/mxd/Converter.java @ 28:0e71a1f71ec0

Added parameter for MXD filename.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 08 Apr 2011 17:33:04 +0200
parents cbd67b1100d8
children c51376f8e24c
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/Converter.java	Fri Apr 08 14:21:45 2011 +0200
+++ b/src/java/de/intevation/mxd/Converter.java	Fri Apr 08 17:33:04 2011 +0200
@@ -65,13 +65,17 @@
      */
     public static void main(String[] args) {
         try{
+
             IReader reader = new MXDReader();
             reader.init();
-//            reader.setFilename("testdata/SubsurfaceSediments-Internet.mxd");
-//            reader.setFilename("testdata/p_single_4pt_c255-0-0.mxd");
-//            reader.setFilename("testdata/Facilities-Internet.mxd");
-//            reader.setFilename("testdata/fernerkundung_albedo.mxd");
-            reader.setFilename("testdata/gevu.mxd");
+
+            String path = System.getProperty("mxd.file");
+            if (path.equals("${MXDFILE}")) {
+                System.out.println("No valid MXD file. Use ant parameter" +
+                                   " \"-DMXDFILE=path/to/file.mxd\".");
+                System.exit(-1);
+            }
+            reader.setFilename(path);
 
             reader.read();
             reader.shutdown();
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)