Package org.geotools.api.data
Class DataAccessFactory.Param
- All Implemented Interfaces:
- Parameter
- Direct Known Subclasses:
- WFSDataAccessFactory.WFSFactoryParam
- Enclosing interface:
- DataAccessFactory
Data class used to capture Parameter requirements.
 
Subclasses may provide specific setAsText()/getAsText() requirements
- 
Field SummaryFields inherited from class ParameterCRS, DEPRECATED, description, ELEMENT, EXT, FEATURE_TYPE, IS_LARGE_TEXT, IS_PASSWORD, key, LENGTH, LEVEL, MAX, maxOccurs, metadata, MIN, minOccurs, OPTIONS, required, sample, title, type
- 
Constructor SummaryConstructorsConstructorDescriptionProvides support for text representationsProvides support for text representations.Provides support for text representationsProvides support for text representationsProvides support for text representationsParam(String key, Class<?> type, String description, boolean required, Object sample, Object... metadata) Param(String key, Class<?> type, String description, boolean required, Object sample, Map<String, ?> metadata) Provides support for text representationsParam(String key, Class<?> type, InternationalString description, boolean required, Object sample) Provides support for text representationsParam(String key, Class<?> type, InternationalString description, boolean required, Object sample, Map<String, ?> metadata) Provides support for text representationsParam(String key, Class<?> type, InternationalString title, InternationalString description, boolean required, int min, int max, Object sample, Map<String, ?> metadata) Supports all Parameter values.
- 
Method SummaryModifier and TypeMethodDescriptionHandle text in a sensible manner.Lookup Param in a user supplied map.Provides support for text representationsConvert value to text representation for this ParametertoString()key=Type descriptionMethods inherited from class Parameterequals, getDefaultValue, getDescription, getLevel, getMaxOccurs, getMinOccurs, getName, getTitle, getType, hashCode, isDeprecated, isPassword, isRequired
- 
Constructor Details- 
ParamProvides support for text representationsThe parameter type of String is assumed. - Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
 
- 
ParamProvides support for text representations.You may specify a typefor this Param.- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
 
- 
ParamProvides support for text representations- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
- description- User description of Param (40 chars or less)
 
- 
ParamProvides support for text representations- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
- description- User description of Param (40 chars or less)
- required-- trueis param is required
 
- 
ParamProvides support for text representations- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
- description- User description of Param (40 chars or less)
- required-- trueis param is required
- sample- Sample value as an example for user input
 
- 
Parampublic Param(String key, Class<?> type, InternationalString description, boolean required, Object sample) Provides support for text representations- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
- description- User description of Param (40 chars or less)
- required-- trueis param is required
- sample- Sample value as an example for user input
 
- 
Parampublic Param(String key, Class<?> type, String description, boolean required, Object sample, Map<String, ?> metadata) Provides support for text representations- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
- description- User description of Param (40 chars or less)
- required-- trueis param is required
- sample- Sample value as an example for user input
- metadata- metadata information, preferably keyed by known identifiers like- Parameter.IS_PASSWORD
 
- 
Param
- 
Parampublic Param(String key, Class<?> type, InternationalString description, boolean required, Object sample, Map<String, ?> metadata) Provides support for text representations- Parameters:
- key- Key used to file this Param in the Parameter Map for createDataStore
- type- Class type intended for this Param
- description- User description of Param (40 chars or less)
- required-- trueis param is required
- sample- Sample value as an example for user input
- metadata- metadata information, preferably keyed by known identifiers like- Parameter.IS_PASSWORD
 
- 
Parampublic Param(String key, Class<?> type, InternationalString title, InternationalString description, boolean required, int min, int max, Object sample, Map<String, ?> metadata) Supports all Parameter values.- Parameters:
- key- machine readable key for use in a java.util.Map
- type- Java class for the expected value
- title- Human readable title used for use in a user interface
- description- Human readable description
- required- true if the value is required
- min- Minimum value; or -1 if not needed
- max- Maximum value; or -1 for unbound
- sample- Sample value; may be used as a default in a user interface
- metadata- Hints to the user interface (read the javadocs for each metadata key)
 
 
- 
- 
Method Details- 
lookUpLookup Param in a user supplied map.Type conversion will occur if required, this may result in an IOException. An IOException will be throw in the Param is required and the Map does not contain the Map. The handle method is used to process the user's value. - Parameters:
- map- Map of user input
- Returns:
- Parameter as specified in map
- Throws:
- IOException- if parse could not handle value
 
- 
textConvert value to text representation for this Parameter
- 
handleHandle text in a sensible manner.Performs the most common way of handling text value: - null: If text is null
- original text: if type == String.class
- first character of original text: if type == Character.class
- null: if type != String.class and text.getLength == 0
- parse( text ): if type != String.class
 - Returns:
- Value as processed by text
- Throws:
- IOException- If text could not be parsed
 
- 
parseProvides support for text representationsProvides basic support for common types using reflection. If needed you may extend this class to handle your own custome types. - Parameters:
- text- Text representation of type should not be null or empty
- Returns:
- Object converted from text representation
- Throws:
- IOException- If text could not be parsed
- Throwable
 
- 
toStringkey=Type description
 
-