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

Object
  extended by AttributeIndexReader

public class AttributeIndexReader
extends Object

Class to read an attribute index file

Author:
Manuele Ventoruzzo

Constructor Summary
AttributeIndexReader(String attribute, FileChannel readChannel)
          Crea una nuova istanza di AttributeIndexReader
 
Method Summary
 Collection findFids(Object reqAttribute)
          Finds an attribute and returns its FIDs.
 IndexRecord findRecord(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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeIndexReader

public AttributeIndexReader(String attribute,
                            FileChannel readChannel)
                     throws IOException
Crea una nuova istanza di AttributeIndexReader

Throws:
IOException
Method Detail

getCount

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


goTo

public void goTo(int recno)
          throws IOException
Throws:
IOException

next

public IndexRecord next()
                 throws IOException
Throws:
IOException

hasNext

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

Throws:
IOException

isEOF

public boolean isEOF()
              throws IOException
Throws:
IOException

findFids

public Collection findFids(Object reqAttribute)
                    throws 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:
IOException

findRecord

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

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


Copyright © 1996-2009 Geotools. All Rights Reserved.