changeset 823:499cfbbb61bc

Removed obsolet SuppressWarnings-Annotations. gnv-artifacts/trunk@910 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 13 Apr 2010 08:25:34 +0000
parents ac1b9f00603f
children 7e5995c47125
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/CoordinateSelectionState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/MinMaxDateState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/MinMaxState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java gnv-artifacts/src/main/java/de/intevation/gnv/statistics/HorizontalProfileStatistics.java gnv-artifacts/src/main/java/de/intevation/gnv/utils/ArtifactXMLUtilities.java
diffstat 10 files changed, 95 insertions(+), 152 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Tue Apr 13 08:25:34 2010 +0000
@@ -1,3 +1,16 @@
+2010-04-13  Tim Englich  <tim.englich@intevation.de>
+
+	* src/main/java/de/intevation/gnv/state/CoordinateSelectionState.java,
+	  src/main/java/de/intevation/gnv/state/MinMaxDateState.java,
+	  src/main/java/de/intevation/gnv/state/MinMaxState.java,
+	  src/main/java/de/intevation/gnv/artifacts/services/MetaDataService.java,
+	  src/main/java/de/intevation/gnv/state/OutputStateBase.java,
+	  src/main/java/de/intevation/gnv/state/StateBase.java,
+	  src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java,
+	  src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java,
+	  src/main/java/de/intevation/gnv/utils/ArtifactXMLUtilities.java : 
+	  Removed obsolet SuppressWarnings-Annotations.
+
 2010-04-12  Tim Englich  <tim.englich@intevation.de>
 
 	* src/main/java/de/intevation/gnv/state/layer/package.html: 
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/CoordinateSelectionState.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/CoordinateSelectionState.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,22 +1,5 @@
 package de.intevation.gnv.state;
 
-import com.vividsolutions.jts.geom.Point;
-
-import de.intevation.artifactdatabase.Config;
-
-import de.intevation.gnv.geobackend.base.Result;
-
-import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData;
-import de.intevation.gnv.state.describedata.KeyValueDescibeData;
-import de.intevation.gnv.state.describedata.NamedArrayList;
-import de.intevation.gnv.state.describedata.NamedCollection;
-
-import de.intevation.gnv.utils.ArtifactXMLUtilities;
-import de.intevation.gnv.utils.InputValidator;
-import de.intevation.gnv.utils.WKTUtils;
-
-import de.intevation.gnv.utils.exception.ValidationException;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -24,11 +7,23 @@
 import java.util.List;
 
 import org.apache.log4j.Logger;
-
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import com.vividsolutions.jts.geom.Point;
+
+import de.intevation.artifactdatabase.Config;
+import de.intevation.gnv.geobackend.base.Result;
+import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData;
+import de.intevation.gnv.state.describedata.KeyValueDescibeData;
+import de.intevation.gnv.state.describedata.NamedArrayList;
+import de.intevation.gnv.state.describedata.NamedCollection;
+import de.intevation.gnv.utils.ArtifactXMLUtilities;
+import de.intevation.gnv.utils.InputValidator;
+import de.intevation.gnv.utils.WKTUtils;
+import de.intevation.gnv.utils.exception.ValidationException;
+
 /**
  * This state handles coordinate input by the user. It searches database results
  * for coordinates and turns them into a human readable form.
@@ -89,7 +84,6 @@
         double distance=0.;
         String returnValue = null;
         try {
-            @SuppressWarnings("static-access")
             Point center = InputValidator.getPointValue(value);
             String meshId = super.inputData.get("meshid").getValue();
             int segments = 97;
@@ -129,7 +123,6 @@
             Result resultValue = rit.next();
             String key = resultValue.getString(keyid);
             if(prevKey == null || !prevKey.equals(key)){ // TODO: FIXME: We have to do that because the arcsde does not support a distinct Query on Layers
-                @SuppressWarnings("static-access")
                 String geomString = CoordinateSelectionState.convert2DisplayCoordinate(resultValue.getString(valueid));
                 String value = geomString;
                 if (resultValue.getResultDescriptor().getColumnIndex("VALUE") > 0){
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/MinMaxDateState.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/MinMaxDateState.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,28 +1,22 @@
 package de.intevation.gnv.state;
 
-import de.intevation.artifacts.CallContext;
-
-import de.intevation.gnv.artifacts.ressource.RessourceFactory;
-
-import de.intevation.gnv.geobackend.util.DateUtils;
-
-import de.intevation.gnv.state.describedata.DefaultMinMaxDescribeData;
-import de.intevation.gnv.state.describedata.DescribeData;
-import de.intevation.gnv.state.describedata.MinMaxDescribeData;
-
-import de.intevation.gnv.state.exception.StateException;
-
-import de.intevation.gnv.utils.InputValidator;
-
-import java.util.GregorianCalendar;
 import java.util.Collection;
 import java.util.Date;
+import java.util.GregorianCalendar;
 import java.util.Iterator;
 import java.util.Locale;
 
 import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
 
-import org.w3c.dom.Document;
+import de.intevation.artifacts.CallContext;
+import de.intevation.gnv.artifacts.ressource.RessourceFactory;
+import de.intevation.gnv.geobackend.util.DateUtils;
+import de.intevation.gnv.state.describedata.DefaultMinMaxDescribeData;
+import de.intevation.gnv.state.describedata.DescribeData;
+import de.intevation.gnv.state.describedata.MinMaxDescribeData;
+import de.intevation.gnv.state.exception.StateException;
+import de.intevation.gnv.utils.InputValidator;
 
 /**
  * This state handles date input. The resulting describe document of this state
@@ -76,7 +70,6 @@
      * {@link #getDescibeData(java.lang.String)}.
      */
     @Override
-    @SuppressWarnings({"static-access", "static-access", "static-access"})
     public Document feed(
         CallContext           context,
         Collection<InputData> inputData,
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/MinMaxState.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/MinMaxState.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,24 +1,5 @@
 package de.intevation.gnv.state;
 
-import de.intevation.artifactdatabase.XMLUtils;
-
-import de.intevation.artifacts.CallContext;
-import de.intevation.artifacts.CallMeta;
-
-import de.intevation.gnv.artifacts.ressource.RessourceFactory;
-
-import de.intevation.gnv.geobackend.base.Result;
-
-import de.intevation.gnv.geobackend.util.DateUtils;
-
-import de.intevation.gnv.state.describedata.DefaultMinMaxDescribeData;
-import de.intevation.gnv.state.describedata.DescribeData;
-import de.intevation.gnv.state.describedata.MinMaxDescribeData;
-
-import de.intevation.gnv.state.exception.StateException;
-
-import de.intevation.gnv.utils.InputValidator;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
@@ -27,11 +8,22 @@
 import java.util.List;
 
 import org.apache.log4j.Logger;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+import de.intevation.artifactdatabase.XMLUtils;
+import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
+import de.intevation.gnv.artifacts.ressource.RessourceFactory;
+import de.intevation.gnv.geobackend.base.Result;
+import de.intevation.gnv.geobackend.util.DateUtils;
+import de.intevation.gnv.state.describedata.DefaultMinMaxDescribeData;
+import de.intevation.gnv.state.describedata.DescribeData;
+import de.intevation.gnv.state.describedata.MinMaxDescribeData;
+import de.intevation.gnv.state.exception.StateException;
+import de.intevation.gnv.utils.InputValidator;
+
 /**
  * This state handles input of a min and max value and validates the user input.
  * The min value needs to be equal or smaller than the max value, otherwise the
@@ -83,7 +75,6 @@
 
 
     @Override
-    @SuppressWarnings("static-access")
     public Document feed(
         CallContext           context,
         Collection<InputData> inputData,
@@ -116,7 +107,6 @@
                 return feedFailure(msg);
             }
 
-            @SuppressWarnings("static-access")
             boolean valid = InputValidator.isInputValid(value, type);
             if (!valid) {
                 String msg = "Input is not valid for this state.";
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java	Tue Apr 13 08:25:34 2010 +0000
@@ -363,7 +363,6 @@
      * inserted via feed!
      */
     @Override
-    @SuppressWarnings({"static-access", "static-access", "static-access", "static-access"})
     public void putInputData(Collection<InputData> inputData,
                              String uuid)
                                          throws StateException {
@@ -384,7 +383,6 @@
                                 inputData.size());
                     }
 
-                    @SuppressWarnings("static-access")
                     boolean valid = InputValidator.isInputValid(tmpItem.getValue(),
                             inputValue.getType());
                     if (valid) {
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,37 +1,5 @@
 package de.intevation.gnv.state;
 
-import de.intevation.artifactdatabase.Config;
-import de.intevation.artifactdatabase.XMLUtils;
-
-import de.intevation.artifacts.ArtifactNamespaceContext;
-import de.intevation.artifacts.CallContext;
-import de.intevation.artifacts.CallMeta;
-
-import de.intevation.gnv.artifacts.cache.CacheFactory;
-
-import de.intevation.gnv.artifacts.ressource.RessourceFactory;
-
-import de.intevation.gnv.geobackend.base.Result;
-
-import de.intevation.gnv.geobackend.base.query.QueryExecutor;
-import de.intevation.gnv.geobackend.base.query.QueryExecutorFactory;
-
-import de.intevation.gnv.geobackend.base.query.exception.QueryException;
-
-import de.intevation.gnv.geobackend.util.DateUtils;
-
-import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData;
-import de.intevation.gnv.state.describedata.KeyValueDescibeData;
-import de.intevation.gnv.state.describedata.MinMaxDescribeData;
-import de.intevation.gnv.state.describedata.NamedArrayList;
-import de.intevation.gnv.state.describedata.NamedCollection;
-import de.intevation.gnv.state.describedata.SingleValueDescribeData;
-
-import de.intevation.gnv.state.exception.StateException;
-
-import de.intevation.gnv.utils.ArtifactXMLUtilities;
-import de.intevation.gnv.utils.InputValidator;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -48,12 +16,33 @@
 import net.sf.ehcache.Cache;
 
 import org.apache.log4j.Logger;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
+import de.intevation.artifactdatabase.Config;
+import de.intevation.artifactdatabase.XMLUtils;
+import de.intevation.artifacts.ArtifactNamespaceContext;
+import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.CallMeta;
+import de.intevation.gnv.artifacts.cache.CacheFactory;
+import de.intevation.gnv.artifacts.ressource.RessourceFactory;
+import de.intevation.gnv.geobackend.base.Result;
+import de.intevation.gnv.geobackend.base.query.QueryExecutor;
+import de.intevation.gnv.geobackend.base.query.QueryExecutorFactory;
+import de.intevation.gnv.geobackend.base.query.exception.QueryException;
+import de.intevation.gnv.geobackend.util.DateUtils;
+import de.intevation.gnv.state.describedata.DefaultKeyValueDescribeData;
+import de.intevation.gnv.state.describedata.KeyValueDescibeData;
+import de.intevation.gnv.state.describedata.MinMaxDescribeData;
+import de.intevation.gnv.state.describedata.NamedArrayList;
+import de.intevation.gnv.state.describedata.NamedCollection;
+import de.intevation.gnv.state.describedata.SingleValueDescribeData;
+import de.intevation.gnv.state.exception.StateException;
+import de.intevation.gnv.utils.ArtifactXMLUtilities;
+import de.intevation.gnv.utils.InputValidator;
+
 /**
  * This is the major implementation of <code>State</code>. Nearly every other
  * state is derived by this class.
@@ -235,7 +224,6 @@
                                 inputData.size());
                     }
 
-                    @SuppressWarnings("static-access")
                     boolean valid = InputValidator.isInputValid(tmpItem.getValue(),
                             inputValue.getType());
                     if (valid) {
@@ -327,7 +315,6 @@
     }
 
 
-    @SuppressWarnings({"static-access", "static-access", "static-access", "static-access"})
     public void putInputData(Collection<InputData> inputData, String uuid)
     throws StateException {
         if (inputData != null) {
@@ -342,7 +329,6 @@
                                 inputData.size());
                     }
 
-                    @SuppressWarnings("static-access")
                     boolean valid = InputValidator.isInputValid(tmpItem.getValue(),
                             inputValue.getType());
                     if (valid) {
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,49 +1,35 @@
 package de.intevation.gnv.state.profile.horizontal;
 
-import de.intevation.artifacts.CallContext;
-
-import de.intevation.gnv.chart.Chart;
-import de.intevation.gnv.chart.ChartLabels;
-import de.intevation.gnv.chart.HorizontalProfileChart;
-
-import de.intevation.gnv.exports.DefaultExport;
-import de.intevation.gnv.exports.DefaultProfile;
-
-import de.intevation.gnv.exports.Export.Profile;
-
-import de.intevation.gnv.exports.ShapeDataCollector;
-
-import de.intevation.gnv.geobackend.base.Result;
-
-import de.intevation.gnv.state.InputData;
-
-import de.intevation.gnv.state.describedata.KeyValueDescibeData;
-
-import de.intevation.gnv.state.exception.StateException;
-
-import de.intevation.gnv.state.timeseries.TimeSeriesOutputState;
-
-import de.intevation.gnv.statistics.HorizontalProfileStatistics;
-import de.intevation.gnv.statistics.Statistics;
-
-import de.intevation.gnv.utils.InputValidator;
-import de.intevation.gnv.utils.WKTUtils;
-
 import java.io.IOException;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
-
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-
 import java.util.Collection;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.Locale;
 
 import org.apache.log4j.Logger;
+import org.jfree.chart.ChartTheme;
 
-import org.jfree.chart.ChartTheme;
+import de.intevation.artifacts.CallContext;
+import de.intevation.gnv.chart.Chart;
+import de.intevation.gnv.chart.ChartLabels;
+import de.intevation.gnv.chart.HorizontalProfileChart;
+import de.intevation.gnv.exports.DefaultExport;
+import de.intevation.gnv.exports.DefaultProfile;
+import de.intevation.gnv.exports.ShapeDataCollector;
+import de.intevation.gnv.exports.Export.Profile;
+import de.intevation.gnv.geobackend.base.Result;
+import de.intevation.gnv.state.InputData;
+import de.intevation.gnv.state.describedata.KeyValueDescibeData;
+import de.intevation.gnv.state.exception.StateException;
+import de.intevation.gnv.state.timeseries.TimeSeriesOutputState;
+import de.intevation.gnv.statistics.HorizontalProfileStatistics;
+import de.intevation.gnv.statistics.Statistics;
+import de.intevation.gnv.utils.InputValidator;
+import de.intevation.gnv.utils.WKTUtils;
 
 /**
  * This <code>OutputState</code> is used for 'Horizontalprofile' products.
@@ -301,7 +287,6 @@
      * @param result A data object.
      * @return the start coordinate as human readable string.
      */
-    @SuppressWarnings("static-access")
     protected String createMetaChartSubtitle(Locale locale, Result result) {
         log.debug("Fetch meta information and put it into subtitle.");
         if (result == null)
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java	Tue Apr 13 08:25:34 2010 +0000
@@ -665,14 +665,12 @@
         ArtifactXMLUtilities xmlUtilities = new ArtifactXMLUtilities();
         Document doc = XMLUtils.newDocument();
         if (statistic != null) {
-            @SuppressWarnings("static-access")
             Node statisticResults = ArtifactXMLUtilities.createArtifactElement(doc,
                     "statistics");
             doc.appendChild(statisticResults);
             Iterator<StatisticSet> it = statistic.iterator();
             while (it.hasNext()) {
                 StatisticSet set = it.next();
-                @SuppressWarnings("static-access")
                 Element setElement = ArtifactXMLUtilities.createArtifactElement(doc,
                                                                        "statistic");
                 setElement.setAttribute("name", set.getName());
@@ -680,7 +678,6 @@
                 Iterator<Statistic> sit = set.getStatistics().iterator();
                 while (sit.hasNext()){
                     Statistic s = sit.next();
-                    @SuppressWarnings("static-access")
                     Element result = ArtifactXMLUtilities.createArtifactElement(doc,
                     "statistic-value");
                     result.setAttribute("name", s.getKey());
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/statistics/HorizontalProfileStatistics.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/statistics/HorizontalProfileStatistics.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,22 +1,18 @@
 package de.intevation.gnv.statistics;
 
+import java.sql.SQLException;
+import java.util.Collection;
+
+import org.apache.log4j.Logger;
+
 import com.vividsolutions.jts.geom.Point;
-
 import com.vividsolutions.jts.io.ParseException;
 import com.vividsolutions.jts.io.WKTReader;
 
 import de.intevation.gnv.geobackend.base.Result;
-
 import de.intevation.gnv.state.describedata.KeyValueDescibeData;
-
 import de.intevation.gnv.utils.DistanceCalculator;
 
-import java.sql.SQLException;
-
-import java.util.Collection;
-
-import org.apache.log4j.Logger;
-
 /**
  * This class is used to create a statistic for 'Horizontalprofil' products.
  * 
@@ -47,7 +43,6 @@
         try {
             Point start = (Point)this.wktReader.read(previousRow.getString("SHAPE"));
             Point current = (Point)this.wktReader.read(row.getString("SHAPE"));
-            @SuppressWarnings("static-access")
             double delta = DistanceCalculator.calculateDistance(start, current);
 
             if (!Double.isNaN(delta)){
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/ArtifactXMLUtilities.java	Tue Apr 13 08:17:00 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/ArtifactXMLUtilities.java	Tue Apr 13 08:25:34 2010 +0000
@@ -1,7 +1,5 @@
 package de.intevation.gnv.utils;
 
-import de.intevation.artifacts.ArtifactNamespaceContext;
-
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -12,24 +10,21 @@
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
-
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.TransformerFactoryConfigurationError;
-
 import javax.xml.transform.dom.DOMSource;
-
 import javax.xml.transform.stream.StreamResult;
 
 import org.apache.log4j.Logger;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
 
-import org.xml.sax.SAXException;
+import de.intevation.artifacts.ArtifactNamespaceContext;
 
 /**
  * This class provides some methods for creating and working with xml documents.
@@ -125,10 +120,8 @@
     }
 
 
-    @SuppressWarnings("static-access")
     public Document reInitDocument(Document document) {
         try {
-            @SuppressWarnings("static-access")
             byte[] barray = ArtifactXMLUtilities.writeDocument2String(document).getBytes(
                     "UTF-8");
             InputStream inputStream = new ByteArrayInputStream(barray);

http://dive4elements.wald.intevation.org