|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.Parameter<T>
public class Parameter<T>
A Parameter defines information about a valid process parameter.
Field Summary | |
---|---|
static java.lang.String |
CRS
"crs": CoordinateReferenceSystem used to restrict a Geometry literal |
org.opengis.util.InternationalString |
description
Human readable description of this parameter. |
static java.lang.String |
ELEMENT
"element": Class to use as the Element type for List |
static java.lang.String |
EXT
File extension expected - "shp", "jpg", etc... |
static java.lang.String |
FEATURE_TYPE
"featureType" FeatureType to validate a Feature value against |
static java.lang.String |
IS_PASSWORD
Boolean indicating whether the parameter shall be used as a password field, provides a hint for UI's to mask text fields, configuration systems to encrypt content, etc |
java.lang.String |
key
This is the key (ie machine readable text) used to represent this parameter in a java.util.Map. |
static java.lang.String |
LENGTH
"length" Integer used to limit the length of strings or literal geometries. |
static java.lang.String |
LEVEL
Level or Category of the parameter - "user", "advanced", "program" |
static java.lang.String |
MAX
"min" and "max" may be useful for restrictions for things like int sizes, etc. |
int |
maxOccurs
|
java.util.Map<java.lang.String,java.lang.Object> |
metadata
Refinement of type; such as the FeatureType of a FeatureCollection, or component type of a List. |
static java.lang.String |
MIN
"min" and "max" may be useful for restrictions for things like int sizes, etc. |
int |
minOccurs
What is the min and max number of this paramter there can be ( a value of -1 for min means 0 or more, a value of -1 for max means any number greater than or equal to the min value ) eg: a geometry union process can have any number of geom parameters, so by setting the max to -1 and the min to 2 we accomplish that. |
boolean |
required
Can the value be missing? Or is null allowed... |
java.lang.Object |
sample
A sample value; often used as a default when prompting the end-user to fill in the details before executing a process. |
org.opengis.util.InternationalString |
title
Human readable title/name of this parameter. |
java.lang.Class<T> |
type
Class binding for this parameter. |
Constructor Summary | |
---|---|
Parameter(java.lang.String key,
java.lang.Class<T> type,
org.opengis.util.InternationalString title,
org.opengis.util.InternationalString description)
Mandatory parameter |
|
Parameter(java.lang.String key,
java.lang.Class<T> type,
org.opengis.util.InternationalString title,
org.opengis.util.InternationalString description,
boolean required,
int min,
int max,
java.lang.Object sample,
java.util.Map<java.lang.String,java.lang.Object> metadata)
Addition of optional parameters |
|
Parameter(java.lang.String key,
java.lang.Class<T> type,
org.opengis.util.InternationalString title,
org.opengis.util.InternationalString description,
java.util.Map<java.lang.String,java.lang.Object> metadata)
Mandatory parameter with metadata. |
|
Parameter(java.lang.String key,
java.lang.Class<T> type,
java.lang.String title,
java.lang.String description)
Mandatory parameter - quickly constructed with out a properly internationalized title and description. |
|
Parameter(java.lang.String key,
java.lang.Class<T> type,
java.lang.String title,
java.lang.String description,
java.util.Map<java.lang.String,java.lang.Object> metadata)
Mandatory parameter - quickly constructed with out a properly internationalized title and description. |
Method Summary | |
---|---|
java.lang.String |
getLevel()
Easy access to check the LEVEL metadata |
boolean |
isPassword()
Provides for easy access to the IS_PASSWORD metadata |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.lang.String key
public final org.opengis.util.InternationalString title
public final org.opengis.util.InternationalString description
public final java.lang.Class<T> type
When a value is supplied for this key it should be of the provided type.
public final boolean required
public final int minOccurs
public final int maxOccurs
public final java.lang.Object sample
public static final java.lang.String FEATURE_TYPE
public static final java.lang.String IS_PASSWORD
public static final java.lang.String LENGTH
public static final java.lang.String CRS
public static final java.lang.String ELEMENT
public static final java.lang.String MIN
public static final java.lang.String MAX
public static final java.lang.String EXT
public static final java.lang.String LEVEL
public final java.util.Map<java.lang.String,java.lang.Object> metadata
This information is supplied (along with type) to allow a process implementor communicate additional restrictions on the allowed value beyond the strict type.
The following keys are understood at this time: LENGTH, FEATURE_TYPE, CRS, ELEMENT .. additional keys will be documented as static final fields over time.
Any restrictions mentioned here should be mentioned as part of your parameter description. This metadata is only used to help restrict what the user enters; not all client application will understand and respect these keys - please communicate with your end-user.
CRS
,
ELEMENT
,
FEATURE_TYPE
,
IS_PASSWORD
,
LENGTH
,
MAX
,
MIN
Constructor Detail |
---|
public Parameter(java.lang.String key, java.lang.Class<T> type, java.lang.String title, java.lang.String description)
key
- machine readable key for use in a java.util.Maptype
- Java class for the expected valuetitle
- Human readable title used for use in a user interfacedescription
- Human readable descriptionpublic Parameter(java.lang.String key, java.lang.Class<T> type, java.lang.String title, java.lang.String description, java.util.Map<java.lang.String,java.lang.Object> metadata)
key
- machine readable key for use in a java.util.Maptype
- Java class for the expected valuetitle
- Human readable title used for use in a user interfacedescription
- Human readable descriptionpublic Parameter(java.lang.String key, java.lang.Class<T> type, org.opengis.util.InternationalString title, org.opengis.util.InternationalString description)
key
- machine readable key for use in a java.util.Maptype
- Java class for the expected valuetitle
- Human readable title used for use in a user interfacedescription
- Human readable descriptionpublic Parameter(java.lang.String key, java.lang.Class<T> type, org.opengis.util.InternationalString title, org.opengis.util.InternationalString description, java.util.Map<java.lang.String,java.lang.Object> metadata)
key
- machine readable key for use in a java.util.Maptype
- Java class for the expected valuetitle
- Human readable title used for use in a user interfacedescription
- Human readable descriptionmetadata
- Hints to the user interface (read the javadocs for each metadata key)CRS
,
ELEMENT
,
FEATURE_TYPE
,
IS_PASSWORD
,
LENGTH
,
MAX
,
MIN
public Parameter(java.lang.String key, java.lang.Class<T> type, org.opengis.util.InternationalString title, org.opengis.util.InternationalString description, boolean required, int min, int max, java.lang.Object sample, java.util.Map<java.lang.String,java.lang.Object> metadata)
key
- machine readable key for use in a java.util.Maptype
- Java class for the expected valuetitle
- Human readable title used for use in a user interfacedescription
- Human readable descriptionrequired
- true if the value is requiredmin
- Minimum value; or null if not neededmax
- Maximum value; or null if not neededsample
- Sample value; may be used as a default in a user interfacemetadata
- Hints to the user interface (read the javadocs for each metadata key)CRS
,
ELEMENT
,
FEATURE_TYPE
,
IS_PASSWORD
,
LENGTH
,
MAX
,
MIN
Method Detail |
---|
public boolean isPassword()
IS_PASSWORD
metadata
metadata.get(IS_PASSWORD) == Boolean.TRUE
public java.lang.String getLevel()
LEVEL
metadata
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |