annotate artifacts/src/main/java/org/dive4elements/river/artifacts/access/IsOfficialAccess.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 9098499114e9
children
rev   line source
7618
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 *
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 */
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9 package org.dive4elements.river.artifacts.access;
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import org.dive4elements.river.artifacts.D4EArtifact;
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 7618
diff changeset
14 /** Access data used to mark a certain Wst column as an official line. */
7618
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 public class IsOfficialAccess extends Access
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16 {
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 protected Boolean isOfficial;
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20 public IsOfficialAccess(D4EArtifact givenArtifact) {
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21 super(givenArtifact);
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22 }
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24 /** Returns whether the artifact marked its wst col as official. */
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
25 public Boolean isOfficial() {
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
26
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27 if (isOfficial == null) {
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
28 String value = getString("official");
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
29 isOfficial = (value != null && value.equals("1"));
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
30 }
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
32 return isOfficial;
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
33 }
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34 }
9098499114e9 Added new IsOfficalAccess to avoid keeping data too close to StaticWQKmsArtifact.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org