Class WpsXmlDocumentGenerator

java.lang.Object
org.noise_planet.noisemodelling.webserver.script.WpsXmlDocumentGenerator

public class WpsXmlDocumentGenerator extends Object
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 Details

    • WpsXmlDocumentGenerator

      public WpsXmlDocumentGenerator()
  • Method Details

    • valueType

      public static net.opengis.ows11.ValueType valueType(String value)
    • dataInputs

      public static void dataInputs(net.opengis.wps10.DataInputsType inputs, ScriptInput scriptInput)
    • processOutputs

      public static void processOutputs(net.opengis.wps10.ProcessOutputsType outputs, ScriptOutput scriptOutput)
    • generateDescribeProcessXML

      public static String generateDescribeProcessXML(ScriptMetadata wrapper) throws IOException
      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

      public static String generateCapabilitiesXML(Map<String,ScriptMetadata> scripts) throws IOException
      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, ParseException
      Generates WPS execute response with status by job state
      Throws:
      IOException
      DatatypeConfigurationException
      SQLException
      ParseException
    • getLastLoggingLines

      public static @NonNull String getLastLoggingLines(Configuration webServerConfiguration, int jobId) throws IOException
      Throws:
      IOException
    • castJobOutputToString

      public static String castJobOutputToString(Object output)
    • generateExceptionDocument

      public static net.opengis.ows11.ExceptionReportType generateExceptionDocument(Exception ex)
      Generates an exception report from stack trace details
      Returns:
      Exception report