类 AttributeTable
- java.lang.Object
-
- org.meteoinfo.data.mapdata.AttributeTable
-
- 所有已实现的接口:
java.lang.Cloneable
public final class AttributeTable extends java.lang.Object implements java.lang.CloneableAttribute table of shape file- 作者:
- yaqiang
-
-
构造器概要
构造器 构造器 说明 AttributeTable()ConstructorAttributeTable(java.lang.String filename)Constructor
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.Objectclone()Clonevoidfill(int numRows)This populates the Table with data from the file.java.lang.StringgetEncoding()Get encoding stringjava.io.FilegetFile()Get fileintgetNumRecords()Get record numberDataTablegetTable()Get data tablevoidopen(java.lang.String filename)Reads all the information from the file, including the vector shapes and the database component.voidopenDBF(java.lang.String fileName)Reads all the information from the dBase file, including the vector shapes and the database component.voidsave()Save the filevoidsave(java.lang.String fileName)Save the filevoidsaveAs(java.lang.String fileName, boolean overwrite)Save this table to the specified file namevoidsetEncoding(java.lang.String value)Set encoding stringvoidsetTable(DataTable table)Set data tablevoidupdateDataTable()Update data table - convert DataColumn to FieldvoidwriteHeader(EndianDataOutputStream writer)Write the header data to the DBF filevoidwriteTable()This appends the content of one datarow to a DBF file
-
-
-
构造器详细资料
-
AttributeTable
public AttributeTable()
Constructor
-
AttributeTable
public AttributeTable(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ExceptionConstructor- 参数:
filename- The file name- 抛出:
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.lang.Exception
-
-
方法详细资料
-
getFile
public java.io.File getFile()
Get file- 返回:
- File
-
getNumRecords
public int getNumRecords()
Get record number- 返回:
- Record number
-
getTable
public DataTable getTable()
Get data table- 返回:
- The data table
-
setTable
public void setTable(DataTable table)
Set data table- 参数:
table- The data table
-
getEncoding
public java.lang.String getEncoding()
Get encoding string- 返回:
- Encoding string
-
setEncoding
public void setEncoding(java.lang.String value)
Set encoding string- 参数:
value- Encoding string
-
updateDataTable
public void updateDataTable()
Update data table - convert DataColumn to Field
-
open
public void open(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ExceptionReads all the information from the file, including the vector shapes and the database component.- 参数:
filename- The file name- 抛出:
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.lang.Exception
-
openDBF
public void openDBF(java.lang.String fileName) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ExceptionReads all the information from the dBase file, including the vector shapes and the database component.- 参数:
fileName- The dBase file name- 抛出:
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.lang.Exception
-
fill
public void fill(int numRows) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ExceptionThis populates the Table with data from the file.- 参数:
numRows- In the event that the dbf file is not found, this indicates how many blank rows should exist in the attribute Table.- 抛出:
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.lang.Exception
-
save
public void save()
Save the file
-
save
public void save(java.lang.String fileName)
Save the file- 参数:
fileName- File name
-
saveAs
public void saveAs(java.lang.String fileName, boolean overwrite)Save this table to the specified file name- 参数:
fileName- The file name to be savedoverwrite- If over write the file if it exists
-
writeHeader
public void writeHeader(EndianDataOutputStream writer) throws java.io.IOException
Write the header data to the DBF file- 参数:
writer- The writer stream- 抛出:
java.io.IOException- IO exception
-
writeTable
public void writeTable() throws java.io.IOExceptionThis appends the content of one datarow to a DBF file- 抛出:
java.io.IOException
-
clone
public java.lang.Object clone()
Clone- 覆盖:
clone在类中java.lang.Object- 返回:
- AttributeTable object
-
-