Class WpsXmlDocumentGenerator
java.lang.Object
org.noise_planet.noisemodelling.webserver.script.WpsXmlDocumentGenerator
A utility class for generating WPS (Web Processing Service) XML documents.
This class provides methods to construct a DescribeProcess XML for a specific script by
defining its inputs, outputs, and other metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcastJobOutputToString(Object output) static voiddataInputs(net.opengis.wps10.DataInputsType inputs, ScriptInput scriptInput) static StringgenerateCapabilitiesXML(Map<String, ScriptMetadata> scripts) Generates a WPS GetCapabilities XML document listing all available scripts.static StringgenerateDescribeProcessXML(ScriptMetadata wrapper) Generates a WPS DescribeProcess XML for a specific Groovy script.static net.opengis.ows11.ExceptionReportTypeGenerates an exception report from stack trace detailsstatic StringgenerateExecuteResponseDocument(Job<?> job, Map<String, Object> jobData, Configuration webServerConfiguration) Generates WPS execute response with status by job statestatic @NonNull StringgetLastLoggingLines(Configuration webServerConfiguration, int jobId) static voidprocessOutputs(net.opengis.wps10.ProcessOutputsType outputs, ScriptOutput scriptOutput) static net.opengis.ows11.ValueType
-
Constructor Details
-
WpsXmlDocumentGenerator
public WpsXmlDocumentGenerator()
-
-
Method Details
-
valueType
-
dataInputs
-
processOutputs
public static void processOutputs(net.opengis.wps10.ProcessOutputsType outputs, ScriptOutput scriptOutput) -
generateDescribeProcessXML
Generates a WPS DescribeProcess XML for a specific Groovy script.- Parameters:
wrapper- the ScriptWrapper representing the script- Returns:
- XML string for WPS DescribeProcess
- Throws:
IOException
-
generateCapabilitiesXML
Generates a WPS GetCapabilities XML document listing all available scripts.- Parameters:
scripts- the list of available ScriptWrapper instances- Returns:
- XML string for WPS GetCapabilities
- Throws:
IOException
-
generateExecuteResponseDocument
public static String generateExecuteResponseDocument(Job<?> job, Map<String, Object> jobData, Configuration webServerConfiguration) throws IOException, DatatypeConfigurationException, SQLException, ParseExceptionGenerates WPS execute response with status by job state -
getLastLoggingLines
public static @NonNull String getLastLoggingLines(Configuration webServerConfiguration, int jobId) throws IOException - Throws:
IOException
-
castJobOutputToString
-
generateExceptionDocument
Generates an exception report from stack trace details- Returns:
- Exception report
-