changeset 626:9e733f44d8b0

Code style and comments.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 20 Apr 2015 17:45:22 +0200
parents e4b4d66589a4
children 9a6d8c174e78
files src/main/java/de/intevation/lada/exporter/Creator.java src/main/java/de/intevation/lada/exporter/ExportConfig.java src/main/java/de/intevation/lada/exporter/ExportFormat.java src/main/java/de/intevation/lada/exporter/Exporter.java src/main/java/de/intevation/lada/exporter/laf/LafCreator.java src/main/java/de/intevation/lada/exporter/laf/LafExporter.java src/main/java/de/intevation/lada/importer/ImportConfig.java src/main/java/de/intevation/lada/importer/ImportFormat.java src/main/java/de/intevation/lada/importer/Importer.java src/main/java/de/intevation/lada/importer/ReportItem.java src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java src/main/java/de/intevation/lada/importer/laf/EntryFormat.java src/main/java/de/intevation/lada/importer/laf/LafFormat.java src/main/java/de/intevation/lada/importer/laf/LafImporter.java src/main/java/de/intevation/lada/importer/laf/LafParser.java src/main/java/de/intevation/lada/importer/laf/LafParserException.java src/main/java/de/intevation/lada/importer/laf/LafProducer.java src/main/java/de/intevation/lada/importer/laf/LafWriter.java src/main/java/de/intevation/lada/importer/laf/OrtCreator.java src/main/java/de/intevation/lada/util/auth/OpenIdAuthorization.java
diffstat 20 files changed, 337 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/exporter/Creator.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/exporter/Creator.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,7 +1,15 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.exporter;
 
 
 /**
+ * Interface for export content creator.
  *
  * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
  */
--- a/src/main/java/de/intevation/lada/exporter/ExportConfig.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/exporter/ExportConfig.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.exporter;
 
 import java.lang.annotation.ElementType;
@@ -7,6 +14,11 @@
 
 import javax.inject.Qualifier;
 
+/**
+ * Annotation to configure exporter.
+ *
+ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
+ */
 @Qualifier
 @Retention(RetentionPolicy.RUNTIME)
 @Target({
--- a/src/main/java/de/intevation/lada/exporter/ExportFormat.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/exporter/ExportFormat.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,5 +1,17 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.exporter;
 
+/**
+ * Enumeration for Lada export formats.
+ *
+ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
+ */
 public enum ExportFormat {
     LAF
 }
--- a/src/main/java/de/intevation/lada/exporter/Exporter.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/exporter/Exporter.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.exporter;
 
 import java.io.InputStream;
@@ -5,6 +12,11 @@
 
 import de.intevation.lada.util.auth.UserInfo;
 
+/**
+ * Interface for Lada data exporter.
+ *
+ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
+ */
 public interface Exporter
 {
     public InputStream export(List<Integer> proben, UserInfo userInfo);
--- a/src/main/java/de/intevation/lada/exporter/laf/LafCreator.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/exporter/laf/LafCreator.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.exporter.laf;
 
 import java.text.DateFormat;
@@ -8,8 +15,6 @@
 import javax.inject.Named;
 import javax.persistence.Query;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.exporter.Creator;
 import de.intevation.lada.model.land.LKommentarM;
 import de.intevation.lada.model.land.LKommentarP;
@@ -36,9 +41,9 @@
 public class LafCreator
 implements Creator
 {
-    @Inject
-    private Logger logger;
-
+    /**
+     * The repository used to read data.
+     */
     @Inject
     @RepositoryConfig(type=RepositoryType.RO)
     private Repository repository;
@@ -76,6 +81,7 @@
      * @param probe The {@link LProbeInfo} object.
      * @return LAF conform string.
      */
+    @SuppressWarnings("unchecked")
     private String writeAttributes(LProbe probe) {
         DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm");
         QueryBuilder<LKommentarP> kommBuilder =
@@ -155,6 +161,7 @@
      * @param zw    The {@link LZusatzWert}.
      * @return Single LAF line.
      */
+    @SuppressWarnings("unchecked")
     private String writeZusatzwert(LZusatzWert zw) {
         String nativeQuery = "select beschreibung, meh_id from stammdaten.proben_zusatz where pzs_id = '";
         nativeQuery += zw.getPzsId() + "'";
@@ -174,6 +181,7 @@
      * @param probe The {@link LProbeInfo} object.
      * @return LAF conform string
      */
+    @SuppressWarnings("unchecked")
     private String writeOrt(LProbe probe) {
         QueryBuilder<LOrt> builder =
             new QueryBuilder<LOrt>(
@@ -228,6 +236,7 @@
      * @param probe The {@link LProbeInfo} object.
      * @return LAF conform string.
      */
+    @SuppressWarnings("unchecked")
     private String writeMessung(LProbe probe) {
         DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm");
         // Get all messungen
@@ -292,6 +301,7 @@
      * @param mw    The {@link LMesswert} object.
      * @return Single LAF line.
      */
+    @SuppressWarnings("unchecked")
     private String writeMesswert(LMesswert mw) {
         String nativeQuery = "select messgroesse from stammdaten.messgroesse where id = '";
         nativeQuery += mw.getMessgroesseId() + "'";
--- a/src/main/java/de/intevation/lada/exporter/laf/LafExporter.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/exporter/laf/LafExporter.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.exporter.laf;
 
 import java.io.ByteArrayInputStream;
@@ -7,8 +14,6 @@
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.exporter.ExportConfig;
 import de.intevation.lada.exporter.ExportFormat;
 import de.intevation.lada.exporter.Exporter;
@@ -24,9 +29,10 @@
 public class LafExporter
 implements Exporter
 {
-    @Inject
-    private Logger logger;
 
+    /**
+     * The creator used to generate content.
+     */
     @Inject
     private LafCreator creator;
 
--- a/src/main/java/de/intevation/lada/importer/ImportConfig.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/ImportConfig.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer;
 
 import java.lang.annotation.ElementType;
@@ -7,6 +14,11 @@
 
 import javax.inject.Qualifier;
 
+/**
+ * Annotation used to configure Lada importer.
+ *
+ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
+ */
 @Qualifier
 @Retention(RetentionPolicy.RUNTIME)
 @Target({
--- a/src/main/java/de/intevation/lada/importer/ImportFormat.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/ImportFormat.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,5 +1,17 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer;
 
+/**
+ * Enumeration for Lada import formats.
+ *
+ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
+ */
 public enum ImportFormat {
     LAF
 }
--- a/src/main/java/de/intevation/lada/importer/Importer.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/Importer.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer;
 
 import java.util.List;
@@ -5,6 +12,11 @@
 
 import de.intevation.lada.util.auth.UserInfo;
 
+/**
+ * Interface for Lada importer.
+ *
+ * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
+ */
 public interface Importer {
     void reset();
     Map<String, List<ReportItem>> getWarnings();
--- a/src/main/java/de/intevation/lada/importer/ReportItem.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/ReportItem.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer;
 
 /**
--- a/src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/AttributeMapper.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,6 +1,12 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
-import java.math.BigInteger;
 import java.sql.Timestamp;
 import java.text.DateFormat;
 import java.text.ParseException;
@@ -11,12 +17,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import javax.ejb.Stateless;
 import javax.inject.Inject;
 import javax.persistence.Query;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.importer.ReportItem;
 import de.intevation.lada.model.land.LKommentarM;
 import de.intevation.lada.model.land.LKommentarP;
@@ -41,14 +44,21 @@
 public class AttributeMapper
 {
 
-    @Inject
-    private Logger logger;
-
+    /**
+     * The repository used to read data.
+     */
     @Inject
     @RepositoryConfig(type=RepositoryType.RO)
     private Repository repository;
 
+    /**
+     * List of warnings.
+     */
     private List<ReportItem> warnings;
+
+    /**
+     * List of errors.
+     */
     private List<ReportItem> errors;
 
     /**
@@ -67,6 +77,7 @@
      * @param probe     The entity object.
      * @return The updated entity object.
      */
+    @SuppressWarnings("unchecked")
     public LProbe addAttribute(String key, Object value, LProbe probe) {
         DateFormat format = new SimpleDateFormat("yyyyMMdd HHmm");
         if ("datenbasis_s".equals(key) && probe.getDatenbasisId() == null) {
@@ -196,6 +207,15 @@
         return probe;
     }
 
+    /**
+     * Add an attribute to the given ProbeTranslation object.
+     *
+     * @param key       The key mapping to a object member.
+     * @param value     The value to set.
+     * @param probeTranslation  The entity object.
+     * @return The updated entity.
+     */
+    @SuppressWarnings("unchecked")
     public ProbeTranslation addAttribute(
         String key,
         Object value,
@@ -327,6 +347,14 @@
         return messung;
     }
 
+    /**
+     * Add an attribute to the given MessungTranslation object.
+     *
+     * @param key       The key mapping to a object member.
+     * @param value     The value to set.
+     * @param mt        The entity object.
+     * @return The updated entity.
+     */
     public MessungTranslation addAttribute(
         String key,
         Object value,
@@ -346,6 +374,7 @@
      * @param messwert  The entity object.
      * @return The updated entity object.
      */
+    @SuppressWarnings("unchecked")
     public LMesswert addAttribute(
         String key,
         Object value,
@@ -463,6 +492,7 @@
      * @param wert      The entity object.
      * @return The updated entity object.
      */
+    @SuppressWarnings("unchecked")
     public LZusatzWert addAttribute(
         String lKey,
         Object value,
@@ -476,7 +506,6 @@
         String w = v.substring(0, ndx);
         v = v.substring(ndx + 2);
         ndx = v.indexOf("\"");
-        String einheit = v.substring(0, ndx);
         String fehler = v.substring(ndx + 2);
 
         String nativeQuery = "select id from stammdaten.probenzusatz where zusatzwert = '";
@@ -515,7 +544,6 @@
         String w = v.substring(0, ndx);
         v = v.substring(ndx + 2);
         ndx = v.indexOf(" ");
-        String einheit = v.substring(0, ndx);
         String fehler = v.substring(ndx + 2);
         wert.setPzsId(groesse);
         wert.setMesswertPzs(Float.valueOf(w));
--- a/src/main/java/de/intevation/lada/importer/laf/EntryFormat.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/EntryFormat.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.util.regex.Pattern;
@@ -8,6 +15,7 @@
  * importer.
  * The entry formats are defined in a config file
  * (see wiki-doc: https://bfs-intern.intevation.de/Server/Importer).
+ *
  * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
  */
 public class EntryFormat
--- a/src/main/java/de/intevation/lada/importer/laf/LafFormat.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafFormat.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.io.IOException;
--- a/src/main/java/de/intevation/lada/importer/laf/LafImporter.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafImporter.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.util.ArrayList;
@@ -5,11 +12,8 @@
 import java.util.List;
 import java.util.Map;
 
-import javax.ejb.Stateless;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.importer.ImportConfig;
 import de.intevation.lada.importer.ImportFormat;
 import de.intevation.lada.importer.Importer;
@@ -19,9 +23,9 @@
 @ImportConfig(format=ImportFormat.LAF)
 public class LafImporter implements Importer {
 
-    @Inject
-    private Logger logger;
-
+    /**
+     * The parser used for this importer.
+     */
     @Inject
     private LafParser parser;
 
@@ -63,6 +67,12 @@
         errors = new HashMap<String, List<ReportItem>>();
     }
 
+    /**
+     * Start the import.
+     *
+     * @param content   The laf data as string.
+     * @param userInfo  The user information.
+     */
     @Override
     public void doImport(String content, UserInfo userInfo) {
         this.warnings.clear();
--- a/src/main/java/de/intevation/lada/importer/laf/LafParser.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafParser.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.util.ArrayList;
@@ -11,10 +18,7 @@
 
 import de.intevation.lada.importer.ReportItem;
 import de.intevation.lada.model.land.LMessung;
-import de.intevation.lada.model.land.LMesswert;
-import de.intevation.lada.model.land.LOrt;
 import de.intevation.lada.model.land.LProbe;
-import de.intevation.lada.model.land.MessungTranslation;
 import de.intevation.lada.util.auth.UserInfo;
 import de.intevation.lada.validation.Validator;
 import de.intevation.lada.validation.Violation;
@@ -27,23 +31,44 @@
  */
 public class LafParser {
 
+    /**
+     * The logger used in this class.
+     */
     @Inject
     private Logger logger;
 
+    /**
+     * The start tag of a dataset.
+     */
     private static final String PROBE_NEXT = "\n%PROBE%";
 
+    /**
+     * Flag used to write data into the database or not.
+     */
     private boolean dryRun;
 
+    /**
+     * The data object producer.
+     */
     @Inject
     private LafProducer producer;
 
+    /**
+     * The writer used to create objects in the database.
+     */
     @Inject
     private LafWriter writer;
 
+    /**
+     * The validator for probe objects.
+     */
     @Inject
     @ValidationConfig(type="Probe")
     private Validator probeValidator;
 
+    /**
+     * The validator for messung objects.
+     */
     @Inject
     @ValidationConfig(type="Messung")
     private Validator messungValidator;
@@ -56,7 +81,14 @@
     //@ValidationConfig(type="Ort")
     //private Validator ortValidator;
 
+    /**
+     * The warnings.
+     */
     private Map<String, List<ReportItem>> warnings;
+
+    /**
+     * The errors.
+     */
     private Map<String, List<ReportItem>> errors;
 
     /**
@@ -202,6 +234,11 @@
         }
     }
 
+    /**
+     * Validate probe objects.
+     *
+     * @param probe The probe object to validate.
+     */
     private Violation validateProbe(LProbe probe) {
         return probeValidator.validate(probe);
     }
--- a/src/main/java/de/intevation/lada/importer/laf/LafParserException.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafParserException.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 /**
--- a/src/main/java/de/intevation/lada/importer/laf/LafProducer.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafProducer.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.util.ArrayList;
@@ -7,8 +14,6 @@
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.importer.ReportItem;
 import de.intevation.lada.model.Ort;
 import de.intevation.lada.model.land.LKommentarM;
@@ -30,32 +35,95 @@
  */
 public class LafProducer
 {
-    @Inject
-    private Logger logger;
+    /**
+     * The probe object created by this producer.
+     */
+    private LProbe probe;
 
-    private LProbe probe;
+    /**
+     * The probe translation object created by this producer.
+     */
     private ProbeTranslation probeTranslation;
+
+    /**
+     * The messung object created by this producer.
+     */
     private LMessung messung;
+
+    /**
+     * The messung translation object created by this producer.
+     */
     private MessungTranslation messungTranslation;
 
+    /**
+     * Creator used to build ort objects.
+     */
     @Inject
     private OrtCreator ort;
 
+    /**
+     * Probekommentare created by this producer.
+     */
     private List<LKommentarP> pKommentare;
+
+    /**
+     * Messungskommentare created by this producer.
+     */
     private Map<LMessung, List<LKommentarM>> mKommentare;
+
+    /**
+     * Messungen created by this producer.
+     */
     private Map<LMessung, MessungTranslation> messungen;
+
+    /**
+     * Orte created by this producer.
+     */
     private List<LOrt> lorte;
+
+    /**
+     * SOrte created by this producer.
+     */
     private List<SOrt> orte;
+
+    /**
+     * Messwerte created by this producer.
+     */
     private Map<LMessung, List<LMesswert>> messwerte;
+
+    /**
+     * Zusatzwerte created by this producer.
+     */
     private List<LZusatzWert> zusatzwerte;
 
+    /**
+     * Format mapping for probe objects.
+     */
     private List<EntryFormat> probenFormat;
+
+    /**
+     * Format mapping for messung objects.
+     */
     private List<EntryFormat> messungFormat;
+
+    /**
+     * Format mapping for ort objects.
+     */
     private List<EntryFormat> ortFormat;
 
+    /**
+     * The warnings.
+     */
     private Map<String, List<ReportItem>> warnings;
+
+    /**
+     * The errors.
+     */
     private Map<String, List<ReportItem>> errors;
 
+    /**
+     * The mapper used to set attributes.
+     */
     @Inject
     private AttributeMapper mapper;
 
--- a/src/main/java/de/intevation/lada/importer/laf/LafWriter.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafWriter.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.util.ArrayList;
@@ -7,8 +14,6 @@
 import javax.inject.Inject;
 import javax.persistence.PersistenceException;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.importer.ReportItem;
 import de.intevation.lada.model.land.LKommentarM;
 import de.intevation.lada.model.land.LKommentarP;
@@ -34,20 +39,33 @@
  */
 public class LafWriter {
 
-    @Inject
-    private Logger logger;
-
+    /**
+     * The repository to write database objects.
+     */
     @Inject
     @RepositoryConfig(type=RepositoryType.RW)
     private Repository repository;
 
+    /**
+     * The authorization module.
+     */
     @Inject
     @AuthorizationConfig(type=AuthorizationType.OPEN_ID)
     private Authorization authorization;
 
+    /**
+     * The errors.
+     */
     private List<ReportItem> errors;
+
+    /**
+     * The warnings.
+     */
     private List<ReportItem> warnings;
 
+    /**
+     * The current probe id used to create child objects.
+     */
     private Integer currentProbeId;
 
     /**
--- a/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,14 +1,18 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.importer.laf;
 
 import java.math.BigInteger;
 import java.util.List;
 
-import javax.ejb.Stateless;
 import javax.inject.Inject;
 import javax.persistence.Query;
 
-import org.apache.log4j.Logger;
-
 import de.intevation.lada.model.land.LOrt;
 import de.intevation.lada.model.stamm.SOrt;
 import de.intevation.lada.util.annotation.RepositoryConfig;
@@ -23,9 +27,6 @@
 public class OrtCreator
 {
     @Inject
-    private Logger logger;
-
-    @Inject
     @RepositoryConfig(type=RepositoryType.RW)
     private Repository repository;
 
--- a/src/main/java/de/intevation/lada/util/auth/OpenIdAuthorization.java	Mon Apr 20 17:07:27 2015 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/OpenIdAuthorization.java	Mon Apr 20 17:45:22 2015 +0200
@@ -1,3 +1,10 @@
+/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU GPL (v>=3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out
+ * the documentation coming with IMIS-Labordaten-Application for details.
+ */
 package de.intevation.lada.util.auth;
 
 import java.lang.reflect.InvocationTargetException;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)