This document is a guide to the various types of parameter widgets available, and the syntax for creating them.
String types
Parameters that have a string value should be of the phylum string
Freeform strings
Freeform strings do not need to specify any other specific format or type information.
<parameter phylum="string" cardinality="single" key="result" friendly-name="Result Name" group="Required" />
String selection
To select a particular string from a list, the format should be specified as select
, and a set of values should be included.
<parameter phylum="string" format="select" group="Required" cardinality="single" key="test" friendly-name="Test" > <values> <value>choice1</value> <value>choice2</value> <value>choice3</value> </values> </parameter>
Boolean values
All boolean values should be specific by phylum boolean
.
Checkboxes
Checkboxes are the default widget for boolean values.
<parameter phylum="boolean" cardinality="single" key="choice" friendly-name="Check Me" group="Required" />
Dataset values
Parameters should use the phylum dataset
for dataset values.
Specified by schema type
To select a dataset specified by one or more schema type, you can omit a format,
and just specify the types desired.
<parameter group="Required" phylum="dataset" cardinality="single" key="bridges" friendly-name="Bridges"> <types> <type>bridge</type> </types> </parameter>
By format of dataset (feature dataset, fragility dataset, etc)
In this case, types
should be omitted, and the format
should be specified.
The format should match the string returned by getDatasetFormat()
in the various dataset types.
Important note: Feature datasets use the key shapefile
, whether or not they are backed by a shapefile.
<parameter group="Required" phylum="dataset" format="mapping" cardinality="single" key="mapping" friendly-name="Fragility Mapping"> </parameter>
By feature dataset's geometry type (not yet functional)
In this case, types
should be omitted, and the format
should be specified as shapefile
.
Instead of types
, geometry-types
should be specified.
<parameter group="Required" phylum="dataset" cardinality="single" key="polygon" friendly-name="Polygon "> <geometry-types> <geometry-type>Polygon</geometry-type> </geometry-types> </parameter>
Multiple datasets
Any of these dataset types can be set to use multiple datasets by setting cardinality to multiple
.
<parameter cardinality="multiple" group="Required" phylum="dataset" key="hazard" friendly-name="Hazard"> <types> <type>hazardRaster</type> <type>deterministicHazardRaster</type> </types> </parameter>