org.geotools.data.shapefile.indexed.attribute
Class AttributeIndexReader

java.lang.Object
  extended by org.geotools.data.shapefile.indexed.attribute.AttributeIndexReader

public class AttributeIndexReader
extends java.lang.Object

Class to read an attribute index file

Author:
Manuele Ventoruzzo

Constructor Summary
AttributeIndexReader(java.lang.String attribute, java.nio.channels.FileChannel readChannel)
          Crea una nuova istanza di AttributeIndexReader
 
Method Summary
 java.util.Collection findFids(java.lang.Object reqAttribute)
          Finds an attribute and returns its FIDs.
 IndexRecord findRecord(java.lang.Object reqAttribute)
          Finds an attibute.
 int getCount()
          Returns the number of attributes in this index
 void goTo(int recno)
           
 boolean hasNext()
          Check if there's more elements to read
 boolean isEOF()
           
 IndexRecord next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeIndexReader

public AttributeIndexReader(java.lang.String attribute,
                            java.nio.channels.FileChannel readChannel)
                     throws java.io.IOException
Crea una nuova istanza di AttributeIndexReader

Throws:
java.io.IOException
Method Detail

getCount

public int getCount()
Returns the number of attributes in this index


goTo

public void goTo(int recno)
          throws java.io.IOException
Throws:
java.io.IOException

next

public IndexRecord next()
                 throws java.io.IOException
Throws:
java.io.IOException

hasNext

public boolean hasNext()
                throws java.io.IOException
Check if there's more elements to read

Throws:
java.io.IOException

isEOF

public boolean isEOF()
              throws java.io.IOException
Throws:
java.io.IOException

findFids

public java.util.Collection findFids(java.lang.Object reqAttribute)
                              throws java.io.IOException
Finds an attribute and returns its FIDs.

Parameters:
reqAttribute - Attribute to find.
Returns:
Collection of FID found (empty if nothing could be found). It can found more than one record if it isn't univocal.
Throws:
java.io.IOException

findRecord

public IndexRecord findRecord(java.lang.Object reqAttribute)
                       throws java.io.IOException
Finds an attibute.

Parameters:
reqAttribute - Attribute to find.
Returns:
Record as in index file.
Throws:
java.io.IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.