From 2259c746c8b38e87dcb0ad565d5340b402ef3359 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Wed, 13 Jan 2016 16:41:16 +0000 Subject: [PATCH] Added new javadoc git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@122220 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../resolver/gis/GisResolver.java | 13 ------- .../resolver/gis/entity/GeoserverBaseUri.java | 37 ++++++++++++++++--- .../GeonetworkInstanceException.java | 21 +++++++---- ...iewerAppGenericResourcePropertyReader.java | 31 ++++++++++++---- .../PropertyFileNotFoundException.java | 14 ++++++- 5 files changed, 82 insertions(+), 34 deletions(-) diff --git a/src/main/java/org/gcube/datatransfer/resolver/gis/GisResolver.java b/src/main/java/org/gcube/datatransfer/resolver/gis/GisResolver.java index d33287f..222e19f 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/gis/GisResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/gis/GisResolver.java @@ -37,23 +37,10 @@ import org.slf4j.LoggerFactory; */ public class GisResolver extends HttpServlet{ - /** - * - */ private static final String UTF_8 = "UTF-8"; - /** - * - */ private static final String TEXT_PLAIN = "text/plain"; - /** - * - */ public static final String PARAM_SEPARATOR_REPLACEMENT_VALUE = "%%"; public static final String PARAM_SEPARATOR_REPLACEMENT_KEY = "separtor"; - - /** - * - */ private static final long serialVersionUID = 5605107730993617579L; public static final String GIS_UUID = "gis-UUID"; diff --git a/src/main/java/org/gcube/datatransfer/resolver/gis/entity/GeoserverBaseUri.java b/src/main/java/org/gcube/datatransfer/resolver/gis/entity/GeoserverBaseUri.java index 34826d2..f98adc7 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/gis/entity/GeoserverBaseUri.java +++ b/src/main/java/org/gcube/datatransfer/resolver/gis/entity/GeoserverBaseUri.java @@ -5,10 +5,12 @@ package org.gcube.datatransfer.resolver.gis.entity; import java.io.Serializable; + /** + * The Class GeoserverBaseUri. + * * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * @May 21, 2013 - * + * Jan 13, 2016 */ public class GeoserverBaseUri implements Serializable{ @@ -20,36 +22,61 @@ public class GeoserverBaseUri implements Serializable{ private String scope = ""; /** - * + * Instantiates a new geoserver base uri. */ public GeoserverBaseUri() { } /** - * @param baseUrl - * @param scope + * Instantiates a new geoserver base uri. + * + * @param baseUrl the base url + * @param scope the scope */ public GeoserverBaseUri(String baseUrl, String scope) { this.baseUrl = baseUrl; this.scope = scope; } + /** + * Gets the base url. + * + * @return the base url + */ public String getBaseUrl() { return baseUrl; } + /** + * Sets the base url. + * + * @param baseUrl the new base url + */ public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } + /** + * Gets the scope. + * + * @return the scope + */ public String getScope() { return scope; } + /** + * Sets the scope. + * + * @param scope the new scope + */ public void setScope(String scope) { this.scope = scope; } + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/src/main/java/org/gcube/datatransfer/resolver/gis/exception/GeonetworkInstanceException.java b/src/main/java/org/gcube/datatransfer/resolver/gis/exception/GeonetworkInstanceException.java index ecbb212..6baf726 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/gis/exception/GeonetworkInstanceException.java +++ b/src/main/java/org/gcube/datatransfer/resolver/gis/exception/GeonetworkInstanceException.java @@ -5,32 +5,37 @@ package org.gcube.datatransfer.resolver.gis.exception; import org.gcube.spatial.data.geonetwork.configuration.AuthorizationException; + /** - * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it - * @Oct 14, 2014 + * The Class GeonetworkInstanceException. * + * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it + * Jan 13, 2016 */ public class GeonetworkInstanceException extends Exception { - - /** - * - */ private static final long serialVersionUID = 8589705350737964325L; /** - * + * Instantiates a new geonetwork instance exception. */ public GeonetworkInstanceException() { super(); } + /** + * Instantiates a new geonetwork instance exception. + * + * @param message the message + */ public GeonetworkInstanceException(String message) { super(message); } /** - * @param e + * Instantiates a new geonetwork instance exception. + * + * @param e the e */ public GeonetworkInstanceException(AuthorizationException e) { super(e); diff --git a/src/main/java/org/gcube/datatransfer/resolver/gis/property/GisViewerAppGenericResourcePropertyReader.java b/src/main/java/org/gcube/datatransfer/resolver/gis/property/GisViewerAppGenericResourcePropertyReader.java index 9330acd..b26d79c 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/gis/property/GisViewerAppGenericResourcePropertyReader.java +++ b/src/main/java/org/gcube/datatransfer/resolver/gis/property/GisViewerAppGenericResourcePropertyReader.java @@ -6,6 +6,12 @@ import java.util.Properties; import org.apache.log4j.Logger; +/** + * The Class GisViewerAppGenericResourcePropertyReader. + * + * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it + * Jan 13, 2016 + */ public class GisViewerAppGenericResourcePropertyReader { protected static final String GENERIC_RESOURCE_GCUBE_APPS_PROPERTIES = "gisviewerappgenericresource.properties"; @@ -14,23 +20,23 @@ public class GisViewerAppGenericResourcePropertyReader { private String appId; private String genericResource; - + private Logger logger = Logger.getLogger(GisViewerAppGenericResourcePropertyReader.class); + /** + * Instantiates a new gis viewer app generic resource property reader. + * + * @throws PropertyFileNotFoundException the property file not found exception + */ public GisViewerAppGenericResourcePropertyReader() throws PropertyFileNotFoundException { Properties prop = new Properties(); - try { - InputStream in = (InputStream) GisViewerAppGenericResourcePropertyReader.class.getResourceAsStream(GENERIC_RESOURCE_GCUBE_APPS_PROPERTIES); - // load a properties file prop.load(in); - // get the property value - the application Id this.appId = prop.getProperty(APP_ID); - this.genericResource = prop.getProperty(SECONDARY_TYPE); } catch (IOException e) { @@ -39,14 +45,25 @@ public class GisViewerAppGenericResourcePropertyReader { } } + /** + * Gets the app id. + * + * @return the app id + */ public String getAppId() { return appId; } + /** + * Gets the generic resource. + * + * @return the generic resource + */ public String getGenericResource() { return genericResource; } + /* public static void main(String[] args) { try { GisViewerAppGenericResourcePropertyReader reader = new GisViewerAppGenericResourcePropertyReader(); @@ -56,6 +73,6 @@ public class GisViewerAppGenericResourcePropertyReader { // TODO Auto-generated catch block e.printStackTrace(); } - } + }*/ } diff --git a/src/main/java/org/gcube/datatransfer/resolver/gis/property/PropertyFileNotFoundException.java b/src/main/java/org/gcube/datatransfer/resolver/gis/property/PropertyFileNotFoundException.java index 7a0bdc9..1221c84 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/gis/property/PropertyFileNotFoundException.java +++ b/src/main/java/org/gcube/datatransfer/resolver/gis/property/PropertyFileNotFoundException.java @@ -1,8 +1,20 @@ package org.gcube.datatransfer.resolver.gis.property; +/** + * The Class PropertyFileNotFoundException. + * + * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it + * Jan 13, 2016 + */ @SuppressWarnings("serial") public class PropertyFileNotFoundException extends Exception { - public PropertyFileNotFoundException(String message) { + + /** + * Instantiates a new property file not found exception. + * + * @param message the message + */ + public PropertyFileNotFoundException(String message) { super(message); } } \ No newline at end of file