|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.Parameter
org.geotools.data.DataAccessFactory.Param
public static class DataAccessFactory.Param
Data class used to capture Parameter requirements.
Subclasses may provide specific setAsText()/getAsText() requirements
Warning: We would like to start moving towards a common paraemters framework with GridCoverageExchnage. Param will be maintained as a wrapper for one point release (at which time it will be deprecated).
Field Summary |
---|
Fields inherited from class org.geotools.data.Parameter |
---|
CRS, description, ELEMENT, EXT, FEATURE_TYPE, IS_PASSWORD, key, LENGTH, LEVEL, MAX, maxOccurs, metadata, MIN, minOccurs, required, sample, title, type |
Constructor Summary | |
---|---|
DataAccessFactory.Param(java.lang.String key)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class<?> type)
Provides support for text representations. |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class<?> type,
java.lang.String description)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class<?> type,
java.lang.String description,
boolean required)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class<?> type,
java.lang.String description,
boolean required,
java.lang.Object sample)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class type,
org.opengis.util.InternationalString description,
boolean required,
java.lang.Object sample)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class type,
org.opengis.util.InternationalString description,
boolean required,
java.lang.Object sample,
java.util.Map<java.lang.String,?> metadata)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class type,
java.lang.String description,
boolean required,
java.lang.Object sample,
java.util.Map<java.lang.String,?> metadata)
Provides support for text representations |
|
DataAccessFactory.Param(java.lang.String key,
java.lang.Class type,
java.lang.String description,
boolean required,
java.lang.Object sample,
java.lang.Object... metadata)
|
Method Summary | |
---|---|
java.lang.Object |
handle(java.lang.String text)
Handle text in a sensible manner. |
java.lang.Object |
lookUp(java.util.Map<java.lang.String,?> map)
Lookup Param in a user supplied map. |
java.lang.Object |
parse(java.lang.String text)
Provides support for text representations |
java.lang.String |
text(java.lang.Object value)
Convert value to text representation for this Parameter |
java.lang.String |
toString()
key=Type description |
Methods inherited from class org.geotools.data.Parameter |
---|
getLevel, isPassword |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataAccessFactory.Param(java.lang.String key)
The parameter type of String is assumed.
key
- Key used to file this Param in the Parameter Map for
createDataStorepublic DataAccessFactory.Param(java.lang.String key, java.lang.Class<?> type)
You may specify a type
for this Param.
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Parampublic DataAccessFactory.Param(java.lang.String key, java.lang.Class<?> type, java.lang.String description)
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Paramdescription
- User description of Param (40 chars or less)public DataAccessFactory.Param(java.lang.String key, java.lang.Class<?> type, java.lang.String description, boolean required)
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Paramdescription
- User description of Param (40 chars or less)required
- true
is param is requiredpublic DataAccessFactory.Param(java.lang.String key, java.lang.Class<?> type, java.lang.String description, boolean required, java.lang.Object sample)
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Paramdescription
- User description of Param (40 chars or less)required
- true
is param is requiredsample
- Sample value as an example for user inputpublic DataAccessFactory.Param(java.lang.String key, java.lang.Class type, org.opengis.util.InternationalString description, boolean required, java.lang.Object sample)
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Paramdescription
- User description of Param (40 chars or less)required
- true
is param is requiredsample
- Sample value as an example for user inputpublic DataAccessFactory.Param(java.lang.String key, java.lang.Class type, java.lang.String description, boolean required, java.lang.Object sample, java.util.Map<java.lang.String,?> metadata)
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Paramdescription
- User description of Param (40 chars or less)required
- true
is param is requiredsample
- Sample value as an example for user inputextra
- metadata information, preferably keyed by known identifiers
like Parameter.IS_PASSWORD
public DataAccessFactory.Param(java.lang.String key, java.lang.Class type, java.lang.String description, boolean required, java.lang.Object sample, java.lang.Object... metadata)
public DataAccessFactory.Param(java.lang.String key, java.lang.Class type, org.opengis.util.InternationalString description, boolean required, java.lang.Object sample, java.util.Map<java.lang.String,?> metadata)
key
- Key used to file this Param in the Parameter Map for
createDataStoretype
- Class type intended for this Paramdescription
- User description of Param (40 chars or less)required
- true
is param is requiredsample
- Sample value as an example for user inputextra
- metadata information, preferably keyed by known identifiers
like Parameter.IS_PASSWORD
Method Detail |
---|
public java.lang.Object lookUp(java.util.Map<java.lang.String,?> map) throws java.io.IOException
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.
map
- Map of user input
java.io.IOException
- if parse could not handle valuepublic java.lang.String text(java.lang.Object value)
value
- DOCUMENT ME!
public java.lang.Object handle(java.lang.String text) throws java.io.IOException
Performs the most common way of handling text value:
text
-
java.io.IOException
- If text could not be parsedpublic java.lang.Object parse(java.lang.String text) throws java.lang.Throwable
Provides basic support for common types using reflection.
If needed you may extend this class to handle your own custome types.
text
- Text representation of type should not be null or empty
java.lang.Throwable
- DOCUMENT ME!
java.io.IOException
- If text could not be parsed
DataSourceException
- DOCUMENT ME!public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |