Package gov.nasa.pds.objectAccess.table
Interface TableAdapter
- 
- All Known Implementing Classes:
- TableBinaryAdapter,- TableCharacterAdapter,- TableDelimitedAdapter
 
 public interface TableAdapterDefines a facade object that gives access to a table, either binary fixed, character fixed, or delimited.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description FieldDescriptiongetField(int index)Returns the field at a given index.intgetFieldCount()Gets the number of fields in each record.chargetFieldDelimiter()Gets the field delimiter.FieldDescription[]getFields()Gets the definitions of fields from the table.java.util.List<FieldDescription>getFieldsList()Gets the definitions of fields from the table.intgetMaximumRecordLength()Gets the maximum length of each record.longgetOffset()Gets the offset into the data file where the table starts.longgetRecordCount()Gets the number of records in the table.java.lang.StringgetRecordDelimiter()Gets the record delimiter.intgetRecordLength()Gets the length of each record.
 
- 
- 
- 
Method Detail- 
getRecordCountlong getRecordCount() Gets the number of records in the table.- Returns:
- the number of records
 
 - 
getFieldCountint getFieldCount() Gets the number of fields in each record. TODO This should really be a long value, but this would require a ton of changes in the code so we will attack this problem when we get there. Data with num fields larger than max int should not happen- Returns:
- the number of fields
 
 - 
getFieldFieldDescription getField(int index) 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
 
 - 
getFieldsFieldDescription[] getFields() Gets the definitions of fields from the table. The fields will be a simple field or a bit field. All grouped fields will have been expanded to their instances.- Returns:
- an array of field descriptions
 
 - 
getFieldsListjava.util.List<FieldDescription> getFieldsList() Gets the definitions of fields from the table. The fields will be a simple field or a bit field. All grouped fields will have been expanded to their instances.- Returns:
- an array of field descriptions
 
 - 
getOffsetlong getOffset() Gets the offset into the data file where the table starts.- Returns:
- the table offset
 
 - 
getRecordLengthint getRecordLength() Gets the length of each record. For delimited tables the record length is not defined, so -1 is returned. TODO This should really be a long value, but this would require a ton of changes in the code we will attack this problem when we get there. Data with record length larger than max int should not happen- Returns:
- the record length, or zero for a delimited table
 
 - 
getMaximumRecordLengthint getMaximumRecordLength() Gets the maximum length of each record. Optional only for delimited tables. Will return -1 if not available.- Returns:
- the maximum record lengths
 
 - 
getRecordDelimiterjava.lang.String getRecordDelimiter() Gets the record delimiter. For binary tables the record delimiter is not defined, so null is returned.- Returns:
- the record delimiter, or null for binary table
 
 - 
getFieldDelimiterchar getFieldDelimiter() Gets the field delimiter. For non-delimited tables, will return 0.- Returns:
- the field delimiter, or 0 for non-delimited table
 
 
- 
 
-