[Dive4elements-commits] [PATCH 5 of 7] LineParser: Store reference to input file

Wald Commits scm-commit at wald.intevation.org
Wed Apr 24 14:41:48 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1366797865 -7200
# Node ID 53fcc0d5a03ecb287779ec73f9c9da40cd1a32f9
# Parent  c69ce591e3ea9a20023b5387af1f9eb2c69ff216
LineParser: Store reference to input file.

diff -r c69ce591e3ea -r 53fcc0d5a03e flys-backend/src/main/java/de/intevation/flys/importer/parsers/LineParser.java
--- 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());


More information about the Dive4elements-commits mailing list