Java Doc for AttributeType.java in  » GIS » GeoTools-2.4.1 » org » geotools » feature » 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.feature 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.feature.AttributeType

All known Subclasses:   org.geotools.feature.type.FeatureAttributeType,  org.geotools.feature.type.ChoiceAttributeType,  org.geotools.feature.type.ListAttributeType,  org.geotools.feature.type.SetAttributeType,  org.geotools.data.feature.adapter.GTAttributeTypeAdapter,  org.geotools.feature.DefaultAttributeType,  org.geotools.data.vpf.VPFColumn,
AttributeType
public interface AttributeType (Code)

Stores metadata about a single attribute object.

  1. Name: A string that is used to reference the attribute.
  2. Nillable: if nulls are allowed as this attribute.
  3. Type: The expected Java class of this attribute.

AttributeTypes must also provide the validate(Object obj) method, which determines whether a given object matches the constraints imposed by the AttributeType. In a default attribute this will simply be that it is of the correct class and non-null (or null if isNillable is true). More complex AttributeTypes can impose any restrictions that they like. Nested FeatureTypes are an example of this, as they need to check that the Feature object matches all its constraints, not that it is just of class Feature.

Additionally, implementors may use the parse method to convert an object to its preferred storage type. If an implementor does not choose to provide any functionality for this method they should simple return the object passed in. If parsing is attempted and not successful, then an exception should be thrown. This method is primarily used by FeatureType to try to convert objects to the correct storage type, such as a string of a double when the AttributeType requires a Double.


author:
   Rob Hranac, VFNY
author:
   Chris Holmes, TOPP
version:
   $Id: AttributeType.java 26186 2007-07-10 02:18:59Z jdeolive $


Field Summary
public static  intUNBOUNDED
     Represents any number of elements.


Method Summary
 ObjectcreateDefaultValue()
     Create a default value for this AttributeType.
 Objectduplicate(Object src)
     Create a duplicate value of the passed Object.
 ClassgetBinding()
     Gets the class/type/binding for this attribute.
 StringgetLocalName()
     Returns the unqualified name of this attribute.
 intgetMaxOccurs()
     Returns the Max number of occurences ...
 intgetMinOccurs()
     Returns the Min number of occurences ...
 StringgetName()
     Gets the name of this attribute.
 FiltergetRestriction()
     This represents a Facet in XML schema ...
 ClassgetType()
     Gets the type of this attribute.
 booleanisNillable()
     Returns whether nulls are allowed for this attribute.
 Objectparse(Object value)
     Allows this AttributeType to convert an argument to its prefered storage type.
 voidvalidate(Object obj)
     Whether the tested object passes the validity constraints of this AttributeType.

Field Detail
UNBOUNDED
public static int UNBOUNDED(Code)
Represents any number of elements. Same '' in a reg-ex





Method Detail
createDefaultValue
Object createDefaultValue()(Code)
Create a default value for this AttributeType. If the type is nillable, the Object may or may not be null. Default value, note may be null if isNillable is true



duplicate
Object duplicate(Object src) throws IllegalAttributeException(Code)
Create a duplicate value of the passed Object. For immutable Objects, it is not neccessary to create a new Object.
Parameters:
  src - The Object to duplicate. Duplicate of provided object
throws:
  IllegalAttributeException - If the src Object is not the correcttype.



getBinding
Class getBinding()(Code)
Gets the class/type/binding for this attribute.

This method is a replacement for AttributeType.getType() in order to resolve a naming conflict with the geoapi feature model.


See Also:   AttributeDescriptor.getType
since:
   2.4



getLocalName
String getLocalName()(Code)
Returns the unqualified name of this attribute.

This method is a replacement for AttributeType.getName() in order to resolve a naming conflict with the geoapi feature model.


See Also:   PropertyDescriptor.getName
since:
   2.4



getMaxOccurs
int getMaxOccurs()(Code)
Returns the Max number of occurences ...



getMinOccurs
int getMinOccurs()(Code)
Returns the Min number of occurences ...



getName
String getName()(Code)
Gets the name of this attribute. Name.AttributeType.getLocalName()



getRestriction
Filter getRestriction()(Code)
This represents a Facet in XML schema ... for example can be used to represent the max length of 20 for a string. Filter, or Filter.INCLUDE if no restriction is needed.



getType
Class getType()(Code)
Gets the type of this attribute. Type.AttributeType.getBinding()



isNillable
boolean isNillable()(Code)
Returns whether nulls are allowed for this attribute. true if nulls are permitted, false otherwise.



parse
Object parse(Object value) throws IllegalArgumentException(Code)
Allows this AttributeType to convert an argument to its prefered storage type. If no parsing is possible, returns the original value. If a parse is attempted, yet fails (i.e. a poor decimal format) throw the Exception. This is mostly for use internally in Features, but implementors should simply follow the rules to be safe.
Parameters:
  value - the object to attempt parsing of. value converted to the preferred storage of thisAttributeType. If no parsing was possible thenthe same object is returned.
throws:
  IllegalArgumentException - if parsing is attempted and isunsuccessful.



validate
void validate(Object obj) throws IllegalArgumentException(Code)
Whether the tested object passes the validity constraints of this AttributeType. At a minimum it should be of the correct class specified by AttributeType.getType() , non-null if isNillable is false, and a geometry if isGeometry is true. If The object does not validate then an IllegalArgumentException reporting the error in validation should be thrown.
Parameters:
  obj - The object to be tested for validity.
throws:
  IllegalArgumentException - if the object does not validate.



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