Class InventoryTableReader
java.lang.Object
gov.nasa.pds.tools.inventory.reader.InventoryTableReader
- All Implemented Interfaces:
InventoryReader
Class that supports reading of a table-version of the PDS Inventory file.
- Author:
- mcayanan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXPath to the external table file of a collection.static final StringXPath to determine the field delimiter being used in the inventory table.static final StringXPath to determine the field location of the LID-LIDVID field in the inventory table.static final StringXPath to determine the field location of the member status field in the inventory table. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the data file that is being read.intGets the line number that was just read.getNext()Gets the next product file reference in the PDS Inventory file.longReturns the records number in the PDS Inventory file.
-
Field Details
-
FIELD_DELIMITER
XPath to determine the field delimiter being used in the inventory table.- See Also:
-
MEMBER_STATUS_FIELD_NUMBER
XPath to determine the field location of the member status field in the inventory table.- See Also:
-
LIDVID_LID_FIELD_NUMBER
XPath to determine the field location of the LID-LIDVID field in the inventory table.- See Also:
-
DATA_FILE
XPath to the external table file of a collection.- See Also:
-
-
Constructor Details
-
InventoryTableReader
Constructor.- Parameters:
url- The URL to the PDS Inventory file.- Throws:
InventoryReaderException- If an error occurred while reading the Inventory file.URISyntaxExceptionMalformedURLException
-
-
Method Details
-
getDataFile
Gets the data file that is being read.- Returns:
- the data file.
-
getLineNumber
public int getLineNumber()Gets the line number that was just read.- Returns:
- the line number.
-
getNumRecords
public long getNumRecords()Returns the records number in the PDS Inventory file. -
getNext
Gets the next product file reference in the PDS Inventory file.- Specified by:
getNextin interfaceInventoryReader- Returns:
- A class representation of the next product file reference in the PDS inventory file. If the end-of-file has been reached, a null value will be returned.
- Throws:
InventoryReaderException- If an error occurred while reading the Inventory file.
-