public class ObjectAccess extends java.lang.Object implements ObjectProvider
ObjectAccess
class is a point of entry into parsed PDS (including PDS 4/XML-schema-labeled) objects.Constructor and Description |
---|
ObjectAccess()
Creates a new instance with the current local directory as the archive root
path.
|
ObjectAccess(java.io.File archiveRoot)
Constructs an
ObjectAccess object and sets the archive root path. |
ObjectAccess(java.lang.String archiveRoot)
Constructs an
ObjectAccess object and sets the archive root path. |
ObjectAccess(java.net.URL archiveRoot)
Constructs an
ObjectAccess object and sets the archive root path. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getArchiveRoot()
Gets the root file path of the object archive(s) for this ObjectProvider.
|
java.util.List<Array2DImage> |
getArray2DImages(FileAreaObservational observationalFileArea)
Returns a list of Array2DImage objects given an observation file area object.
|
java.util.List<Array3DImage> |
getArray3DImages(FileAreaObservational observationalFileArea)
Returns a list of Array3DImage objects given an observation file area object.
|
java.util.List<Array3DSpectrum> |
getArray3DSpectrums(FileAreaObservational observationalFileArea)
Returns a list of Array3DSpectrum objects given an observation file area object.
|
java.util.List<Array> |
getArrays(FileArea fileArea)
Gets a list of Array objects from a file area.
|
java.util.List<Array> |
getArrays(FileAreaBrowse fileArea)
Gets a list of Array objects from a browse file area.
|
java.util.List<Array> |
getArrays(FileAreaObservational fileArea)
Gets a list of Array objects from an observational file area.
|
java.util.List<FieldBinary> |
getFieldBinaries(TableBinary table)
Returns a list of FieldBinary objects given a table binary object.
|
java.util.List<java.lang.Object> |
getFieldBinaryAndGroupFieldBinaries(TableBinary table)
Returns a list of FieldBinary and GroupFieldBinary objects given a
table binary object.
|
java.util.List<java.lang.Object> |
getFieldCharacterAndGroupFieldCharacters(TableCharacter table)
Returns a list of FieldCharacter and GroupFieldCharacter objects given a
table character object.
|
java.util.List<FieldCharacter> |
getFieldCharacters(TableCharacter table)
Returns a list of FieldCharacter objects given a table character object.
|
java.util.List<java.lang.Object> |
getFieldDelimitedAndGroupFieldDelimiteds(TableDelimited table)
Returns a list of FieldDelimited and GroupFieldDelimited objects given a
table delimited object.
|
java.util.List<FieldDelimited> |
getFieldDelimiteds(TableDelimited table)
Returns a list of FieldDelimited objects given a table delimited object.
|
java.util.List<GroupFieldDelimited> |
getGroupFieldDelimiteds(TableDelimited table)
Returns a list of GroupFieldDelimited objects given a table delimited object.
|
ProductObservational |
getObservationalProduct(java.lang.String relativeXmlFilePath)
Gets an instance of ProductObservational.
|
<T> T |
getProduct(java.io.File labelFile,
java.lang.Class<T> productClass)
Reads a product label of a specified class, and returns an instance of that class
as a result.
|
<T> T |
getProduct(java.net.URL label,
java.lang.Class<T> productClass)
Reads a product label of a specified class, and returns an instance of that class
as a result.
|
java.net.URL |
getRoot()
Gets the root file path of the object archive(s) for this ObjectProvider.
|
java.util.List<TableBinary> |
getTableBinaries(FileAreaObservational observationalFileArea)
Returns a list of TableBinary objects given an observation file area object.
|
java.util.List<TableCharacter> |
getTableCharacters(FileAreaObservational observationalFileArea)
Returns a list of TableCharacter objects given an observation file area object.
|
java.util.List<TableDelimited> |
getTableDelimiteds(FileAreaObservational observationalFileArea)
Returns a list of TableDelimited objects given an observation file area object.
|
java.util.List<java.lang.Object> |
getTableObjects(FileArea fileArea) |
java.util.List<java.lang.Object> |
getTableObjects(FileAreaBrowse browseFileArea) |
java.util.List<java.lang.Object> |
getTableObjects(FileAreaObservational observationalFileArea)
Returns a list of table objects.
|
java.util.List<java.lang.Object> |
getTableObjects(FileAreaObservationalSupplemental observationalFileAreaSupplemental)
Returns a list of table objects.
|
java.util.List<java.lang.Object> |
getTablesAndImages(FileArea fileArea) |
java.util.List<java.lang.Object> |
getTablesAndImages(FileAreaBrowse browseFileArea) |
java.util.List<java.lang.Object> |
getTablesAndImages(FileAreaObservational observationalFileArea) |
XMLLabelContext |
getXMLLabelContext() |
void |
setObservationalProduct(java.lang.String relativeXmlFilePath,
ProductObservational product)
Writes a label given the product XML file.
|
void |
setObservationalProduct(java.lang.String relativeXmlFilePath,
ProductObservational product,
XMLLabelContext labelContext)
Writes a label given the product XML file.
|
public ObjectAccess() throws java.net.MalformedURLException, java.net.URISyntaxException
java.net.URISyntaxException
java.net.MalformedURLException
public ObjectAccess(java.lang.String archiveRoot) throws java.net.MalformedURLException, java.net.URISyntaxException
ObjectAccess
object and sets the archive root path.archiveRoot
- the archive root pathjava.net.URISyntaxException
java.net.MalformedURLException
java.lang.Exception
public ObjectAccess(java.io.File archiveRoot) throws java.net.MalformedURLException, java.net.URISyntaxException
ObjectAccess
object and sets the archive root path.archiveRoot
- the archive root pathjava.net.URISyntaxException
java.net.MalformedURLException
java.lang.Exception
public ObjectAccess(java.net.URL archiveRoot) throws java.net.URISyntaxException, java.net.MalformedURLException
ObjectAccess
object and sets the archive root path.archiveRoot
- the archive root pathjava.net.URISyntaxException
java.net.MalformedURLException
public <T> T getProduct(java.io.File labelFile, java.lang.Class<T> productClass) throws ParseException
ObjectProvider
getProduct
in interface ObjectProvider
T
- the product object classlabelFile
- the file containing the XML labelproductClass
- the product object classParseException
- if there is an error parsing the labelpublic <T> T getProduct(java.net.URL label, java.lang.Class<T> productClass) throws ParseException
ObjectProvider
getProduct
in interface ObjectProvider
T
- the product object classlabel
- the url containing the XML labelproductClass
- the product object classParseException
- if there is an error parsing the labelpublic ProductObservational getObservationalProduct(java.lang.String relativeXmlFilePath)
ObjectProvider
getObservationalProduct
in interface ObjectProvider
relativeXmlFilePath
- the XML file path and name of the product to obtain, relative
to the ObjectAccess archive rootpublic void setObservationalProduct(java.lang.String relativeXmlFilePath, ProductObservational product) throws java.lang.Exception
ObjectProvider
setObservationalProduct
in interface ObjectProvider
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.java.lang.Exception
public void setObservationalProduct(java.lang.String relativeXmlFilePath, ProductObservational product, XMLLabelContext labelContext) throws java.lang.Exception
setObservationalProduct
in interface ObjectProvider
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.labelContext
- A context to use when creating the XML file. Can be set to null.java.lang.Exception
- If there was an error creating the XML file.public java.util.List<Array> getArrays(FileArea fileArea)
ObjectProvider
getArrays
in interface ObjectProvider
fileArea
- the file area.public java.util.List<Array> getArrays(FileAreaObservational fileArea)
ObjectProvider
getArrays
in interface ObjectProvider
fileArea
- the observational file area.public java.util.List<Array> getArrays(FileAreaBrowse fileArea)
ObjectProvider
getArrays
in interface ObjectProvider
fileArea
- the browse file areapublic java.util.List<Array2DImage> getArray2DImages(FileAreaObservational observationalFileArea)
ObjectProvider
getArray2DImages
in interface ObjectProvider
public java.util.List<Array3DImage> getArray3DImages(FileAreaObservational observationalFileArea)
ObjectProvider
getArray3DImages
in interface ObjectProvider
public java.util.List<Array3DSpectrum> getArray3DSpectrums(FileAreaObservational observationalFileArea)
ObjectProvider
getArray3DSpectrums
in interface ObjectProvider
public java.util.List<java.lang.Object> getTableObjects(FileAreaObservational observationalFileArea)
ObjectProvider
getTableObjects
in interface ObjectProvider
public java.util.List<java.lang.Object> getTableObjects(FileAreaBrowse browseFileArea)
getTableObjects
in interface ObjectProvider
public java.util.List<java.lang.Object> getTableObjects(FileArea fileArea)
getTableObjects
in interface ObjectProvider
public java.util.List<java.lang.Object> getTablesAndImages(FileArea fileArea)
getTablesAndImages
in interface ObjectProvider
public java.util.List<java.lang.Object> getTablesAndImages(FileAreaObservational observationalFileArea)
getTablesAndImages
in interface ObjectProvider
public java.util.List<java.lang.Object> getTablesAndImages(FileAreaBrowse browseFileArea)
getTablesAndImages
in interface ObjectProvider
public java.util.List<TableCharacter> getTableCharacters(FileAreaObservational observationalFileArea)
ObjectProvider
getTableCharacters
in interface ObjectProvider
public java.util.List<TableBinary> getTableBinaries(FileAreaObservational observationalFileArea)
ObjectProvider
getTableBinaries
in interface ObjectProvider
public java.util.List<TableDelimited> getTableDelimiteds(FileAreaObservational observationalFileArea)
ObjectProvider
getTableDelimiteds
in interface ObjectProvider
public java.util.List<FieldCharacter> getFieldCharacters(TableCharacter table)
ObjectProvider
getFieldCharacters
in interface ObjectProvider
table
- TableCharacter objectpublic java.util.List<FieldDelimited> getFieldDelimiteds(TableDelimited table)
ObjectProvider
getFieldDelimiteds
in interface ObjectProvider
table
- TableDelimited objectpublic java.util.List<GroupFieldDelimited> getGroupFieldDelimiteds(TableDelimited table)
ObjectProvider
getGroupFieldDelimiteds
in interface ObjectProvider
table
- TableDelimited objectpublic java.util.List<java.lang.Object> getFieldDelimitedAndGroupFieldDelimiteds(TableDelimited table)
ObjectProvider
getFieldDelimitedAndGroupFieldDelimiteds
in interface ObjectProvider
table
- TableDelimited objectpublic java.util.List<java.lang.Object> getFieldCharacterAndGroupFieldCharacters(TableCharacter table)
ObjectProvider
getFieldCharacterAndGroupFieldCharacters
in interface ObjectProvider
table
- TableCharacter objectpublic java.util.List<java.lang.Object> getFieldBinaryAndGroupFieldBinaries(TableBinary table)
ObjectProvider
getFieldBinaryAndGroupFieldBinaries
in interface ObjectProvider
table
- TableBinary objectpublic java.util.List<java.lang.Object> getTableObjects(FileAreaObservationalSupplemental observationalFileAreaSupplemental)
ObjectProvider
getTableObjects
in interface ObjectProvider
public java.util.List<FieldBinary> getFieldBinaries(TableBinary table)
ObjectProvider
getFieldBinaries
in interface ObjectProvider
table
- TableBinary objectpublic java.lang.String getArchiveRoot()
ObjectProvider
getArchiveRoot
in interface ObjectProvider
public java.net.URL getRoot()
ObjectProvider
getRoot
in interface ObjectProvider
public XMLLabelContext getXMLLabelContext()
Copyright © 2010-2018 Planetary Data System. All Rights Reserved.