Class ScriptMetadata
java.lang.Object
org.noise_planet.noisemodelling.webserver.script.ScriptMetadata
Represents the description for a script, with expected inputs and outputs
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScriptMetadata(String group, URI file, URI scriptDirectory) Constructs a `ScriptMetadata` instance by parsing metadata from a specified Groovy script file. -
Method Summary
-
Field Details
-
DEFAULT_JOB_EXECUTION_TIMEOUT_SECONDS
public static final int DEFAULT_JOB_EXECUTION_TIMEOUT_SECONDS- See Also:
-
id
-
group
-
title
-
description
-
path
-
scriptDirectory
-
executionTimeoutSeconds
public final int executionTimeoutSeconds -
inputs
-
outputs
-
-
Constructor Details
-
ScriptMetadata
Constructs a `ScriptMetadata` instance by parsing metadata from a specified Groovy script file. The constructor initializes the metadata fields such as `id`, `title`, `description`, `executionTimeoutSeconds`, and populates the `inputs` and `outputs` maps based on the content of the script. The `id` is generated using the provided group and the script file name, while the other fields are extracted from the script's metadata or assigned default values if not specified.- Parameters:
group- a string representing the group or category to which the script belongs, used in generating the script's unique identifierfile- a URI pointing to the Groovy script file from which to extract metadatascriptDirectory- a URI representing the directory containing the script, used for mounting a special file system if the script is stored into a jar file- Throws:
IOException- if an error occurs while reading or parsing the script file for metadata extraction
-