org.geotools.data
Interface AttributeReader

All Known Implementing Classes:
IndexedShapefileAttributeReader, JoiningAttributeReader, PropertyAttributeReader, QueryData, ShapefileAttributeReader

public interface AttributeReader

The low-level attribute reading API. An AttributeReader is responsible for reading a finite set of attributes from an underlying storage format. It provides meta-data regarding the data it can provide, and an iterative, row-based approach for accessing the data.

Version:
$Id: AttributeReader.java 30648 2008-06-12 19:22:35Z acuster $
Author:
Ian Schneider
See Also:
AttributeAcceptor

Method Summary
 void close()
          Release any resources associated with this reader
 int getAttributeCount()
          The number of attributes this reader can read, i.e the length of a row.
 org.opengis.feature.type.AttributeDescriptor getAttributeType(int index)
          Retrieve the AttributeType at the given index.
 boolean hasNext()
          Does another set of attributes exist in this reader?
 void next()
          Advance the reader to the next set of attributes.
 java.lang.Object read(int index)
          Read the attribute at the given index.
 

Method Detail

getAttributeCount

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

Returns:
Number of attribtues this reader can read

getAttributeType

org.opengis.feature.type.AttributeDescriptor getAttributeType(int index)
                                                              throws java.lang.ArrayIndexOutOfBoundsException
Retrieve the AttributeType at the given index.

Returns:
AttributeType at given index
Throws:
java.lang.ArrayIndexOutOfBoundsException

close

void close()
           throws java.io.IOException
Release any resources associated with this reader

Throws:
java.io.IOException

hasNext

boolean hasNext()
                throws java.io.IOException
Does another set of attributes exist in this reader?

Returns:
true if additional content exists for AttributeReader
Throws:
java.io.IOException

next

void next()
          throws java.io.IOException
Advance the reader to the next set of attributes.

Throws:
java.io.IOException

read

java.lang.Object read(int index)
                      throws java.io.IOException,
                             java.lang.ArrayIndexOutOfBoundsException
Read the attribute at the given index.

Returns:
Object Attribute at given index
Throws:
java.io.IOException
java.lang.ArrayIndexOutOfBoundsException


Copyright © 1996-2010 Geotools. All Rights Reserved.