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


org.geotools.data.FeatureWriter

All known Subclasses:   org.geotools.data.ogr.OGRDirectFeatureWriter,  org.geotools.arcsde.data.ArcSDEFeatureWriter,  org.geotools.data.FilteringFeatureWriter,  org.geotools.data.property.PropertyFeatureWriter,  org.geotools.data.EmptyFeatureWriter,  org.geotools.data.jdbc.JDBCFeatureWriter,  org.geotools.data.DiffFeatureWriter,  org.geotools.data.postgis.VersionedFeatureWriter,
FeatureWriter
public interface FeatureWriter (Code)
Provides the ability to write Features information.

Capabilities:

  • Similar API to FeatureReader
  • After aquiring a feature using next() you may call remove() or after modification write(). If you do not call one of these two methods before calling hasNext(), or next() for that matter, the feature will be left unmodified.
  • This API allows modification, and Filter based modification to be written. Please see AbstractDataStore for examples of implementing common opperations using this API.
  • In order to add new Features, FeatureWriters capable of accepting new content allow next() to be called when hasNext() is false to allow new feature creation. These changes

One thing that is really nice about the approach to adding content is that the generation of FID is not left in the users control.


author:
   Ian Schneider
author:
   Jody Garnett, Refractions Research
version:
   $Id: FeatureWriter.java 22294 2006-10-20 00:55:40Z desruisseaux $




Method Summary
 voidclose()
     Release the underlying resources.
 FeatureTypegetFeatureType()
     FeatureType this reader has been configured to create.
 booleanhasNext()
     Query whether this FeatureWriter has another Feature.
 Featurenext()
     Reads a Feature from the underlying AttributeReader.
 voidremove()
     Removes current Feature, must be called before hasNext.

FeatureWriters will need to allow all FeatureSources of the same typeName to issue a FeatureEvent event of type FeatureEvent.FEATURES_REMOVED when this method is called.

If this FeatureWriter is opperating against a Transaction FEATURES_REMOVED events should only be sent to FeatureSources operating on the same Transaction.

 voidwrite()
     Wrties the current Feature, must be called before hasNext.

FeautreWriters will need to allow FeatureSources of the same typeName to issue a FeatureEvent:

  • FeatureEvent.FEATURES_ADDED: when next() has been called with hasNext() equal to false.
  • FeatureEvent.FEATURES_MODIFIED: when next has been called with hasNext() equal to true and the resulting Feature has indeed been modified.

If this FeatureWriter is opperating against a Transaction the FEATURES_MODIFIED or FEATURES_ADDED events should only be sent to FeatureSources opperating on the same Transaction.




Method Detail
close
void close() throws IOException(Code)
Release the underlying resources.
throws:
  IOException - if there there are problems releasing underlying resources, orpossibly if close has been called (up to the implementation).



getFeatureType
FeatureType getFeatureType()(Code)
FeatureType this reader has been configured to create. FeatureType this writer has been configured to create.



hasNext
boolean hasNext() throws IOException(Code)
Query whether this FeatureWriter has another Feature.

Please note: it is more efficient to construct your FeatureWriter with a Filer (to skip entries you do not want), than to force the creation of entire Features only to skip over them.

FeatureWriters that support append opperations will allow calls to next, even when haveNext() returns false.

true if an additional Feature isavailable.
throws:
  IOException - DOCUMENT ME!



next
Feature next() throws IOException(Code)
Reads a Feature from the underlying AttributeReader.

This method may return a Feature even though hasNext() returns false, this allows FeatureWriters to provide an ability to append content.

Feature from Query, or newly appended Feature
throws:
  IOException - DOCUMENT ME!



remove
void remove() throws IOException(Code)
Removes current Feature, must be called before hasNext.

FeatureWriters will need to allow all FeatureSources of the same typeName to issue a FeatureEvent event of type FeatureEvent.FEATURES_REMOVED when this method is called.

If this FeatureWriter is opperating against a Transaction FEATURES_REMOVED events should only be sent to FeatureSources operating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.

When the current Feature has been provided as new content, this method "cancels" the add opperation (and notification needed).


throws:
  IOException - DOCUMENT ME!



write
void write() throws IOException(Code)
Wrties the current Feature, must be called before hasNext.

FeautreWriters will need to allow FeatureSources of the same typeName to issue a FeatureEvent:

  • FeatureEvent.FEATURES_ADDED: when next() has been called with hasNext() equal to false.
  • FeatureEvent.FEATURES_MODIFIED: when next has been called with hasNext() equal to true and the resulting Feature has indeed been modified.

If this FeatureWriter is opperating against a Transaction the FEATURES_MODIFIED or FEATURES_ADDED events should only be sent to FeatureSources opperating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.

If you have not called write() when you call hasNext() or next(), no modification will occur().


throws:
  IOException -



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