|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.io.shpapi.DBaseFile
the datatypes of the dBase file and their representation as java types: dBase-type dBase-type-ID java-type character "C" String float "F" Float number "N" Double logical "L" String memo "M" String date "D" Date binary "B" ByteArrayOutputStream
Field Summary | |
private java.lang.String |
_dbf
|
private long |
cacheSize
|
private java.util.ArrayList |
colHeader
|
private java.util.Hashtable |
column_info
|
private byte[] |
dataArray
|
private DBFDataSection |
dataSection
|
private boolean |
eof
|
private FeatureType |
featureType
|
private int |
file_datalength
|
private int |
file_datap
|
private double |
file_numrecs
|
private short |
file_type
|
private short |
file_update_day
|
private short |
file_update_month
|
private short |
file_update_year
|
private int |
filemode
|
private java.lang.String |
fname
|
private java.lang.String |
ftName
|
private DBFHeader |
header
|
private int |
num_fields
|
private java.io.RandomAccessFile |
rafDbf
|
private long |
record_number
|
private long |
startIndex
|
Constructor Summary | |
DBaseFile(java.lang.String url)
constructor only for reading a dBase file |
|
DBaseFile(java.lang.String url,
FieldDescriptor[] fieldDesc)
constructor only for writing a dBase file |
Method Summary | |
void |
close()
|
private boolean |
contains(java.lang.String[] container,
java.lang.String element)
method: private boolean contains(String[] container, String element) retruns true if the container sting array contains element |
private FeatureType |
createFeatureType()
|
private static short |
fixByte(byte b)
method: private fixByte (byte b) bytes are signed; let's fix them... |
java.lang.String |
getColumn(java.lang.String col_name)
method: getColumn(String col_name) Retrieve a column's string value from the current row. |
int |
getDataLength(java.lang.String field)
returns the size of a column |
java.lang.String[] |
getDataTypes()
method: public String[] getDataTypes() returns the datatype of each column of the database |
java.lang.String[] |
getDataTypes(java.lang.String[] fields)
method: public String[] getDataTypes(String[] fields) returns the datatype of each column of the database specified by fields |
Feature |
getFRow(int rowNo)
returns a row of the dBase-file as Feature containing a place holder (field name = "GEOM") for a geometry. |
java.lang.String[] |
getProperties()
method: public String[] getProperties() returns the properties (column headers) of the dBase-file |
int |
getRecordNum()
method: getRecordNum() Get the number of records in the table |
java.lang.Object[] |
getRow(int rowNo)
method: public ArrayList getRow(int row) returns a row of the dBase-file |
void |
goTop()
method: goTop() Position the record pointer at the top of the table. |
private void |
initDBaseFile()
method: initDBaseFile(); inits a DBF file. |
boolean |
nextRecord()
method: nextRecord() Advance the record pointer to the next record. |
void |
setRecord(java.util.ArrayList recData)
method: public setRecord(ArrayList recData) writes a data record to byte array representing the data section of the dBase file. |
void |
setRecord(int index,
java.util.ArrayList recData)
method: public setRecord(int index, ArrayList recData) writes a data record to byte array representing the data section of the dBase file. |
void |
writeAllToFile()
method: public void writeAllToFile() creates the dbase file and writes all data to it if the file specified by fname (s.o.) exists it will be deleted! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.ArrayList colHeader
private DBFDataSection dataSection
private FeatureType featureType
private java.util.Hashtable column_info
private java.io.RandomAccessFile rafDbf
private final java.lang.String _dbf
private DBFHeader header
private java.lang.String fname
private java.lang.String ftName
private boolean eof
private double file_numrecs
private int file_datalength
private int file_datap
private int filemode
private int num_fields
private long record_number
private short file_type
private short file_update_day
private short file_update_month
private short file_update_year
private long cacheSize
private byte[] dataArray
private long startIndex
Constructor Detail |
public DBaseFile(java.lang.String url) throws java.io.IOException
public DBaseFile(java.lang.String url, FieldDescriptor[] fieldDesc) throws DBaseException
Method Detail |
public void close()
private void initDBaseFile() throws java.io.IOException
java.io.IOException
private FeatureType createFeatureType()
public int getRecordNum() throws DBaseException
DBaseException
public void goTop() throws DBaseException
DBaseException
public boolean nextRecord() throws DBaseException
DBaseException
public java.lang.String getColumn(java.lang.String col_name) throws DBaseException
DBaseException
public java.lang.String[] getProperties() throws DBaseException
DBaseException
public java.lang.String[] getDataTypes() throws DBaseException
DBaseException
private boolean contains(java.lang.String[] container, java.lang.String element)
public int getDataLength(java.lang.String field) throws DBaseException
DBaseException
public java.lang.String[] getDataTypes(java.lang.String[] fields) throws DBaseException
DBaseException
public Feature getFRow(int rowNo) throws DBaseException
DBaseException
public java.lang.Object[] getRow(int rowNo) throws DBaseException
DBaseException
private static short fixByte(byte b)
public void writeAllToFile() throws java.io.IOException, DBaseException
java.io.IOException
DBaseException
public void setRecord(java.util.ArrayList recData) throws DBaseException
DBaseException
public void setRecord(int index, java.util.ArrayList recData) throws DBaseException
DBaseException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |