Mercurial > dive4elements > framework
changeset 93:e27cf9c84eb8
Unified imports.
artifacts/trunk@849 c6561f87-3c4e-4783-a992-168aeb5c3f6f
line wrap: on
line diff
--- a/ChangeLog Sun Mar 28 14:16:05 2010 +0000 +++ b/ChangeLog Sun Mar 28 15:57:40 2010 +0000 @@ -1,3 +1,28 @@ +2010-03-28 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * artifact-database/src/main/java/de/intevation/artifactdatabase/ProxyArtifact.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/SQL.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactContextFactory.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DBConnection.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/App.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultCallMeta.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactSerializer.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/BaseResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/FactoriesResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/OutRepresentation.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultServiceFactory.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java, + artifacts/src/main/java/de/intevation/artifacts/ArtifactNamespaceContext.java: + Sorted imports. + 2010-03-28 Sascha L. Teichmann <sascha.teichmann@intevation.de> * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java,
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/App.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/App.java Sun Mar 28 15:57:40 2010 +0000 @@ -10,7 +10,6 @@ import org.slf4j.bridge.SLF4JBridgeHandler; - /** * Starting point of the artifact database. *
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,17 +1,17 @@ package de.intevation.artifactdatabase; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.PreparedStatement; -import java.sql.Types; -import java.sql.ResultSet; - -import javax.sql.DataSource; - import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.ArtifactSerializer; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; + +import javax.sql.DataSource; + import org.apache.log4j.Logger; /**
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/Config.java Sun Mar 28 15:57:40 2010 +0000 @@ -3,21 +3,21 @@ import java.io.File; import java.io.IOException; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; +import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.namespace.QName; - import javax.xml.xpath.XPathConstants; import org.apache.log4j.Logger; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import org.xml.sax.SAXException; + /** * The central access to the configuration of the artifact database. * This class provides some static methods to access the central @@ -265,4 +265,4 @@ : s; } } -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DBConnection.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DBConnection.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,13 +1,13 @@ package de.intevation.artifactdatabase; +import java.io.File; + +import java.sql.SQLException; + import javax.sql.DataSource; -import java.sql.SQLException; - import org.apache.commons.dbcp.BasicDataSource; -import java.io.File; - import org.apache.log4j.Logger; /**
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java Sun Mar 28 15:57:40 2010 +0000 @@ -3,17 +3,17 @@ import de.intevation.artifacts.Artifact; import java.sql.Connection; -import java.sql.SQLException; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.SQLException; + +import java.util.ArrayList; +import java.util.List; import javax.sql.DataSource; import org.apache.log4j.Logger; -import java.util.ArrayList; -import java.util.List; - /** * The database cleaner runs in background. It sleep for a configurable * while and when it wakes up it removes outdated artifacts from the
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactContextFactory.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactContextFactory.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,9 +1,9 @@ package de.intevation.artifactdatabase; +import de.intevation.artifacts.ArtifactContextFactory; + import org.w3c.dom.Document; -import de.intevation.artifacts.ArtifactContextFactory; - /** * Default implementation of the context factory. * Creates a new @see DefaultArtifactContext.
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactFactory.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,13 +1,14 @@ package de.intevation.artifactdatabase; -import org.apache.log4j.Logger; -import org.w3c.dom.Document; -import org.w3c.dom.Node; - import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.ArtifactSerializer; +import org.apache.log4j.Logger; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; + /** * Trivial implementation of the ArtifactFactory interface. * Time to live (ttl), name and description are configured
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactSerializer.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifactSerializer.java Sun Mar 28 15:57:40 2010 +0000 @@ -3,16 +3,16 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactSerializer; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.InputStream; -import java.io.IOException; -import java.io.OutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.io.ByteArrayOutputStream; -import java.io.ByteArrayInputStream; +import java.io.OutputStream; +import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; -import java.util.zip.GZIPInputStream; import org.apache.log4j.Logger;
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultCallMeta.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultCallMeta.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,10 +1,10 @@ package de.intevation.artifactdatabase; -import java.util.Locale; - import de.intevation.artifacts.CallMeta; import de.intevation.artifacts.PreferredLocale; +import java.util.Locale; + /** * Default implementation of CallMeta. It provides a list of * preferred langauages and implements an intersection mechanism
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultServiceFactory.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultServiceFactory.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,13 +1,13 @@ package de.intevation.artifactdatabase; +import de.intevation.artifacts.Service; +import de.intevation.artifacts.ServiceFactory; + +import org.apache.log4j.Logger; + import org.w3c.dom.Document; import org.w3c.dom.Node; -import de.intevation.artifacts.ServiceFactory; -import de.intevation.artifacts.Service; - -import org.apache.log4j.Logger; - /** * Trivial implementation of the ServiceFactory interface. * Name and an description are configured by the given Node given to
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ProxyArtifact.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ProxyArtifact.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,14 +1,14 @@ package de.intevation.artifactdatabase; -import org.w3c.dom.Document; - import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; +import java.io.IOException; +import java.io.OutputStream; + import org.apache.log4j.Logger; -import java.io.IOException; -import java.io.OutputStream; +import org.w3c.dom.Document; /** * The proxy artifact is a wrapper around another artifact. It simply forwards
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/SQL.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/SQL.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,10 +1,10 @@ package de.intevation.artifactdatabase; -import java.util.Properties; - import java.io.IOException; import java.io.InputStream; +import java.util.Properties; + import org.apache.log4j.Logger; /**
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,29 +1,29 @@ package de.intevation.artifactdatabase.rest; +import de.intevation.artifactdatabase.XMLUtils; + +import de.intevation.artifacts.ArtifactDatabase; +import de.intevation.artifacts.ArtifactDatabaseException; +import de.intevation.artifacts.ArtifactNamespaceContext; + +import java.io.IOException; + import org.apache.log4j.Logger; -import org.restlet.resource.ResourceException; - +import org.restlet.data.MediaType; import org.restlet.data.Request; import org.restlet.data.Response; import org.restlet.data.Status; -import org.restlet.data.MediaType; - -import org.restlet.representation.Representation; -import org.restlet.representation.EmptyRepresentation; import org.restlet.ext.xml.DomRepresentation; -import de.intevation.artifactdatabase.XMLUtils; +import org.restlet.representation.EmptyRepresentation; +import org.restlet.representation.Representation; -import de.intevation.artifacts.ArtifactNamespaceContext; -import de.intevation.artifacts.ArtifactDatabaseException; -import de.intevation.artifacts.ArtifactDatabase; +import org.restlet.resource.ResourceException; import org.w3c.dom.Document; -import java.io.IOException; - /** * Resource to serve the out()-outputs of artifacts. * @author <a href="mailto:sascha.teichmann@intevation">Sascha L. Teichmann</a>
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,30 +1,30 @@ package de.intevation.artifactdatabase.rest; -import org.restlet.resource.ResourceException; +import de.intevation.artifactdatabase.XMLUtils; -import org.restlet.representation.Representation; -import org.restlet.representation.EmptyRepresentation; +import de.intevation.artifacts.Artifact; +import de.intevation.artifacts.ArtifactDatabase; +import de.intevation.artifacts.ArtifactDatabaseException; +import de.intevation.artifacts.ArtifactNamespaceContext; + +import java.io.IOException; + +import org.apache.log4j.Logger; + +import org.restlet.data.MediaType; +import org.restlet.data.Request; +import org.restlet.data.Response; +import org.restlet.data.Status; import org.restlet.ext.xml.DomRepresentation; -import de.intevation.artifacts.ArtifactDatabase; -import de.intevation.artifacts.ArtifactDatabaseException; -import de.intevation.artifacts.Artifact; -import de.intevation.artifacts.ArtifactNamespaceContext; +import org.restlet.representation.EmptyRepresentation; +import org.restlet.representation.Representation; -import org.restlet.data.Request; -import org.restlet.data.Response; -import org.restlet.data.Status; -import org.restlet.data.MediaType; - -import org.apache.log4j.Logger; +import org.restlet.resource.ResourceException; import org.w3c.dom.Document; -import java.io.IOException; - -import de.intevation.artifactdatabase.XMLUtils; - /** * Resource to expose the core artifact methods * (describe, feed and advance) via REST.
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/BaseResource.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/BaseResource.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,24 +1,24 @@ package de.intevation.artifactdatabase.rest; +import de.intevation.artifactdatabase.DefaultCallMeta; +import de.intevation.artifactdatabase.DefaultPreferredLocale; + import de.intevation.artifacts.CallMeta; import de.intevation.artifacts.PreferredLocale; +import java.util.Iterator; +import java.util.List; + import org.apache.log4j.Logger; -import org.restlet.resource.ServerResource; -import org.restlet.resource.ResourceException; +import org.restlet.data.ClientInfo; +import org.restlet.data.Language; +import org.restlet.data.Preference; import org.restlet.representation.Representation; -import org.restlet.data.Language; -import org.restlet.data.ClientInfo; -import org.restlet.data.Preference; - -import java.util.List; -import java.util.Iterator; - -import de.intevation.artifactdatabase.DefaultCallMeta; -import de.intevation.artifactdatabase.DefaultPreferredLocale; +import org.restlet.resource.ResourceException; +import org.restlet.resource.ServerResource; /** * Base class for the resources of REST interface of the artifact database.
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,21 +1,27 @@ package de.intevation.artifactdatabase.rest; +import de.intevation.artifactdatabase.XMLUtils; + +import de.intevation.artifacts.ArtifactDatabase; +import de.intevation.artifacts.ArtifactDatabaseException; +import de.intevation.artifacts.ArtifactNamespaceContext; + import java.io.IOException; import org.apache.log4j.Logger; + import org.restlet.data.MediaType; import org.restlet.data.Response; import org.restlet.data.Status; + import org.restlet.ext.xml.DomRepresentation; + import org.restlet.representation.EmptyRepresentation; import org.restlet.representation.Representation; -import org.restlet.resource.ResourceException; -import org.w3c.dom.Document; -import de.intevation.artifactdatabase.XMLUtils; -import de.intevation.artifacts.ArtifactDatabase; -import de.intevation.artifacts.ArtifactDatabaseException; -import de.intevation.artifacts.ArtifactNamespaceContext; +import org.restlet.resource.ResourceException; + +import org.w3c.dom.Document; /** * Resource to create a new artifact within artifact database.
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/FactoriesResource.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/FactoriesResource.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,24 +1,25 @@ package de.intevation.artifactdatabase.rest; +import de.intevation.artifactdatabase.XMLUtils.ElementCreator; + +import de.intevation.artifactdatabase.XMLUtils; + import de.intevation.artifacts.ArtifactDatabase; import de.intevation.artifacts.ArtifactNamespaceContext; +import org.apache.log4j.Logger; + import org.restlet.data.MediaType; -import org.restlet.resource.ResourceException; - import org.restlet.ext.xml.DomRepresentation; import org.restlet.representation.Representation; -import de.intevation.artifactdatabase.XMLUtils; -import de.intevation.artifactdatabase.XMLUtils.ElementCreator; +import org.restlet.resource.ResourceException; import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.apache.log4j.Logger; - /** * Resource to list the available factories. * @author <a href="mailto:sascha.teichmann@intevation">Sascha L. Teichmann</a>
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/OutRepresentation.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/OutRepresentation.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,14 +1,14 @@ package de.intevation.artifactdatabase.rest; -import org.restlet.representation.OutputRepresentation; - -import org.restlet.data.MediaType; - import de.intevation.artifacts.ArtifactDatabase.DeferredOutput; import java.io.IOException; import java.io.OutputStream; +import org.restlet.data.MediaType; + +import org.restlet.representation.OutputRepresentation; + /** * Special representation to serve the out()-outputs * via DeferredOutput efficently .
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ServiceResource.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,24 +1,24 @@ package de.intevation.artifactdatabase.rest; -import org.restlet.representation.Representation; -import org.restlet.representation.EmptyRepresentation; - -import org.restlet.ext.xml.DomRepresentation; - import de.intevation.artifacts.ArtifactDatabase; import de.intevation.artifacts.ArtifactDatabaseException; +import java.io.IOException; + +import org.apache.log4j.Logger; + +import org.restlet.data.MediaType; import org.restlet.data.Request; import org.restlet.data.Response; import org.restlet.data.Status; -import org.restlet.data.MediaType; -import org.apache.log4j.Logger; +import org.restlet.ext.xml.DomRepresentation; + +import org.restlet.representation.EmptyRepresentation; +import org.restlet.representation.Representation; import org.w3c.dom.Document; -import java.io.IOException; - /** * Resource to process incoming XML documents with a given service. *
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/rest/Standalone.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,15 +1,15 @@ package de.intevation.artifactdatabase.rest; +import de.intevation.artifactdatabase.Config; + +import de.intevation.artifacts.ArtifactDatabase; + +import org.apache.log4j.Logger; + import org.restlet.Component; import org.restlet.data.Protocol; -import de.intevation.artifacts.ArtifactDatabase; - -import de.intevation.artifactdatabase.Config; - -import org.apache.log4j.Logger; - /** * Starts an HTTP server bound to a RestApp. * The server (binding interface and port) is configure via the @@ -94,4 +94,4 @@ } } } -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/artifacts/src/main/java/de/intevation/artifacts/ArtifactNamespaceContext.java Sun Mar 28 14:16:05 2010 +0000 +++ b/artifacts/src/main/java/de/intevation/artifacts/ArtifactNamespaceContext.java Sun Mar 28 15:57:40 2010 +0000 @@ -1,11 +1,11 @@ package de.intevation.artifacts; +import java.util.Iterator; + import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; -import java.util.Iterator; - /** * The namespace used in artifact documents. * @author <a href="mailto:sascha.teichmann@intevation">Sascha L. Teichmann</a>