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