Package ch.so.agi.filegdb.table
Class FileGdbTableFile
java.lang.Object
ch.so.agi.filegdb.table.FileGdbTableFile
- All Implemented Interfaces:
AutoCloseable
Read access to a
.gdbtable file and its .gdbtablx row index.
Ported from GDAL OpenFileGDB (filegdbtable.cpp). The class exposes the physical table;
feature classes and tables are layered on top by the catalog reader.
Rows are decoded sequentially in field order. Random access to a single field of a row is not offered because the row format has no random access.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPhysical layout needed to append without rewriting existing field definitions. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intfields()ch.so.agi.filegdb.geometry.GeometryKindReturns the geometry field ornullfor plain tables.intbooleanhasM()booleanhasZ()longintstatic FileGdbTableFilestatic FileGdbTableFileopen(Path path, Map<String, FieldMetadata> metadata) Opens a table with catalog metadata for fields.path()Object[]readRow(long rowIndex) Reads a row and decodes all field values.booleanbooleanlonglongintversion()
-
Method Details
-
writeLayout
-
open
- Throws:
IOException
-
open
public static FileGdbTableFile open(Path path, Map<String, FieldMetadata> metadata) throws IOExceptionOpens a table with catalog metadata for fields. The metadata supplies the assigned domain and the high precision flag, which are not part of the binary table header.- Throws:
IOException
-
path
-
version
public int version() -
validRecordCount
public long validRecordCount() -
totalRecordCount
public long totalRecordCount() -
headerBufferMaxSize
public long headerBufferMaxSize() -
fieldDescriptorLength
public int fieldDescriptorLength() -
stringsUtf8
public boolean stringsUtf8() -
geometryKind
public ch.so.agi.filegdb.geometry.GeometryKind geometryKind() -
hasZ
public boolean hasZ() -
hasM
public boolean hasM() -
fields
-
geomField
Returns the geometry field ornullfor plain tables. -
geomFieldIndex
public int geomFieldIndex() -
objectIdFieldIndex
public int objectIdFieldIndex() -
reliableObjectIds
public boolean reliableObjectIds() -
readRow
Reads a row and decodes all field values.Values use the following Java types:
Longfor the object id and integer fields,Doublefor real fields,Stringfor string and XML fields,LocalDateTime/LocalDate/LocalTime/OffsetDateTimefor date and time fields,UUIDfor GUID fields,byte[]for binary fields andFileGdbGeometryfor geometry fields.- Returns:
- the decoded values or
nullif the row is deleted or empty - Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-