Package gov.nasa.pds.objectAccess.table
Interface TableAdapter
- All Known Implementing Classes:
TableBinaryAdapter,TableCharacterAdapter,TableDelimitedAdapter
public interface TableAdapter
Defines a facade object that gives access to a table,
either binary fixed, character fixed, or delimited.
-
Method Summary
Modifier and Type Method Description FieldDescriptiongetField(int index)Returns the field at a given index.intgetFieldCount()Gets the number of fields in each record.FieldDescription[]getFields()Gets the definitions of fields from the table.longgetOffset()Gets the offset into the data file where the table starts.intgetRecordCount()Gets the number of records in the table.intgetRecordLength()Gets the length of each record.
-
Method Details
-
getRecordCount
int getRecordCount()Gets the number of records in the table.- Returns:
- the number of records
-
getFieldCount
int getFieldCount()Gets the number of fields in each record.- Returns:
- the number of fields
-
getField
Returns the field at a given index. This field will be a simple field or a bit field. All grouped fields will have been expanded to their instances.- Parameters:
index- the field index- Returns:
- the field description
-
getFields
FieldDescription[] getFields()Gets the definitions of fields from the table. The fields will be a simple field or a bit field. All grouped fiels will have been expanded to their instances.- Returns:
- an array of field descriptions
-
getOffset
long getOffset()Gets the offset into the data file where the table starts.- Returns:
- the table offset
-
getRecordLength
int getRecordLength()Gets the length of each record. For delimited tables the record length is not defined, so zero is returned.- Returns:
- the record length, or zero for a delimited table
-