Package gov.nasa.pds.objectAccess
Interface ObjectProvider
- All Known Implementing Classes:
ObjectAccess
public interface ObjectProvider
Provides access to PDS4 objects.
-
Method Summary
Modifier and TypeMethodDescriptionGets the root file path of the object archive(s) for this ObjectProvider.getArray2DImages(FileAreaObservational observationalFileArea) Returns a list of Array2DImage objects given an observation file area object.getArray3DImages(FileAreaObservational observationalFileArea) Returns a list of Array3DImage objects given an observation file area object.getArray3DSpectrums(FileAreaObservational observationalFileArea) Returns a list of Array3DSpectrum objects given an observation file area object.Gets a list of Array objects from a file area.getArrays(FileAreaBrowse fileArea) Gets a list of Array objects from a browse file area.getArrays(FileAreaObservational fileArea) Gets a list of Array objects from an observational file area.getDataObjects(Product product) getFieldBinaries(TableBinary table) Returns a list of FieldBinary objects given a table binary object.Returns a list of FieldBinary and GroupFieldBinary objects given a table binary object.Returns a list of FieldCharacter and GroupFieldCharacter objects given a table character object.getFieldCharacters(TableCharacter table) Returns a list of FieldCharacter objects given a table character object.Returns a list of FieldDelimited and GroupFieldDelimited objects given a table delimited object.getFieldDelimiteds(TableDelimited table) Returns a list of FieldDelimited objects given a table delimited object.Returns a list of GroupFieldDelimited objects given a table delimited object.getHeaderObjects(FileArea fileArea) getHeaderObjects(FileAreaAncillary anciilaryFileArea) getHeaderObjects(FileAreaBrowse browseFileArea) getHeaderObjects(FileAreaObservational observationalFileArea) Returns a list of Header objectslonggetObjectLength(Object obj) getObservationalProduct(String relativeXmlFilePath) Gets an instance of ProductObservational.long<T> TgetProduct(File labelFile, Class<T> productClass) Reads a product label of a specified class, and returns an instance of that class as a result.<T> TgetProduct(URL label, Class<T> productClass) Reads a product label of a specified class, and returns an instance of that class as a result.getRoot()Gets the root file path of the object archive(s) for this ObjectProvider.getTableBinaries(FileAreaObservational observationalFileArea) Returns a list of TableBinary objects given an observation file area object.getTableCharacters(FileAreaObservational observationalFileArea) Returns a list of TableCharacter objects given an observation file area object.getTableDelimiteds(FileAreaObservational observationalFileArea) Returns a list of TableDelimited objects given an observation file area object.getTableObjects(FileArea fileArea) getTableObjects(FileAreaAncillary anciilaryFileArea) getTableObjects(FileAreaBrowse browseFileArea) getTableObjects(FileAreaObservational observationalFileArea) Returns a list of table objects.getTableObjects(FileAreaObservationalSupplemental observationalFileAreaSupplemental) getTablesAndImages(FileArea fileArea) getTablesAndImages(FileAreaBrowse browseFileArea) getTablesAndImages(FileAreaObservational observationalFileArea) voidsetObservationalProduct(String relativeXmlFilePath, ProductObservational product) Writes a label given the product XML file.voidsetObservationalProduct(String relativeXmlFilePath, ProductObservational product, XMLLabelContext context) Writes a label given the product XML file.
-
Method Details
-
getArchiveRoot
String getArchiveRoot()Gets the root file path of the object archive(s) for this ObjectProvider.- Returns:
- the root file path of the object archive(s) for this ObjectProvider
-
getRoot
URL getRoot()Gets the root file path of the object archive(s) for this ObjectProvider.- Returns:
- the root file path of the object archive(s) for this ObjectProvider
-
getDataObjects
- Throws:
ParseException
-
getArrays
Gets a list of Array objects from a file area.- Parameters:
fileArea- the file area.- Returns:
- an list of arrays, which may be empty.
-
getArrays
Gets a list of Array objects from an observational file area.- Parameters:
fileArea- the observational file area.- Returns:
- an list of arrays, which may be empty.
-
getArrays
Gets a list of Array objects from a browse file area.- Parameters:
fileArea- the browse file area- Returns:
- an list of arrays, which may be empty
-
getArray2DImages
Returns a list of Array2DImage objects given an observation file area object.- Parameters:
observationalFileArea-- Returns:
- a list of image objects
-
getArray3DImages
Returns a list of Array3DImage objects given an observation file area object.- Parameters:
observationalFileArea-- Returns:
- a list of image objects
-
getArray3DSpectrums
Returns a list of Array3DSpectrum objects given an observation file area object.- Parameters:
observationalFileArea-- Returns:
- a list of image objects
-
getTableObjects
Returns a list of table objects.- Parameters:
observationalFileArea-- Returns:
- a list of table objects
-
getTableObjects
-
getTableObjects
-
getTableObjects
-
getTableObjects
-
getTablesAndImages
-
getTablesAndImages
-
getTablesAndImages
-
getHeaderObjects
Returns a list of Header objects- Parameters:
observationalFileArea-- Returns:
- a list of Header objects
-
getHeaderObjects
-
getHeaderObjects
-
getHeaderObjects
-
getTableCharacters
Returns a list of TableCharacter objects given an observation file area object.- Parameters:
observationalFileArea-- Returns:
- list of TableCharacter objects
-
getTableBinaries
Returns a list of TableBinary objects given an observation file area object.- Parameters:
observationalFileArea-- Returns:
- list of TableBinary objects
-
getTableDelimiteds
Returns a list of TableDelimited objects given an observation file area object.- Parameters:
observationalFileArea-- Returns:
- list of TableDelimited objects
-
getFieldCharacters
Returns a list of FieldCharacter objects given a table character object.- Parameters:
table- TableCharacter object- Returns:
- list of FieldCharacter objects
-
getFieldBinaries
Returns a list of FieldBinary objects given a table binary object.- Parameters:
table- TableBinary object- Returns:
- list of FieldBinary objects
-
getFieldDelimiteds
Returns a list of FieldDelimited objects given a table delimited object.- Parameters:
table- TableDelimited object- Returns:
- list of FieldDelimited objects
-
getGroupFieldDelimiteds
Returns a list of GroupFieldDelimited objects given a table delimited object.- Parameters:
table- TableDelimited object- Returns:
- list of GroupFieldDelimited objects
-
getFieldDelimitedAndGroupFieldDelimiteds
Returns a list of FieldDelimited and GroupFieldDelimited objects given a table delimited object.- Parameters:
table- TableDelimited object- Returns:
- list of FieldDelimited and GroupFieldDelimited objects
-
getFieldCharacterAndGroupFieldCharacters
Returns a list of FieldCharacter and GroupFieldCharacter objects given a table character object.- Parameters:
table- TableCharacter object- Returns:
- list of FieldCharacter and GroupFieldCharacter objects
-
getFieldBinaryAndGroupFieldBinaries
Returns a list of FieldBinary and GroupFieldBinary objects given a table binary object.- Parameters:
table- TableBinary object- Returns:
- list of FieldBinary and GroupFieldBinary objects
-
getObservationalProduct
Gets an instance of ProductObservational.- Parameters:
relativeXmlFilePath- the XML file path and name of the product to obtain, relative to the ObjectAccess archive root- Returns:
- an instance of ProductObservational
-
getProduct
Reads a product label of a specified class, and returns an instance of that class as a result.- Type Parameters:
T- the product object class- Parameters:
labelFile- the file containing the XML labelproductClass- the product object class- Returns:
- an instance of the product object
- Throws:
ParseException- if there is an error parsing the label
-
getProduct
Reads a product label of a specified class, and returns an instance of that class as a result.- Type Parameters:
T- the product object class- Parameters:
label- the url containing the XML labelproductClass- the product object class- Returns:
- an instance of the product object
- Throws:
ParseException- if there is an error parsing the label
-
setObservationalProduct
void setObservationalProduct(String relativeXmlFilePath, ProductObservational product) throws Exception Writes a label given the product XML file.- Parameters:
relativeXmlFilePath- the XML file path and name of the product to set, relative to the ObjectAccess archive rootproduct- The Product_Observational object to serialize into an XML file.- Throws:
Exception
-
setObservationalProduct
void setObservationalProduct(String relativeXmlFilePath, ProductObservational product, XMLLabelContext context) throws Exception Writes a label given the product XML file.- Parameters:
relativeXmlFilePath- the XML file path and name of the product to set, relative to the ObjectAccess archive root.product- The Product_Observational object to serialize into an XML file.context- A context to use when creating the XML file. Can be set to null.- Throws:
Exception- If there was an error creating the XML file.
-
getOffset
- Throws:
Exception
-
getObjectLength
- Throws:
Exception
-