diff artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java @ 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 1d11a0531242
children 71ff234713a6
line wrap: on
line diff
--- 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 :

http://dive4elements.wald.intevation.org