From 6db046a6266ca1c9bd48986975f0fc1ba5586dd0 Mon Sep 17 00:00:00 2001 From: Oscar Fonts Date: Tue, 26 Jun 2012 18:02:34 +0200 Subject: [PATCH] Override toString() in DataStoreType, UploadMethod, DataStoreExtension, CoverageStoreExtension. Closes #24 --- .../rest/GeoServerRESTPublisher.java | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java b/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java index aace0ba..19502c2 100644 --- a/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java +++ b/src/main/java/it/geosolutions/geoserver/rest/GeoServerRESTPublisher.java @@ -609,6 +609,15 @@ public class GeoServerRESTPublisher { return "coverages.xml"; } } + + /** + * Returns a lowercase representation of the parameter value, suitable + * to construct the rest call. + */ + @Override + public String toString() { + return this.name().toLowerCase(); + } } /** @@ -637,7 +646,16 @@ public class GeoServerRESTPublisher { * forgo upload, and use an existing file on the server. The body of the * request is the absolute local path to the existing file. */ - EXTERNAL + EXTERNAL; + + /** + * Returns a lowercase representation of the parameter value, suitable + * to construct the rest call. + */ + @Override + public String toString() { + return this.name().toLowerCase(); + } } /** @@ -659,7 +677,16 @@ public class GeoServerRESTPublisher { /** H2 Database */ H2, /** SpatiaLite Database */ - SPATIALITE + SPATIALITE; + + /** + * Returns a lowercase representation of the parameter value, suitable + * to construct the rest call. + */ + @Override + public String toString() { + return this.name().toLowerCase(); + } } /** @@ -678,7 +705,16 @@ public class GeoServerRESTPublisher { /** ImageMosaic */ IMAGEMOSAIC, /** Geo referenced image (JPEG,PNG,TIF) */ - WORLDIMAGE + WORLDIMAGE; + + /** + * Returns a lowercase representation of the parameter value, suitable + * to construct the rest call. + */ + @Override + public String toString() { + return this.name().toLowerCase(); + } } /** @@ -1144,7 +1180,7 @@ public class GeoServerRESTPublisher { * the name of the workspace to use * @param storename * the name of the store to create - * @param layername + * @param layerName * the name of the layer to configure * @param zipFile * The zipped file to publish