changeset 5809:53fcc0d5a03e

LineParser: Store reference to input file.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 24 Apr 2013 12:04:25 +0200
parents c69ce591e3ea
children dba9e1fa233e
files flys-backend/src/main/java/de/intevation/flys/importer/parsers/LineParser.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/LineParser.java	Wed Apr 24 12:03:54 2013 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/LineParser.java	Wed Apr 24 12:04:25 2013 +0200
@@ -45,6 +45,8 @@
     /** Name of file parsed. */
     protected String fileName;
 
+    protected File inputFile;
+
 
     /**
      * This method reads each line of <i>file</i>. At the beginning,
@@ -56,6 +58,8 @@
     public void parse(File file) throws IOException {
         log.info("Parsing file '" + file + "'");
 
+        inputFile = file;
+
         fileName = file.getName();
 
         reset();
@@ -93,6 +97,11 @@
         return fileName;
     }
 
+    /** Returns the file currently parsed. */
+    protected File getInputFile() {
+        return inputFile;
+    }
+
 
     protected static String stripMetaLine(String line) {
         String tmp = line.substring(1, line.length());

http://dive4elements.wald.intevation.org