|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.prodevelop.gvsig.mobile.fmap.driver.vect.dbf.DbfDiskDataSource
This class implements a JNI-based DataSource which is based on a DBF file not loaded into memory.
ShpReader
,
Types
Field Summary |
Fields inherited from interface com.hardcode.gdbms.engine.data.driver.ReadAccess |
FIELD_TYPE_BOOLEAN, FIELD_TYPE_DOUBLE, FIELD_TYPE_FLOAT, FIELD_TYPE_INT, FIELD_TYPE_LONGINT, FIELD_TYPE_STRING |
Constructor Summary | |
DbfDiskDataSource(java.io.File _dbFile)
Constructor |
Method Summary | |
void |
addDataSourceListener(com.hardcode.gdbms.engine.data.IDataSourceListener arg0)
Adds a datasource listener. |
static java.lang.String[] |
commaSeparatedToStringArray(java.lang.String commasep)
Utility conversion method. |
java.lang.String |
getAsString()
|
com.hardcode.gdbms.engine.data.DataSourceFactory |
getDataSourceFactory()
|
com.hardcode.gdbms.engine.data.edition.DataWare |
getDataWare(int arg0)
Gets the data ware associated with the given index. |
com.hardcode.driverManager.Driver |
getDriver()
|
int |
getFieldCount()
|
int |
getFieldIndexByName(java.lang.String arg0)
Gets the idnex of a field, provided its name. |
java.lang.String |
getFieldName(int arg0)
Gets the name of the field with the given index. |
java.lang.String[] |
getFieldNames()
|
int |
getFieldType(int arg0)
Gets the type of the field with the given index. |
com.hardcode.gdbms.engine.values.Value |
getFieldValue(long arg0,
int arg1)
Gets a value from thsi data source. |
int |
getFieldWidth(int arg0)
Gets the width of the field with the given index. |
com.hardcode.gdbms.engine.data.persistence.Memento |
getMemento()
|
java.lang.String |
getName()
|
int |
getPKCardinality()
|
java.lang.String |
getPKName(int arg0)
Gets the name of one of the fields that compose the PK. |
java.lang.String[] |
getPKNames()
|
int |
getPKType(int arg0)
Gets the type of one of the fields that compose the PK. |
com.hardcode.gdbms.engine.values.ValueCollection |
getPKValue(long arg0)
Gets the primary key value for a row |
int[] |
getPrimaryKeys()
|
com.hardcode.gdbms.engine.values.Value[] |
getRow(long rowind)
Gets a row of this data source. |
long |
getRowCount()
|
com.hardcode.gdbms.engine.data.SourceInfo |
getSourceInfo()
|
long[] |
getWhereFilter()
|
boolean |
isVirtualField(int arg0)
Gets whether the referenced field is virtual or not. |
void |
reload()
Reloads the data source (stops and starts) |
void |
remove()
Called when the layer is removed. |
void |
removeDataSourceListener(com.hardcode.gdbms.engine.data.IDataSourceListener arg0)
Removes a datasource listener. |
void |
setDataSourceFactory(com.hardcode.gdbms.engine.data.DataSourceFactory arg0)
Sets the datasource factory. |
void |
setSourceInfo(com.hardcode.gdbms.engine.data.SourceInfo arg0)
Sets the source info. |
void |
start()
Initializes the dfata source (reads the file metadata) |
void |
stop()
Stops the datasource. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbfDiskDataSource(java.io.File _dbFile)
_dbFile
- the DBF file to readMethod Detail |
public void start() throws com.hardcode.gdbms.engine.data.driver.DriverException
start
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public static java.lang.String[] commaSeparatedToStringArray(java.lang.String commasep)
commasep
- s comma separated list of values
public void stop() throws com.hardcode.gdbms.engine.data.driver.DriverException
stop
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public java.lang.String getName()
getName
in interface com.hardcode.gdbms.engine.data.DataSource
public long[] getWhereFilter() throws java.io.IOException
getWhereFilter
in interface com.hardcode.gdbms.engine.data.DataSource
java.io.IOException
public com.hardcode.gdbms.engine.data.DataSourceFactory getDataSourceFactory()
getDataSourceFactory
in interface com.hardcode.gdbms.engine.data.DataSource
public com.hardcode.gdbms.engine.data.persistence.Memento getMemento() throws com.hardcode.gdbms.engine.data.persistence.MementoException
getMemento
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.persistence.MementoException
public void setDataSourceFactory(com.hardcode.gdbms.engine.data.DataSourceFactory arg0)
setDataSourceFactory
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the new data source factorypublic void setSourceInfo(com.hardcode.gdbms.engine.data.SourceInfo arg0)
setSourceInfo
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the new source infopublic com.hardcode.gdbms.engine.data.SourceInfo getSourceInfo()
getSourceInfo
in interface com.hardcode.gdbms.engine.data.DataSource
public java.lang.String getAsString() throws com.hardcode.gdbms.engine.data.driver.DriverException
getAsString
in interface com.hardcode.gdbms.engine.data.DataSource
getName()
com.hardcode.gdbms.engine.data.driver.DriverException
public void remove() throws com.hardcode.gdbms.engine.data.driver.DriverException
remove
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public int[] getPrimaryKeys() throws com.hardcode.gdbms.engine.data.driver.DriverException
getPrimaryKeys
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public com.hardcode.gdbms.engine.values.ValueCollection getPKValue(long arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getPKValue
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the row of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public java.lang.String getPKName(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getPKName
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the index of the PK field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public java.lang.String[] getPKNames() throws com.hardcode.gdbms.engine.data.driver.DriverException
getPKNames
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public int getPKType(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getPKType
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the index of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public int getPKCardinality() throws com.hardcode.gdbms.engine.data.driver.DriverException
getPKCardinality
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public com.hardcode.gdbms.engine.values.Value[] getRow(long rowind) throws com.hardcode.gdbms.engine.data.driver.DriverException
getRow
in interface com.hardcode.gdbms.engine.data.DataSource
rowind
- the index of the row of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public java.lang.String[] getFieldNames() throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldNames
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
public int getFieldIndexByName(java.lang.String arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldIndexByName
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the name of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public com.hardcode.gdbms.engine.data.edition.DataWare getDataWare(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getDataWare
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the index of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public boolean isVirtualField(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
isVirtualField
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the index of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public com.hardcode.driverManager.Driver getDriver()
getDriver
in interface com.hardcode.gdbms.engine.data.DataSource
public void reload() throws com.hardcode.gdbms.engine.data.driver.DriverException, java.io.IOException
reload
in interface com.hardcode.gdbms.engine.data.DataSource
com.hardcode.gdbms.engine.data.driver.DriverException
java.io.IOException
public void addDataSourceListener(com.hardcode.gdbms.engine.data.IDataSourceListener arg0)
addDataSourceListener
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the listener to be added.public void removeDataSourceListener(com.hardcode.gdbms.engine.data.IDataSourceListener arg0)
removeDataSourceListener
in interface com.hardcode.gdbms.engine.data.DataSource
arg0
- the listener to be removed.public com.hardcode.gdbms.engine.values.Value getFieldValue(long arg0, int arg1) throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldValue
in interface com.hardcode.gdbms.engine.data.driver.ReadAccess
arg0
- the row of interestarg1
- the index of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public int getFieldCount() throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldCount
in interface com.hardcode.gdbms.engine.data.driver.ReadAccess
com.hardcode.gdbms.engine.data.driver.DriverException
public java.lang.String getFieldName(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldName
in interface com.hardcode.gdbms.engine.data.driver.ReadAccess
arg0
- the index of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public long getRowCount() throws com.hardcode.gdbms.engine.data.driver.DriverException
getRowCount
in interface com.hardcode.gdbms.engine.data.driver.ReadAccess
com.hardcode.gdbms.engine.data.driver.DriverException
public int getFieldType(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldType
in interface com.hardcode.gdbms.engine.data.driver.ReadAccess
arg0
- the index of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
public int getFieldWidth(int arg0) throws com.hardcode.gdbms.engine.data.driver.DriverException
getFieldWidth
in interface com.hardcode.gdbms.engine.data.driver.ReadAccess
arg0
- the index of the field of interest
com.hardcode.gdbms.engine.data.driver.DriverException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |