org.geotools.data.shapefile.indexed
Class IndexedShapefileDataStore.Reader

java.lang.Object
  extended byorg.geotools.data.AbstractAttributeIO
      extended byorg.geotools.data.shapefile.indexed.IndexedShapefileDataStore.Reader
All Implemented Interfaces:
AttributeReader
Enclosing class:
IndexedShapefileDataStore

protected static class IndexedShapefileDataStore.Reader
extends AbstractAttributeIO
implements AttributeReader

An AttributeReader implementation for shape. Pretty straightforward.
The default geometry is at position 0, and all dbf columns follow.
The dbf file may not be necessary, if not, just pass null as the DbaseFileReader


Field Summary
protected  IndexedDbaseFileReader dbf
           
protected  java.util.List goodRecs
           
protected  ShapefileReader.Record record
           
protected  DbaseFileReader.Row row
           
protected  ShapefileReader shp
           
 
Fields inherited from class org.geotools.data.AbstractAttributeIO
metaData
 
Constructor Summary
IndexedShapefileDataStore.Reader(AttributeType[] atts, ShapefileReader shp, IndexedDbaseFileReader dbf, java.util.List goodRecs)
          Create the shape reader
 
Method Summary
 void close()
          Release any resources associated with this reader
 int getRecordNumber()
           
 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 param)
          Read the attribute at the given index.
 
Methods inherited from class org.geotools.data.AbstractAttributeIO
copy, getAttributeCount, getAttributeType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.data.AttributeReader
getAttributeCount, getAttributeType
 

Field Detail

shp

protected ShapefileReader shp

dbf

protected IndexedDbaseFileReader dbf

row

protected DbaseFileReader.Row row

record

protected ShapefileReader.Record record

goodRecs

protected java.util.List goodRecs
Constructor Detail

IndexedShapefileDataStore.Reader

public IndexedShapefileDataStore.Reader(AttributeType[] atts,
                                        ShapefileReader shp,
                                        IndexedDbaseFileReader dbf,
                                        java.util.List goodRecs)
Create the shape reader

Parameters:
atts - - the attributes that we are going to read.
shp - - the shape reader, required
dbf - - the dbf file reader. May be null, in this case no attributes will be read from the dbf file
goodRecs - DOCUMENT ME!
Method Detail

close

public void close()
           throws java.io.IOException
Description copied from interface: AttributeReader
Release any resources associated with this reader

Specified by:
close in interface AttributeReader
Throws:
java.io.IOException

hasNext

public boolean hasNext()
                throws java.io.IOException
Description copied from interface: AttributeReader
Does another set of attributes exist in this reader?

Specified by:
hasNext in interface AttributeReader
Returns:
true if additional content exists for AttributeReader
Throws:
java.io.IOException

next

public void next()
          throws java.io.IOException
Description copied from interface: AttributeReader
Advance the reader to the next set of attributes.

Specified by:
next in interface AttributeReader
Throws:
java.io.IOException

getRecordNumber

public int getRecordNumber()

read

public java.lang.Object read(int param)
                      throws java.io.IOException,
                             java.lang.ArrayIndexOutOfBoundsException
Description copied from interface: AttributeReader
Read the attribute at the given index.

Specified by:
read in interface AttributeReader
Returns:
Object Attribute at given index
Throws:
java.io.IOException
java.lang.ArrayIndexOutOfBoundsException


Copyright © GeoTools. All Rights Reserved.