diff gnv-artifacts/src/main/java/de/intevation/gnv/utils/MetaWriter.java @ 806:2cea76f1112e

Added Javadoc in utils package. gnv-artifacts/trunk@888 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 08 Apr 2010 13:10:39 +0000
parents c4156275c1e1
children a645bd23c1c8
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/MetaWriter.java	Thu Apr 08 11:31:44 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/MetaWriter.java	Thu Apr 08 13:10:39 2010 +0000
@@ -23,6 +23,9 @@
 import org.w3c.dom.Element;
 
 /**
+ * This class provides some methods to create files storing meta information
+ * about wms layers and a map service which serves these layers.
+ * 
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class MetaWriter {
@@ -41,9 +44,22 @@
 
     public static final String CONTEXT_LAYER_TITLE = "wms.title";
 
+    /**
+     * Constructor.
+     */
     private MetaWriter() {
     }
 
+    /**
+     * Writes a meta information file for product type 'Layer'.
+     * 
+     * @param context CallContext object.
+     * @param uuid The UUID of the current artifact.
+     * @param path The destination of the meta file.
+     * @param paramType The parameter type.
+     * @param layerType The layer type.
+     * @return the meta document.
+     */
     public static Document writeLayerMeta(CallContext context,
                                           String      uuid,
                                           String      path,
@@ -68,6 +84,16 @@
         }
     }
 
+
+    /**
+     * Writes a meta information file for product type 'Horizontalschnitt'.
+     *
+     * @param context The CallContext object.
+     * @param uuid The UUID of the current artifact.
+     * @param path The destination of the meta file.
+     * @param paramType The parameter type.
+     * @return the meta document.
+     */
     public static Document writeHorizontalcrosssectionMeta(
         CallContext context,
         String      uuid,
@@ -84,8 +110,8 @@
         meta.appendChild(root);
 
         writeAbstractMeta(context, meta, root);
-        writePolygonMeta(context, meta, root, uuid, path, paramType);
-        writeIsolineMeta(context, meta, root, uuid, path, paramType);
+        writePolygonMeta(context, meta, root, uuid, paramType);
+        writeIsolineMeta(context, meta, root, uuid, paramType);
 
         boolean success = writeMetaFile(path, meta);
 
@@ -97,8 +123,10 @@
     }
 
     /**
-     * @param path
-     * @param meta
+     * Method to write the <i>meta</i> document down to a file.
+     *
+     * @param path The destination of the file.
+     * @param meta The xml document storing the meta information.
      */
     private static boolean writeMetaFile(String path, Document meta) {
         try {
@@ -144,6 +172,13 @@
     }
 
 
+    /**
+     * Append meta information about the mapservice itself.
+     *
+     * @param callContext The CallContext object.
+     * @param document The meta information document.
+     * @param meta The element where the new information need to be appended to.
+     */
     public static void writeAbstractMeta(
         CallContext callContext,
         Document    document,
@@ -180,6 +215,16 @@
         meta.appendChild(mapserver);
     }
 
+    /**
+     * Append layer information to the meta document.
+     *
+     * @param callContext The CallContext object.
+     * @param document The meta document.
+     * @param meta The element where the new information need to be appended to.
+     * @param uuid The UUID of the current artifact.
+     * @param paramType The parameter type (e.g. salinity).
+     * @param layerType The layer type.
+     */
     protected static void writeLayerMeta(
         CallContext callContext,
         Document    document,
@@ -225,12 +270,20 @@
     }
 
 
+    /**
+     * Append polygon layer information to meta document.
+     *
+     * @param context
+     * @param document The meta document.
+     * @param meta The element where the new information need to be appended to.
+     * @param uuid The UUID of the current artifact.
+     * @param paramType The parameter type (e.g. salinity).
+     */
     public static void writePolygonMeta(
         CallContext context,
         Document    document,
         Element     meta,
         String      uuid,
-        String      path,
         String      paramType
     ) {
         XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(
@@ -274,12 +327,20 @@
     }
 
 
+    /**
+     * Append isoline layer information to meta document.
+     *
+     * @param context
+     * @param document The meta document.
+     * @param meta The element where the new information need to be appended to.
+     * @param uuid The UUID of the current artifact.
+     * @param paramType The parameter type (e.g. salinity).
+     */
     public static void writeIsolineMeta(
         CallContext context,
         Document    document,
         Element     meta,
         String      uuid,
-        String      path,
         String      paramType
     ) {
         XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator(

http://dive4elements.wald.intevation.org