changeset 367:6431b7efe240

Cosmetics. artifacts/trunk@3680 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 16 Jan 2012 08:58:36 +0000
parents 1f51f3c46efe
children 8e18697d99fb
files artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollectionFactory.java artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java
diffstat 6 files changed, 51 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java	Wed Jan 11 10:58:34 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java	Mon Jan 16 08:58:36 2012 +0000
@@ -36,6 +36,7 @@
      */
     protected String identifier;
 
+
     /**
      * Default constructor.
      */
@@ -58,6 +59,7 @@
         return this.identifier;
     }
 
+
     public String hash() {
         String hash = String.valueOf(hashCode());
         if (logger.isDebugEnabled()) {
@@ -113,8 +115,12 @@
         }
     }
 
-    public void setup(String identifier, ArtifactFactory factory,
-                      Object context, CallMeta callMeta, Document data) {
+    public void setup(String identifier,
+        ArtifactFactory factory,
+        Object          context,
+        CallMeta        callMeta,
+        Document        data)
+    {
         if (logger.isDebugEnabled()) {
             logger.debug("DefaultArtifact.setup: " + identifier);
         }
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollectionFactory.java	Wed Jan 11 10:58:34 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactCollectionFactory.java	Mon Jan 16 08:58:36 2012 +0000
@@ -134,7 +134,13 @@
             ArtifactCollection collection =
                 (ArtifactCollection) clazz.newInstance();
 
-            collection.setup(identifier, name, creationTime, ttl, this, context, data);
+            collection.setup(identifier,
+                name,
+                creationTime,
+                ttl,
+                this,
+                context,
+                data);
 
             return collection;
         }
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java	Wed Jan 11 10:58:34 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/AbstractState.java	Mon Jan 16 08:58:36 2012 +0000
@@ -47,15 +47,15 @@
      * the configuration. */
     public static final String XPATH_DESCRIPTION = "@description";
 
-    /** The XPath to the output nodes of the state configuration.*/
+    /** The XPath to the output nodes of the state configuration. */
     public static final String XPATH_OUTPUT_MODES = "outputmodes/outputmode";
 
     /** The XPath to the list of facets relative to the output mode it belongs
-     * to.*/
+     * to. */
     public static final String XPATH_FACETS = "facets/facet";
 
 
-    /** The logger that is used in this class.*/
+    /** The logger that is used in this class. */
     private static Logger logger = Logger.getLogger(AbstractState.class);
 
 
@@ -68,7 +68,7 @@
     /** The data provided by this state. */
     protected Map<String, StateData> data;
 
-    /** A list of output modes which are available for this state.*/
+    /** A list of output modes which are available for this state. */
     protected List<Output> outputs;
 
 
@@ -88,7 +88,6 @@
 
         this.id          = id;
         this.description = description;
-
     }
 
 
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java	Wed Jan 11 10:58:34 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java	Mon Jan 16 08:58:36 2012 +0000
@@ -60,33 +60,19 @@
     }
 
 
-    /**
-     * Copies name, index and description of other facet.
-     */
-    public void set(Facet other) {
-        index       = other.getIndex();
-        name        = other.getName();
-        description = other.getDescription();
-    }
-
-
-    public Facet deepCopy() {
-        DefaultFacet copy = new DefaultFacet();
-        copy.set(this);
-        return copy;
-    }
-
-
+    /** Get index. */
     public int getIndex() {
         return index;
     }
 
 
+    /** Returns the name ('type'). */
     public String getName() {
         return name;
     }
 
 
+    /** Returns the description (e.g. displayed in gui). */
     public String getDescription() {
         return description;
     }
@@ -125,15 +111,7 @@
     }
 
 
-    public String toString() {
-        return new StringBuilder("name = '")
-            .append(name).append("', index = ")
-            .append(index).append(", description = '")
-            .append(description).append("'")
-            .toString();
-    }
-
-
+    /** Create a xml represantation. */
     public Node toXML(Document doc) {
         ElementCreator ec = new ElementCreator(
             doc,
@@ -147,5 +125,33 @@
 
         return facet;
     }
+
+
+    /** Create a string representation. */
+    public String toString() {
+        return new StringBuilder("name = '")
+            .append(name).append("', index = ")
+            .append(index).append(", description = '")
+            .append(description).append("'")
+            .toString();
+    }
+
+
+    /**
+     * Copies name, index and description of other facet.
+     */
+    public void set(Facet other) {
+        index       = other.getIndex();
+        name        = other.getName();
+        description = other.getDescription();
+    }
+
+
+    /** Create a deep copy of this facet. */
+    public Facet deepCopy() {
+        DefaultFacet copy = new DefaultFacet();
+        copy.set(this);
+        return copy;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java	Wed Jan 11 10:58:34 2012 +0000
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java	Mon Jan 16 08:58:36 2012 +0000
@@ -42,7 +42,6 @@
     public static final String XPATH_OUTPUT_MODES  =
         "/art:result/art:outputmodes/art:output";
 
-
     /** The XPath to the select node relative to the dynamic UI node in the
      * DESCRIBE document. */
     public static final String XPATH_DATA_SELECT = "art:select";
--- a/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java	Wed Jan 11 10:58:34 2012 +0000
+++ b/artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java	Mon Jan 16 08:58:36 2012 +0000
@@ -149,7 +149,6 @@
             else {
                 element.setAttribute(name, value);
             }
-
         }
     } // class ElementCreator
 

http://dive4elements.wald.intevation.org