Class MetadataParams

java.lang.Object
nz.org.riskscape.engine.function.MetadataParams

public class MetadataParams extends Object

Defines what parameters a INI file function definition can accept, i.e. this defines the metadata associated with a function.

  • Field Details

    • location

      public URI location

      The location of a file containing the function definition.

    • returnType

      public nz.org.riskscape.engine.types.Type returnType

      The Type of the result returned by this function.

    • argumentTypes

      public nz.org.riskscape.engine.function.ArgumentList argumentTypes

      The Type(s) of arguments that this function accepts.

    • description

      public Optional<String> description

      An optional description of what this function does.

    • category

      public Optional<nz.org.riskscape.engine.function.IdentifiedFunction.Category> category

      Optionally assigns a category to the function, e.g. 'language'

    • framework

      public Optional<String> framework

      Explicitly specify the framework that the function will use, i.e. classifier, jython, or python. If omitted, a suitable default will be chosen based on the location file extension.

  • Constructor Details

    • MetadataParams

      public MetadataParams()
  • Method Details

    • locationEndsWith

      public static boolean locationEndsWith(Map<String,List<?>> unbound, String suffix)
    • toFunctionMetadata

      public nz.org.riskscape.engine.function.FunctionMetadata toFunctionMetadata(String functionName)

      Turns the given parameters into a FunctionMetadata.