-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEOS-8564]: Add support for writing parameters to WPS-Download
- Loading branch information
1 parent
53ae0c3
commit a7052cd
Showing
10 changed files
with
403 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
src/community/wps-download/src/main/java/org/geoserver/wps/gs/download/Parameter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/community/wps-download/src/main/java/org/geoserver/wps/gs/download/Parameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* (c) 2018 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, available at the root | ||
* application directory. | ||
*/ | ||
package org.geoserver.wps.gs.download; | ||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import org.apache.commons.lang.builder.ToStringBuilder; | ||
|
||
@XmlRootElement(name="Parameters") | ||
public class Parameters { | ||
|
||
public static final String NAMESPACE = "http://geoserver.org/wps/download"; | ||
|
||
List<Parameter> parameters = new ArrayList<>(); | ||
|
||
@XmlElement(name = "Parameter") | ||
public List<Parameter> getParameters() { | ||
return parameters; | ||
} | ||
|
||
public void setParameters(List<Parameter> parameters) { | ||
this.parameters = parameters; | ||
} | ||
|
||
public Map<String, String> getParametersMap() { | ||
Map<String, String> result = new HashMap<>(); | ||
for (Parameter parameter : parameters) { | ||
result.put(parameter.key, parameter.value); | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return ToStringBuilder.reflectionToString(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.