org.geotools.data
Interface AttributeWriter

All Known Implementing Classes:
JoiningAttributeWriter, PropertyAttributeWriter, QueryData

public interface AttributeWriter

- Added hasNext to support the FeatureWriter API. - Changed order of writer parameters to match Collections, JDBC API. - Added IOExceptions on all methods. - Do we want AttributeWriters to know about the schema and perform validation??

Version:
$Id: AttributeWriter.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
Ian Schneider, Sean Geoghegan, Defence Science and Technology Organisation.

Method Summary
 void close()
           
 int getAttributeCount()
          The number of attributes this reader can read, i.e the length of a row.
 AttributeType getAttributeType(int i)
          Retrieve the AttributeType at the given index.
 boolean hasNext()
          Query whether there are other rows in the attribute writer.
 void next()
          Advance the AttributeWriter, all calls to write will correspond to the same set of attributes until next is called again.
 void write(int position, java.lang.Object attribute)
          Write the given attribute value at the position indicated.
 

Method Detail

getAttributeCount

public int getAttributeCount()
The number of attributes this reader can read, i.e the length of a row.


getAttributeType

public AttributeType getAttributeType(int i)
                               throws java.lang.ArrayIndexOutOfBoundsException
Retrieve the AttributeType at the given index.

Throws:
java.lang.ArrayIndexOutOfBoundsException

next

public void next()
          throws java.io.IOException
Advance the AttributeWriter, all calls to write will correspond to the same set of attributes until next is called again.

Throws:
java.io.IOException

write

public void write(int position,
                  java.lang.Object attribute)
           throws java.io.IOException
Write the given attribute value at the position indicated. Implementations can choose to immediately flush the write or buffer it.

Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

hasNext

public boolean hasNext()
                throws java.io.IOException
Query whether there are other rows in the attribute writer.

Returns:
Throws:
java.io.IOException
See Also:
FeatureWriter.hasNext()


Copyright © GeoTools. All Rights Reserved.