Java Doc for DefaultFeature.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) 


java.lang.Object
   org.geotools.feature.DefaultFeature

All known Subclasses:   org.geotools.data.jdbc.MutableFIDFeature,
DefaultFeature
public class DefaultFeature implements SimpleFeature,Cloneable(Code)
Provides a more efficient feature representation for the flat and complex features. This implementation actually not only enforces feature type synchronization, it also enforces the use of its accessor methods to change the state of internal object representations. In this case, the implementation is trivial, since all allowed attribute objects (from the feature type) are immutable.
author:
   Chris Holmes, TOPP

author:
   Rob Hranac, TOPP
author:
   Ian Schneider ARS-USDA

Inner Class :final static class ComplexWrapper extends DefaultFeature

Field Summary
protected  StringfeatureId
    

Constructor Summary
protected  DefaultFeature(DefaultFeatureType schema, Object[] attributes, String featureID)
     Creates a new instance of flat feature, which must take a flat feature type schema and all attributes as arguments.
protected  DefaultFeature(DefaultFeatureType schema, Object[] attributes)
     Creates a new instance of flat feature, which must take a flat feature type schema and all attributes as arguments.

Method Summary
public  Objectclone()
     Creates an exact copy of this feature.
 StringdefaultID()
     Creates an ID from a hashcode.
public  booleanequals(Object obj)
     override of equals.
public  ObjectgetAttribute(String xPath)
     Gets an attribute for this feature at the location specified by xPath.
Parameters:
  xPath - XPath representation of attribute location.
public  ObjectgetAttribute(int index)
     Gets an attribute by the given zero-based index.
Parameters:
  index - the position of the attribute to retrieve.
public  Object[]getAttributes(Object[] array)
     Copy all the attributes of this Feature into the given array.
public  ReferencedEnvelopegetBounds()
     Get the total bounds of this feature which is calculated by doing a union of the bounds of each geometry this feature is associated with.
public  GeometrygetDefaultGeometry()
     Gets the geometry for this feature.
public  FeatureTypegetFeatureType()
     Gets a reference to the feature type schema for this feature.
public  StringgetID()
     Gets the unique indentification string of this Feature.
public  intgetNumberOfAttributes()
     Get the number of attributes this feature has.
public  FeatureCollectiongetParent()
     Gets the feature collection this feature is stored in.
public  inthashCode()
    
public  voidsetAttribute(int position, Object val)
     Sets the attribute at position to val.
public  voidsetAttribute(String xPath, Object attribute)
     Sets a single attribute for this feature, passed as a complex object.
protected  voidsetAttributeValue(int position, Object val)
     Sets the attribute value at a given position, performing no parsing or validation.
public  voidsetAttributes(Object[] attributes)
     Sets all attributes for this feature, passed as an array.
public  voidsetDefaultGeometry(Geometry geometry)
     Modifies the geometry.
public  voidsetParent(FeatureCollection collection)
     Sets the parent collection this feature is stored in, if it is not already set.
public  FeaturetoComplex()
    
public  StringtoString()
     Returns a string representation of this feature.

Field Detail
featureId
protected String featureId(Code)
The unique id of this feature




Constructor Detail
DefaultFeature
protected DefaultFeature(DefaultFeatureType schema, Object[] attributes, String featureID) throws IllegalAttributeException, NullPointerException(Code)
Creates a new instance of flat feature, which must take a flat feature type schema and all attributes as arguments.
Parameters:
  schema - Feature type schema for this flat feature.
Parameters:
  attributes - Initial attributes for this feature.
Parameters:
  featureID - The unique ID for this feature.
throws:
  IllegalAttributeException - Attribtues do not conform to featuretype schema.
throws:
  NullPointerException - if schema is null.



DefaultFeature
protected DefaultFeature(DefaultFeatureType schema, Object[] attributes) throws IllegalAttributeException(Code)
Creates a new instance of flat feature, which must take a flat feature type schema and all attributes as arguments.
Parameters:
  schema - Feature type schema for this flat feature.
Parameters:
  attributes - Initial attributes for this feature.
throws:
  IllegalAttributeException - Attribtues do not conform to featuretype schema.




Method Detail
clone
public Object clone()(Code)
Creates an exact copy of this feature. A default feature.
throws:
  RuntimeException - DOCUMENT ME!



defaultID
String defaultID()(Code)
Creates an ID from a hashcode. an id for the feature.



equals
public boolean equals(Object obj)(Code)
override of equals. Returns if the passed in object is equal to this.
Parameters:
  obj - the Object to test for equality. true if the object is equal, falseotherwise.



getAttribute
public Object getAttribute(String xPath)(Code)
Gets an attribute for this feature at the location specified by xPath.
Parameters:
  xPath - XPath representation of attribute location. Attribute.



getAttribute
public Object getAttribute(int index)(Code)
Gets an attribute by the given zero-based index.
Parameters:
  index - the position of the attribute to retrieve. The attribute at the given index.



getAttributes
public Object[] getAttributes(Object[] array)(Code)
Copy all the attributes of this Feature into the given array. If the argument array is null, a new one will be created. Gets all attributes from this feature, returned as a complex object array. This array comes with no metadata, so to interpret this collection the caller class should ask for the schema as well.
Parameters:
  array - The array to copy the attributes into. The array passed in, or a new one if null.



getBounds
public ReferencedEnvelope getBounds()(Code)
Get the total bounds of this feature which is calculated by doing a union of the bounds of each geometry this feature is associated with. An Envelope containing the total bounds of this Feature.



getDefaultGeometry
public Geometry getDefaultGeometry()(Code)
Gets the geometry for this feature. Geometry for this feature.



getFeatureType
public FeatureType getFeatureType()(Code)
Gets a reference to the feature type schema for this feature. A copy of this feature's metadata in the form of a feature typeschema.



getID
public String getID()(Code)
Gets the unique indentification string of this Feature. The unique id.



getNumberOfAttributes
public int getNumberOfAttributes()(Code)
Get the number of attributes this feature has. This is simply a convenience method for calling getFeatureType().getNumberOfAttributes(); The total number of attributes this Feature contains.



getParent
public FeatureCollection getParent()(Code)
Gets the feature collection this feature is stored in. the collection that is the parent of this feature.



hashCode
public int hashCode()(Code)
returns a unique code for this feature A unique int



setAttribute
public void setAttribute(int position, Object val) throws IllegalAttributeException(Code)
Sets the attribute at position to val.
Parameters:
  position - the index of the attribute to set.
Parameters:
  val - the new value to give the attribute at position.
throws:
  IllegalAttributeException - if the passed in val does not validateagainst the AttributeType at that position.



setAttribute
public void setAttribute(String xPath, Object attribute) throws IllegalAttributeException(Code)
Sets a single attribute for this feature, passed as a complex object. If the attribute does not exist or the object does not conform to the internal feature type, an exception is thrown.
Parameters:
  xPath - XPath representation of attribute location.
Parameters:
  attribute - Feature attribute to set.
throws:
  IllegalAttributeException - Passed attribute does not matchfeature type



setAttributeValue
protected void setAttributeValue(int position, Object val)(Code)
Sets the attribute value at a given position, performing no parsing or validation. This is so subclasses can have access to setting the array, without opening it up completely.
Parameters:
  position - the index of the attribute to set.
Parameters:
  val - the new value to give the attribute at position.



setAttributes
public void setAttributes(Object[] attributes) throws IllegalAttributeException(Code)
Sets all attributes for this feature, passed as an array. All attributes are checked for validity before adding.
Parameters:
  attributes - All feature attributes.
throws:
  IllegalAttributeException - Passed attributes do not match featuretype.



setDefaultGeometry
public void setDefaultGeometry(Geometry geometry) throws IllegalAttributeException(Code)
Modifies the geometry.
Parameters:
  geometry - All feature attributes.
throws:
  IllegalAttributeException - if the feature does not have ageometry.



setParent
public void setParent(FeatureCollection collection)(Code)
Sets the parent collection this feature is stored in, if it is not already set. If it is set then this method does nothing.
Parameters:
  collection - the collection to be set as parent.



toComplex
public Feature toComplex()(Code)



toString
public String toString()(Code)
Returns a string representation of this feature. A representation of this feature as a string.



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.