[PATCH 4 of 9] Remove close-isOfficial-Handling in StaticWQKmsArtifact

Wald Commits scm-commit at wald.intevation.org
Mon Dec 2 10:14:53 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1385723842 -3600
# Node ID c5f7c798a0a45424b04919025632b5000fabb7d0
# Parent  9098499114e9598d50e80f8187f43819f86d0e0b
Remove close-isOfficial-Handling in StaticWQKmsArtifact.

diff -r 9098499114e9 -r c5f7c798a0a4 artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java	Fri Nov 29 12:16:34 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/StaticWQKmsArtifact.java	Fri Nov 29 12:17:22 2013 +0100
@@ -59,8 +59,6 @@
 
     private static final String NAME = "staticwqkms";
 
-    private boolean official = false;
-
     static {
         // TODO: Move to configuration.
         FacetActivity.Registry.getInstance().register(
@@ -113,7 +111,8 @@
             String [] parts = code.split("-");
 
             if (parts.length >= 1) {
-                official = parts[0].toLowerCase().equals("official");
+                boolean official = parts[0].toLowerCase().startsWith("official");
+                addStringData("official", official ? "1" : null);
             }
 
             if (parts.length >= 4) {
@@ -232,10 +231,5 @@
         return Lines.createWaterLines(points, wAtKm);
     }
     // TODO implement deepCopy.
-
-    public boolean isOfficial()
-    {
-        return official;
-    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :


More information about the Dive4elements-commits mailing list