Updadet javadoc
Refactor on method parameter git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/gis-viewer@121760 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c050d9a393
commit
1e710a28fb
|
@ -21,11 +21,8 @@ package org.gcube.portlets.user.gisviewer.client.commons.utils;
|
|||
* sld No A URL referencing a StyledLayerDescriptor XML file which controls or enhances map layers and styling
|
||||
* sld_body No A URL-encoded StyledLayerDescriptor XML document which controls or enhances map layers and styling
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* @Apr 26, 2013
|
||||
*
|
||||
*/
|
||||
public enum WmsParameters {
|
||||
|
||||
|
|
|
@ -48,11 +48,11 @@ public class WmsUrlValidator {
|
|||
* Parses the wms request.
|
||||
*
|
||||
* @param returnEmptyParameter the return empty parameter
|
||||
* @param fillEmptyParameterAsDefault the fill empty parameter as default
|
||||
* @param fillEmptyParameterAsDefaultValue the fill empty parameter as default
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public String parseWmsRequest(boolean returnEmptyParameter, boolean fillEmptyParameterAsDefault) throws Exception{
|
||||
public String parseWmsRequest(boolean returnEmptyParameter, boolean fillEmptyParameterAsDefaultValue) throws Exception{
|
||||
|
||||
if(wmsParameters==null || wmsParameters.isEmpty()){
|
||||
String msg = "IT IS NOT POSSIBLE TO PARSE WMS URL, 'WMS PARAMETERS' not found!";
|
||||
|
@ -63,57 +63,57 @@ public class WmsUrlValidator {
|
|||
for (WmsParameters wmsParam : WmsParameters.values()) {
|
||||
|
||||
if(wmsParam.equals(WmsParameters.BBOX)){
|
||||
String value = validateValueOfParameter(WmsParameters.BBOX, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter(WmsParameters.BBOX, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.FORMAT)){
|
||||
String value = validateValueOfParameter(WmsParameters.FORMAT, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter(WmsParameters.FORMAT, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.HEIGHT)){
|
||||
String value = validateValueOfParameter( WmsParameters.HEIGHT, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter( WmsParameters.HEIGHT, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.CRS)){
|
||||
String crs = validateValueOfParameter(WmsParameters.CRS, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String crs = validateValueOfParameter(WmsParameters.CRS, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), crs);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.WIDTH)){
|
||||
String value = validateValueOfParameter(WmsParameters.WIDTH, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter(WmsParameters.WIDTH, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.REQUEST)){
|
||||
String value = validateValueOfParameter(WmsParameters.REQUEST, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter(WmsParameters.REQUEST, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.SERVICE)){
|
||||
String value = validateValueOfParameter(WmsParameters.SERVICE, wmsParameters,fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter(WmsParameters.SERVICE, wmsParameters,fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.SRS)){
|
||||
String value = validateValueOfParameter(WmsParameters.SRS, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String value = validateValueOfParameter(WmsParameters.SRS, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), value);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.STYLES)){
|
||||
String styles = validateValueOfParameter(WmsParameters.STYLES, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String styles = validateValueOfParameter(WmsParameters.STYLES, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), styles);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.VERSION)){
|
||||
String version = validateValueOfParameter(WmsParameters.VERSION, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String version = validateValueOfParameter(WmsParameters.VERSION, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), version);
|
||||
}
|
||||
|
||||
if(wmsParam.equals(WmsParameters.LAYERS)){
|
||||
String layers = validateValueOfParameter(WmsParameters.LAYERS, wmsParameters, fillEmptyParameterAsDefault);
|
||||
String layers = validateValueOfParameter(WmsParameters.LAYERS, wmsParameters, fillEmptyParameterAsDefaultValue);
|
||||
parametersValue.put(wmsParam.getParameter(), layers);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue