|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAttributeIndexSummary
public class AttributeIndexSummary
Class to manage a summary for attribute indexes.
It's just map that associates attribute name with index file. Using the name instead of its position on dbf permits to abstract from position, so attribute order can change with no influence on indexes.
modules/plugin/shapefile (gt-shapefile.jar)
Field Summary | |
---|---|
protected int |
cacheSize
|
static int |
DEFAULT_CACHE_SIZE
|
protected String |
filename
|
static String |
INDEX_EXT
|
static DecimalFormat |
SUFFIX
|
static String |
SUMMARY_EXT
|
protected URL |
summaryURL
Url of summary file |
Constructor Summary | |
---|---|
AttributeIndexSummary(URL shpURL)
Creates an IndexSummary |
|
AttributeIndexSummary(URL shpURL,
int cacheSize)
Creates an IndexSummary |
Method Summary | |
---|---|
protected void |
addIndex(String attribute)
|
void |
createIndex(String attribute)
Index creation. |
boolean |
existsIndex(String attribute)
Tests whether an index for this attribute exists. |
protected FileChannel |
getDBFChannel()
|
AttributeIndexReader |
getIndex(String attribute)
Returns the index for specified attribute |
protected URL |
getIndexURL(String attribute)
Returns the index URL for specified attribute |
boolean |
hasIndex(String attribute)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SUMMARY_EXT
public static final String INDEX_EXT
public static final DecimalFormat SUFFIX
public static final int DEFAULT_CACHE_SIZE
protected URL summaryURL
protected String filename
protected int cacheSize
Constructor Detail |
---|
public AttributeIndexSummary(URL shpURL) throws MalformedURLException, IOException
shapefileUrl
- url of shapefile for wich indexes are related to
MalformedURLException
IOException
public AttributeIndexSummary(URL shpURL, int cacheSize) throws MalformedURLException, IOException
shapefileUrl
- url of shapefile for wich indexes are related tocacheSize
- maximum amount of memory to be used for index creation
MalformedURLException
IOException
Method Detail |
---|
public void createIndex(String attribute) throws FileNotFoundException, IOException
attribute
-
FileNotFoundException
IOException
public AttributeIndexReader getIndex(String attribute) throws FileNotFoundException, IOException
attribute
- attribute to search for
FileNotFoundException
IOException
public boolean hasIndex(String attribute) throws FileNotFoundException, IOException
FileNotFoundException
IOException
public boolean existsIndex(String attribute) throws FileNotFoundException, IOException
attribute
-
FileNotFoundException
IOException
protected URL getIndexURL(String attribute) throws FileNotFoundException, IOException
attribute
- attribute to search for
FileNotFoundException
IOException
protected void addIndex(String attribute) throws FileNotFoundException, IOException
FileNotFoundException
IOException
protected FileChannel getDBFChannel() throws FileNotFoundException, MalformedURLException
FileNotFoundException
MalformedURLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |