Java Doc for Parameters.java in  » GIS » GeoTools-2.4.1 » org » geotools » parameter » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.parameter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.parameter.Parameters

Parameters
public class Parameters (Code)
Utility class for methods helping implementing, and working with the parameter API from org.opengis.parameter package.

Design note

This class contains some methods working on a specific parameter in a group (e.g. , , etc.). Parameters are identified by their instead of their full object, because:
  • The parameter descriptor may not be always available. For example a user may looks for the "semi_major" axis length (because it is documented in OGC specification under that name) but doesn't know and doesn't care about who is providing the implementation. In such case, he doesn't have the parameter's descriptor. He only have the parameter's name, and creating a descriptor from that name (a descriptor independent of any implementation) is tedious.
  • .
  • Parameter descriptors are implementation-dependent. For example if a user searchs for the above-cited "semi_major" axis length using the for this parameter, we will fail to find this parameter in any alternative ParameterValueGroup implementations. This is against GeoAPI's inter-operability goal.

The above doesn't mean that parameter's descriptor should not be used. They are used for inspecting meta-data about parameters, not as a key for searching parameters in a group. Since each parameter's name should be unique in a given parameter group (because is always 1 for single parameter), the parameter name is a suffisient key.
since:
   2.1
version:
   $Id: Parameters.java 27862 2007-11-12 19:51:19Z desruisseaux $
author:
   Jody Garnett (Refractions Research)
author:
   Martin Desruisseaux



Field Summary
public static  ParameterDescriptorGroupEMPTY_GROUP
     An empty parameter group.


Method Summary
public static  voidcopy(ParameterValueGroup source, ParameterValueGroup target)
     Copies all parameter values from source to target .
public static  booleanensureSet(ParameterValueGroup parameters, String name, double value, Unit unit, boolean force)
     Ensures that the specified parameter is set.
public static  booleanisValid(ParameterValue parameter)
     Checks a parameter value against its . This method takes care of handling checking arrays and collections against parameter descriptor.

When the is an array (like double[].class ) or a (like List.class ), the descriptor , and will be used to check the elements.
Parameters:
  parameter - The parameter to test.
public static  Listsearch(GeneralParameterValue param, String name, int maxDepth)
     Searchs all parameters with the specified name.
public static  MaptoNameValueMap(GeneralParameterValue parameters, Map destination)
     Gets a flat view of - pairs.

Field Detail
EMPTY_GROUP
public static ParameterDescriptorGroup EMPTY_GROUP(Code)
An empty parameter group. This group contains no parameters.





Method Detail
copy
public static void copy(ParameterValueGroup source, ParameterValueGroup target)(Code)
Copies all parameter values from source to target . A typical usage of this method is for transfering values from an arbitrary implementation to some specific implementation (e.g. a parameter group implementation backed by a java.awt.image.renderable.ParameterBlock for image processing operations).
since:
   2.2



ensureSet
public static boolean ensureSet(ParameterValueGroup parameters, String name, double value, Unit unit, boolean force)(Code)
Ensures that the specified parameter is set. The value is set if and only if no value were already set by the user for the given name .

The force argument said what to do if the named parameter is already set. If the value matches, nothing is done in all case. If there is a mismatch and force is true , then the parameter is overridden with the specified value . Otherwise, the parameter is left unchanged but a warning is logged with the Level.FINE FINE level.
Parameters:
  parameters - The set of projection parameters.
Parameters:
  name - The parameter name to set.
Parameters:
  value - The value to set, or to expect if the parameter is already set.
Parameters:
  unit - The value unit.
Parameters:
  force - true for forcing the parameter to the specified value is case of mismatch. true if the were a mismatch, or false if the parameters can beused with no change.




isValid
public static boolean isValid(ParameterValue parameter)(Code)
Checks a parameter value against its . This method takes care of handling checking arrays and collections against parameter descriptor.

When the is an array (like double[].class ) or a (like List.class ), the descriptor , and will be used to check the elements.
Parameters:
  parameter - The parameter to test. true if parameter is valid.
See Also:   Parameter.ensureValidValue



search
public static List search(GeneralParameterValue param, String name, int maxDepth)(Code)
Searchs all parameters with the specified name. The given name is compared against parameter GeneralParameterDescriptor.getName name and GeneralParameterDescriptor.getAlias alias . This method search recursively in subgroups up to the specified depth:

  • If maxDepth is equals to 0, then this method returns param if and only if it matches the specified name.
  • If maxDepth is equals to 1 and param is an instance of ParameterDescriptorGroup , then this method checks all elements in this group but not in subgroups.
  • ...
  • If maxDepth is a high number (e.g. 100), then this method checks all elements in all subgroups up to the specified depth, which is likely to be never reached. In this case, maxDepth can be seen as a safeguard against never ending loops, for example if parameters graph contains cyclic entries.

Parameters:
  param - The parameter to inspect.
Parameters:
  name - The name of the parameter to search for. See the class javadocfor a rational about the usage of name as a key instead of. The set (possibly empty) of parameters with the given name.



toNameValueMap
public static Map toNameValueMap(GeneralParameterValue parameters, Map destination)(Code)
Gets a flat view of - pairs. This method copies all parameter values into the supplied destination map. Keys are parameter names as String objects, and values are parameter values as arbitrary objects. All subgroups (if any) are extracted recursively.
Parameters:
  parameters - The parameters to extract values from.
Parameters:
  destination - The destination map, or null for a default one. destination , or a new map if destination was null.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.