# HG changeset patch # User Raimund Renkert # Date 1437573783 -7200 # Node ID 3ec358698b4d51d502aa1e29bfd9bcfc5569e943 # Parent 2ae27dde48237f48bc4e82c090695f2f475502ac Code style and documentation. diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/factory/ProbeFactory.java --- a/src/main/java/de/intevation/lada/factory/ProbeFactory.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/factory/ProbeFactory.java Wed Jul 22 16:03:03 2015 +0200 @@ -84,6 +84,15 @@ return proben; } + /** + * Create LProbe objects using the interval and messprogramm details. + * + * @param interval The time interval for probe objects. + * @param messprogramm The messprogramm containing details. + * @param proben An (empty) list for probe objects filled by this + * method + * @return + */ private void createProben( Date[] interval, Messprogramm messprogramm, @@ -111,8 +120,7 @@ int teilEnd = messprogramm.getTeilintervallBis() + startDay; int offset = messprogramm.getIntervallOffset() == null ? 0 : messprogramm.getIntervallOffset(); - for (; - teilStart >= startDay + offset && teilEnd <= endDay + offset;) { + for (;teilStart >= startDay + offset && teilEnd <= endDay + offset;) { start.add(Calendar.DATE, teilStart - startDay + offset); Date startDate = start.getTime(); end.add(Calendar.DATE, teilEnd - endDay + offset); @@ -127,6 +135,15 @@ return; } + /** + * Create a single probe object. + * + * @param messprogramm The messprogramm containing probe details + * @param startDate The date for 'solldatumbeginn' + * @param endDate The date for 'solldatumende' + * + * @return The new probe object. + */ private LProbe createObjects( Messprogramm messprogramm, Date startDate, @@ -211,6 +228,16 @@ return probe; } + /** + * Determine the interval for probe generation using a start date, end date + * and the messprogramm. + * + * @param start Calendar object defining the start of the first interval + * @param end Calendar object defining the end of the last interval. + * @param messprogramm The messprogramm + * + * @return An array of start/end pairs. + */ private Date[][] calculateIntervals( Calendar start, Calendar end, @@ -257,6 +284,14 @@ return intervals; } + /** + * Parse an interval string. + * Posible values are: J, H, Q, M, W4, W2, W, T + * + * @param interval the interval string. + * + * @return the amount of days for the given interval. + */ private int parseInterval(String interval) { if ("J".equals(interval)) { return 365; @@ -287,6 +322,13 @@ } } + /** + * Search for the umwelt id using the 'deskriptor'. + * + * @param probe The probe object. + * + * @return The updated probe object. + */ public LProbe findUmweltId(LProbe probe) { String[] mediaDesk = probe.getMediaDesk().split(" "); if (mediaDesk.length <= 1) { @@ -295,16 +337,30 @@ probe.setUmwId(findUmwelt(mediaDesk)); return probe; } - + + /** + * Search for the media description using the 'deskriptor'. + * + * @param probe The probe object + * + * @return The updated probe object. + */ public LProbe findMediaDesk(LProbe probe) { - probe.setMedia(repository - .queryFromString("SELECT get_media_from_media_desk( :mediaDesk );", "stamm") - .setParameter("mediaDesk", probe.getMediaDesk()) - .getSingleResult() - .toString()); + probe.setMedia(repository + .queryFromString("SELECT get_media_from_media_desk( :mediaDesk );", "stamm") + .setParameter("mediaDesk", probe.getMediaDesk()) + .getSingleResult() + .toString()); return probe; } + /** + * Search for the umwelt id using the 'deskriptor'. + * + * @param messprogramm The messprogramm + * + * @return The updated messprogramm. + */ public Messprogramm findUmweltId(Messprogramm messprogramm) { String[] mediaDesk = messprogramm.getMediaDesk().split(" "); if (mediaDesk.length <= 1) { @@ -314,6 +370,13 @@ return messprogramm; } + /** + * Find the umwelt id for a given deskriptor. + * + * @param mediaDesk The deskriptor string + * + * @return The umwelt id or an empty string. + */ private String findUmwelt(String[] mediaDesk) { List mediaIds = new ArrayList(); boolean zebs = false; @@ -359,6 +422,14 @@ return getUmwelt(mediaIds, zebs); } + /** + * Find the umwelt id in the database using media deskriptor ids. + * + * @param media The list of media ids. + * @param isZebs Flag for type of the deskriptor. + * + * @return The umwelt id or an empty string. + */ private String getUmwelt(List media, boolean isZebs) { QueryBuilder builder = new QueryBuilder( @@ -444,6 +515,13 @@ } } + /** + * Determine if the entries in the list have the same umwelt id. + * + * @param list A list of DescriptorUmwelt objects. + * + * @return true if the objects have the same umwelt id else false. + */ private boolean isUnique(List list) { if (list.isEmpty()) { return false; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/importer/laf/LafImporter.java --- a/src/main/java/de/intevation/lada/importer/laf/LafImporter.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/LafImporter.java Wed Jul 22 16:03:03 2015 +0200 @@ -20,6 +20,13 @@ import de.intevation.lada.importer.ReportItem; import de.intevation.lada.util.auth.UserInfo; +/** + * LAF importer implements Importer to read LAF formatted files. + * The importer parses the files and extracts probe objects and their children + * and persists them in the database. + * + * @author Raimund Renkert + */ @ImportConfig(format=ImportFormat.LAF) public class LafImporter implements Importer { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/importer/laf/OrtCreator.java --- a/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/importer/laf/OrtCreator.java Wed Jul 22 16:03:03 2015 +0200 @@ -768,6 +768,9 @@ return ort; } + /** + * Reset the current data sets. + */ public void reset() { this.beschreibung = null; this.bezeichnung = null; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java --- a/src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java Wed Jul 22 16:03:03 2015 +0200 @@ -50,6 +50,11 @@ * "success": [boolean]; * "message": [string], * "data":[{ + * "id": [number], + * "letzteAenderung": [timestamp], + * "messgroessen": [array], + * "mmtId": [string], + * "messprogrammId": [number] * }], * "errors": [object], * "warnings": [object], @@ -142,6 +147,10 @@ *
      * 
      * {
+     *  "messprogrammId": [number],
+     *  "mmtId": [string],
+     *  "messgroessen": [array],
+     *  "letzteAenderung": [date]
      * }
      * 
      * 
@@ -182,6 +191,11 @@ *
      * 
      * {
+     *  "id": [number],
+     *  "messprogrammId": [number],
+     *  "mmtId": [string],
+     *  "messgroessen": [array],
+     *  "letzteAenderung": [date]
      * }
      * 
      * 
diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/rest/MessprogrammService.java --- a/src/main/java/de/intevation/lada/rest/MessprogrammService.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/rest/MessprogrammService.java Wed Jul 22 16:03:03 2015 +0200 @@ -60,6 +60,27 @@ * "success": [boolean]; * "message": [string], * "data":[{ + * "id": [number], + * "baId": [string], + * "datenbasisId": [number], + * "gemId": [string], + * "gueltigBis": [date], + * "gueltigVon": [date], + * "intervallOffset": [number], + * "letzteAenderung": [timestamp], + * "mediaDesk": [string], + * "mstId": [string], + * "name": [string], + * "netzbetreiberId": [string], + * "ortId": [string], + * "probeKommentar": [string], + * "probeNehmerId": [number], + * "probenartId": [number], + * "probenintervall": [string], + * "teilintervallBis": [number], + * "teilintervallVon": [number], + * "test": [boolean], + * "umwId": [string] * }], * "errors": [object], * "warnings": [object], @@ -203,6 +224,24 @@ *
      * 
      * {
+     *  "test": [boolean],
+     *  "netzbetreiberId": [string],
+     *  "mstId": [string],
+     *  "name": [string],
+     *  "datenbasisId": [number],
+     *  "baId": [string],
+     *  "gemId": [string],
+     *  "ortId": [string],
+     *  "mediaDesk": [string],
+     *  "umwId": [string],
+     *  "probenartId": [number],
+     *  "probenintervall": [string],
+     *  "teilintervallVon": [number],
+     *  "teilintervallBis": [number],
+     *  "intervallOffset": [string],
+     *  "probeNehmerId": [number],
+     *  "probeKommentar": [string],
+     *  "letzteAenderung": [date]
      * }
      * 
      * 
@@ -246,6 +285,25 @@ *
      * 
      * {
+     *  "id": [number],
+     *  "test": [boolean],
+     *  "netzbetreiberId": [string],
+     *  "mstId": [string],
+     *  "name": [string],
+     *  "datenbasisId": [number],
+     *  "baId": [string],
+     *  "gemId": [string],
+     *  "ortId": [string],
+     *  "mediaDesk": [string],
+     *  "umwId": [string],
+     *  "probenartId": [number],
+     *  "probenintervall": [string],
+     *  "teilintervallVon": [number],
+     *  "teilintervallBis": [number],
+     *  "intervallOffset": [string],
+     *  "probeNehmerId": [number],
+     *  "probeKommentar": [string],
+     *  "letzteAenderung": [date]
      * }
      * 
      * 
diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/rest/ProbeService.java --- a/src/main/java/de/intevation/lada/rest/ProbeService.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/rest/ProbeService.java Wed Jul 22 16:03:03 2015 +0200 @@ -341,7 +341,7 @@ probe = factory.findUmweltId(probe); } if (probe.getMediaDesk() != null || probe.getMediaDesk().length() > 0) { - probe = factory.findMediaDesk(probe); + probe = factory.findMediaDesk(probe); } /* Persist the new probe object*/ Response newProbe = defaultRepo.create(probe, "land"); @@ -369,6 +369,9 @@ *
      * 
      * {
+     *  "id": [number],
+     *  "start": [timestamp],
+     *  "end": [timestamp]
      * }
      * 
      * 
diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/rest/StatusService.java --- a/src/main/java/de/intevation/lada/rest/StatusService.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/rest/StatusService.java Wed Jul 22 16:03:03 2015 +0200 @@ -100,7 +100,7 @@ * Get all Status objects. *

* The requested objects can be filtered using a URL parameter named - * probeId. + * messungsId. *

* Example: http://example.com/status?messungsId=[ID] * diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/rest/VersionService.java --- a/src/main/java/de/intevation/lada/rest/VersionService.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/rest/VersionService.java Wed Jul 22 16:03:03 2015 +0200 @@ -51,7 +51,7 @@ /** * Get server Version. *

- * Example: http://example.com/verison + * Example: http://example.com/version * * @return Response object containing all MessStelle objects. */ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/rest/stamm/DeskriptorService.java --- a/src/main/java/de/intevation/lada/rest/stamm/DeskriptorService.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/rest/stamm/DeskriptorService.java Wed Jul 22 16:03:03 2015 +0200 @@ -44,6 +44,13 @@ * "success": [boolean]; * "message": [string], * "data":[{ + * "id": [number], + * "bedeutung": [string], + * "beschreibung": [string], + * "ebene": [number], + * "sn": [number], + * "vorgaenger": [number], + * "sxx": [number] * }], * "errors": [object], * "warnings": [object], @@ -71,14 +78,15 @@ *

* The requested objects can be filtered using the following URL * parameters:
- *
- * The response data contains a stripped set of Probe objects. The returned fields - * are defined in the query used in the request. + * * layer: the layer of the reqested deskriptor
+ * * parents: the parents of the requested deskriptor
+ *
+ * The response data contains a stripped set of deskriptor objects. *

* Example: * http://example.com/deskriptor?layer=[LAYER] * - * @return Response object containing all Deskriptor objects. + * @return Response object containing the Deskriptor objects. */ @GET @Path("/") diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/annotation/AuthenticationConfig.java --- a/src/main/java/de/intevation/lada/util/annotation/AuthenticationConfig.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/annotation/AuthenticationConfig.java Wed Jul 22 16:03:03 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.annotation; import java.lang.annotation.ElementType; @@ -9,6 +16,11 @@ import de.intevation.lada.util.auth.AuthenticationType; +/** + * Annotation used to configure authentication mechanism. + * + * @author Raimund Renkert + */ @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/annotation/AuthorizationConfig.java --- a/src/main/java/de/intevation/lada/util/annotation/AuthorizationConfig.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/annotation/AuthorizationConfig.java Wed Jul 22 16:03:03 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.annotation; import java.lang.annotation.ElementType; @@ -9,6 +16,11 @@ import de.intevation.lada.util.auth.AuthorizationType; +/** + * Annotation used to configure authorization mechanism. + * + * @author Raimund Renkert + */ @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/annotation/RepositoryConfig.java --- a/src/main/java/de/intevation/lada/util/annotation/RepositoryConfig.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/annotation/RepositoryConfig.java Wed Jul 22 16:03:03 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.annotation; import java.lang.annotation.ElementType; @@ -9,6 +16,11 @@ import de.intevation.lada.util.data.RepositoryType; +/** + * Annotation used to configure data repositories. + * + * @author Raimund Renkert + */ @Qualifier @Retention(RetentionPolicy.RUNTIME) @Target({ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/Authentication.java --- a/src/main/java/de/intevation/lada/util/auth/Authentication.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/Authentication.java Wed Jul 22 16:03:03 2015 +0200 @@ -1,7 +1,19 @@ +/* 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 javax.ws.rs.core.HttpHeaders; +/** + * Interface for the authentication mechanism. + * + * @author Raimund Renkert + */ public interface Authentication { public boolean isAuthenticated(HttpHeaders headers); diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/AuthenticationType.java --- a/src/main/java/de/intevation/lada/util/auth/AuthenticationType.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/AuthenticationType.java Wed Jul 22 16:03:03 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.util.auth; +/** + * Enumeration defining authentication types. + * + * @author Raimund Renkert + */ public enum AuthenticationType { NONE, //DEVELOPMENT ONLY! OPENID, // ... and others... diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/Authorization.java --- a/src/main/java/de/intevation/lada/util/auth/Authorization.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/Authorization.java Wed Jul 22 16:03:03 2015 +0200 @@ -1,8 +1,20 @@ +/* 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 de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; +/** + * Interface for authorization in the lada application. + * + * @author Raimund Renkert + */ public interface Authorization { public UserInfo getInfo(Object source); public Response filter(Object source, Response data, Class clazz); diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/AuthorizationType.java --- a/src/main/java/de/intevation/lada/util/auth/AuthorizationType.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/AuthorizationType.java Wed Jul 22 16:03:03 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.util.auth; +/** + * Enumeration defining authorization types. + * + * @author Raimund Renkert + */ public enum AuthorizationType { NONE, // DEVELOPMENT ONLY! LDAP, // ... and others... diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/DefaultAuthentication.java --- a/src/main/java/de/intevation/lada/util/auth/DefaultAuthentication.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/DefaultAuthentication.java Wed Jul 22 16:03:03 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 javax.ejb.Stateless; @@ -5,10 +12,18 @@ import de.intevation.lada.util.annotation.AuthenticationConfig; +/** + * Default implementation of the authentication mechanism. + * + * @author Raimund Renkert + */ @Stateless @AuthenticationConfig(type=AuthenticationType.NONE) public class DefaultAuthentication implements Authentication { + /** + * For this type of authentication allways true. + */ @Override public boolean isAuthenticated(HttpHeaders headers) { return true; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/DefaultAuthorization.java --- a/src/main/java/de/intevation/lada/util/auth/DefaultAuthorization.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/DefaultAuthorization.java Wed Jul 22 16:03:03 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 javax.ejb.Stateless; @@ -6,31 +13,75 @@ import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; +/** + * Default implementation of the authorization. + * + * @author Raimund Renkert + */ @Stateless @AuthorizationConfig(type=AuthorizationType.NONE) public class DefaultAuthorization implements Authorization { + /** + * Get the user infomation. + * + * @return An empty UserInfo object. + */ @Override public UserInfo getInfo(Object source) { return new UserInfo(); } + /** + * Filter the data embedded in 'data'. + * + * @param source The HTTP request. + * @param data The response data object. + * @param clazz The type of the embedded data. + * + * @return Unfiltered response data object. + */ @Override public Response filter(Object source, Response data, Class clazz) { return data; } + /** + * Get the authorization status. + * + * @param source The HTTP request + * @param data The requested data + * @param method The HTTP request method + * @param clazz The type of the embedded data. + * + * @return true + */ @Override public boolean isAuthorized( Object source, Object data, RequestMethod method, Class clazz) { return true; } + /** + * Get the R/W status of a probe object by id. + * + * @param probeId The probe id. + * + * @return false + */ @Override public boolean isReadOnly(Integer probeId) { return false; } + /** + * Get the authorization status. + * + * @param userInfo The user information + * @param data The response data object. + * + * @return true + */ @Override public boolean isAuthorized(UserInfo userInfo, Object data) { return true; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/auth/UserInfo.java --- a/src/main/java/de/intevation/lada/util/auth/UserInfo.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/auth/UserInfo.java Wed Jul 22 16:03:03 2015 +0200 @@ -1,8 +1,20 @@ +/* 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.util.ArrayList; import java.util.List; +/** + * Container for user specific information. + * + * @author Raimund Renkert + */ public class UserInfo { private String name; private List messstellen; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/data/EntityManagerProducer.java --- a/src/main/java/de/intevation/lada/util/data/EntityManagerProducer.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/data/EntityManagerProducer.java Wed Jul 22 16:03:03 2015 +0200 @@ -14,7 +14,11 @@ import javax.persistence.EntityManager; import javax.validation.UnexpectedTypeException; - +/** + * Factory class used to get entitymanager for a specific persistence unit. + * + * @author Raimund Renkert + */ @Stateless @LocalBean public class EntityManagerProducer { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/data/IntegerArrayType.java --- a/src/main/java/de/intevation/lada/util/data/IntegerArrayType.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/data/IntegerArrayType.java Wed Jul 22 16:03:03 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.data; import java.io.Serializable; @@ -11,6 +18,11 @@ import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.usertype.UserType; +/** + * Implementation for a new data type in the postgresql/postgis jdbc driver. + * + * @author Raimund Renkert + */ public class IntegerArrayType implements UserType { protected static final int SQLTYPE = java.sql.Types.ARRAY; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/data/LadaPostgisDialect.java --- a/src/main/java/de/intevation/lada/util/data/LadaPostgisDialect.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/data/LadaPostgisDialect.java Wed Jul 22 16:03:03 2015 +0200 @@ -1,9 +1,22 @@ +/* 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.data; import java.sql.Types; import org.hibernate.spatial.dialect.postgis.PostgisDialect; +/** + * This dialect extends the default postgis dialect and registers a new data + * type for integer arrays. + * + * @author Raimund Renkert + */ public class LadaPostgisDialect extends PostgisDialect { private static final long serialVersionUID = 1L; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/rest/RequestMethod.java --- a/src/main/java/de/intevation/lada/util/rest/RequestMethod.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/rest/RequestMethod.java Wed Jul 22 16:03:03 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.rest; public enum RequestMethod { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/util/rest/Response.java --- a/src/main/java/de/intevation/lada/util/rest/Response.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/util/rest/Response.java Wed Jul 22 16:03:03 2015 +0200 @@ -19,7 +19,7 @@ * Response object storing information about success, warnings, errors and * the data object. This class is used as return value in REST services. * -* @author Torsten Irländer +* @author Raimund Renkert */ public class Response implements Serializable { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/MessungValidator.java --- a/src/main/java/de/intevation/lada/validation/MessungValidator.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/MessungValidator.java Wed Jul 22 16:03:03 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.validation; import javax.enterprise.context.ApplicationScoped; @@ -9,6 +16,14 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation for messung objects. + * + * Instantiates the set of rules for messung objects and uses these rules to + * validate the object. + * + * @author Raimund Renkert + */ @ValidationConfig(type="Messung") @ApplicationScoped public class MessungValidator implements Validator { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/MesswertValidator.java --- a/src/main/java/de/intevation/lada/validation/MesswertValidator.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/MesswertValidator.java Wed Jul 22 16:03:03 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.validation; import javax.enterprise.context.ApplicationScoped; @@ -9,6 +16,14 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation for messwert objects. + * + * Instantiates the set of rules for messwert objects and uses these rules to + * validate the object. + * + * @author Raimund Renkert + */ @ValidationConfig(type="Messwert") @ApplicationScoped public class MesswertValidator implements Validator { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/OrtValidator.java --- a/src/main/java/de/intevation/lada/validation/OrtValidator.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/OrtValidator.java Wed Jul 22 16:03:03 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.validation; import javax.enterprise.context.ApplicationScoped; @@ -9,6 +16,14 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation for ort objects. + * + * Instantiates the set of rules for ort objects and uses these rules to + * validate the object. + * + * @author Raimund Renkert + */ @ValidationConfig(type="Ort") @ApplicationScoped public class OrtValidator implements Validator { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/ProbeValidator.java --- a/src/main/java/de/intevation/lada/validation/ProbeValidator.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/ProbeValidator.java Wed Jul 22 16:03:03 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.validation; import javax.enterprise.context.ApplicationScoped; @@ -9,6 +16,14 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation for probe objects. + * + * Instantiates the set of rules for probe objects and uses these rules to + * validate the object. + * + * @author Raimund Renkert + */ @ValidationConfig(type="Probe") @ApplicationScoped public class ProbeValidator implements Validator { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/Validator.java --- a/src/main/java/de/intevation/lada/validation/Validator.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/Validator.java Wed Jul 22 16:03:03 2015 +0200 @@ -9,6 +9,7 @@ /** + * Interface for object validators. * * @author Raimund Renkert */ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/Violation.java --- a/src/main/java/de/intevation/lada/validation/Violation.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/Violation.java Wed Jul 22 16:03:03 2015 +0200 @@ -11,6 +11,7 @@ import javax.ws.rs.core.MultivaluedMap; /** + * Container for violations detected during validation. * * @author Raimund Renkert */ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/annotation/ValidationConfig.java --- a/src/main/java/de/intevation/lada/validation/annotation/ValidationConfig.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/annotation/ValidationConfig.java Wed Jul 22 16:03:03 2015 +0200 @@ -16,6 +16,7 @@ /** + * Annotation to configure validators. * * @author Raimund Renkert */ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/annotation/ValidationRule.java --- a/src/main/java/de/intevation/lada/validation/annotation/ValidationRule.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/annotation/ValidationRule.java Wed Jul 22 16:03:03 2015 +0200 @@ -16,6 +16,7 @@ /** + * Annotation used to configure validation rules. * * @author Raimund Renkert */ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/Rule.java --- a/src/main/java/de/intevation/lada/validation/rules/Rule.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/Rule.java Wed Jul 22 16:03:03 2015 +0200 @@ -10,6 +10,7 @@ import de.intevation.lada.validation.Violation; /** + * Interface for validation rules. * * @author Raimund Renkert */ diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messung/Date.java --- a/src/main/java/de/intevation/lada/validation/rules/messung/Date.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/Date.java Wed Jul 22 16:03:03 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.validation.rules.messung; import java.util.HashMap; @@ -15,6 +22,13 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messungen. + * Validates if the "messzeitpunkt" is before or after the + * "probeentnahmebeginn" + * + * @author Raimund Renkert + */ @ValidationRule("Messung") public class Date implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messung/HasMesswert.java --- a/src/main/java/de/intevation/lada/validation/rules/messung/HasMesswert.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/HasMesswert.java Wed Jul 22 16:03:03 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.validation.rules.messung; import java.util.List; @@ -15,6 +22,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messungen. + * Validates if the messung has messwerte. + * + * @author Raimund Renkert + */ @ValidationRule("Messung") public class HasMesswert implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messung/HasNebenprobenNr.java --- a/src/main/java/de/intevation/lada/validation/rules/messung/HasNebenprobenNr.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/HasNebenprobenNr.java Wed Jul 22 16:03:03 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.validation.rules.messung; import de.intevation.lada.model.land.LMessung; @@ -5,6 +12,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messungen. + * Validates if the messung has a "nebenprobennummer" + * + * @author Raimund Renkert + */ @ValidationRule("Messung") public class HasNebenprobenNr implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messung/HasPflichtmessgroessen.java --- a/src/main/java/de/intevation/lada/validation/rules/messung/HasPflichtmessgroessen.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/HasPflichtmessgroessen.java Wed Jul 22 16:03:03 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.validation.rules.messung; import java.util.List; @@ -16,6 +23,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messungen. + * Validates if the messung has all "pflichtmessgroessen". + * + * @author Raimund Renkert + */ @ValidationRule("Messung") public class HasPflichtmessgroessen implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java --- a/src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java Wed Jul 22 16:03:03 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.validation.rules.messung; import java.util.ArrayList; @@ -19,6 +26,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messungen. + * Validates if the "messgroesse" fits the "messmethode". + * + * @author Raimund Renkert + */ @ValidationRule("Messung") public class MessgroesseToMessmethode implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messung/UniqueNebenprobenNr.java --- a/src/main/java/de/intevation/lada/validation/rules/messung/UniqueNebenprobenNr.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messung/UniqueNebenprobenNr.java Wed Jul 22 16:03:03 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.validation.rules.messung; import java.util.List; @@ -14,6 +21,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messungen. + * Validates if the nebenprobennr is unique for a probe. + * + * @author Raimund Renkert + */ @ValidationRule("Messung") public class UniqueNebenprobenNr implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java --- a/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java Wed Jul 22 16:03:03 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.validation.rules.messwert; import de.intevation.lada.model.land.LMesswert; @@ -5,6 +12,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for messwert. + * Validates if the "messfehler" was set correctly. + * + * @author Raimund Renkert + */ @ValidationRule("Messwert") public class HasMessunsicherheit implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/ort/CoordinatesInVE.java --- a/src/main/java/de/intevation/lada/validation/rules/ort/CoordinatesInVE.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/ort/CoordinatesInVE.java Wed Jul 22 16:03:03 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.validation.rules.ort; import java.util.List; @@ -22,6 +29,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for ort. + * Validates if the coordinates are in the specified "Verwaltungseinheit". + * + * @author Raimund Renkert + */ @ValidationRule("Ort") public class CoordinatesInVE implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/ort/EntnahmeortToVE.java --- a/src/main/java/de/intevation/lada/validation/rules/ort/EntnahmeortToVE.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/ort/EntnahmeortToVE.java Wed Jul 22 16:03:03 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.validation.rules.ort; import de.intevation.lada.validation.Violation; diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/Deskriptor.java Wed Jul 22 16:03:03 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.validation.rules.probe; import java.util.List; @@ -15,6 +22,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a valid deskriptor string. + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class Deskriptor implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java Wed Jul 22 16:03:03 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.validation.rules.probe; import java.util.ArrayList; @@ -17,6 +24,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the umwelt id fits the deskriptor string. + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class DeskriptorToUmwelt implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/HasEntnahmeOrt.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/HasEntnahmeOrt.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasEntnahmeOrt.java Wed Jul 22 16:03:03 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.validation.rules.probe; import java.util.List; @@ -15,6 +22,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a "entnahmeort". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class HasEntnahmeOrt implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/HasHauptprobenNr.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/HasHauptprobenNr.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasHauptprobenNr.java Wed Jul 22 16:03:03 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.validation.rules.probe; import de.intevation.lada.model.land.LProbe; @@ -5,6 +12,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a "hauptprobennr". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class HasHauptprobenNr implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/HasProbeart.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/HasProbeart.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasProbeart.java Wed Jul 22 16:03:03 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.validation.rules.probe; import de.intevation.lada.model.land.LProbe; @@ -5,6 +12,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a "probeart". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class HasProbeart implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/HasProbenahmeBegin.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/HasProbenahmeBegin.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasProbenahmeBegin.java Wed Jul 22 16:03:03 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.validation.rules.probe; import java.sql.Timestamp; @@ -7,6 +14,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a "probeentnahmeBeginn". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class HasProbenahmeBegin implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/HasTestdatensatz.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/HasTestdatensatz.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasTestdatensatz.java Wed Jul 22 16:03:03 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.validation.rules.probe; import de.intevation.lada.model.land.LProbe; @@ -5,6 +12,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the field "test" was set. + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class HasTestdatensatz implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/HasUmwelt.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/HasUmwelt.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/HasUmwelt.java Wed Jul 22 16:03:03 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.validation.rules.probe; import de.intevation.lada.model.land.LProbe; @@ -5,6 +12,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a "umwelt bereich". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class HasUmwelt implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/TimeProbeentnahmeBegin.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/TimeProbeentnahmeBegin.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/TimeProbeentnahmeBegin.java Wed Jul 22 16:03:03 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.validation.rules.probe; import java.sql.Timestamp; @@ -8,6 +15,13 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the "probeentnahmeBeginn" exists an if "probeentnahmeBeginn is + * in future or after "probeentnahmeEnde". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class TimeProbeentnahmeBegin implements Rule { diff -r 2ae27dde4823 -r 3ec358698b4d src/main/java/de/intevation/lada/validation/rules/probe/UniqueHauptprobenNr.java --- a/src/main/java/de/intevation/lada/validation/rules/probe/UniqueHauptprobenNr.java Mon Jul 20 12:19:40 2015 +0200 +++ b/src/main/java/de/intevation/lada/validation/rules/probe/UniqueHauptprobenNr.java Wed Jul 22 16:03:03 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.validation.rules.probe; import java.util.List; @@ -14,6 +21,12 @@ import de.intevation.lada.validation.annotation.ValidationRule; import de.intevation.lada.validation.rules.Rule; +/** + * Validation rule for probe. + * Validates if the probe has a unique "hauptprobennr". + * + * @author Raimund Renkert + */ @ValidationRule("Probe") public class UniqueHauptprobenNr implements Rule {