Interface ObjectProvider

All Known Implementing Classes:
ObjectAccess

public interface ObjectProvider
Provides access to PDS4 objects.
  • 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

      List<Object> getDataObjects(Product product) throws ParseException
      Throws:
      ParseException
    • getArrays

      List<Array> getArrays(FileArea fileArea)
      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

      List<Array> getArrays(FileAreaObservational fileArea)
      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

      List<Array> getArrays(FileAreaBrowse fileArea)
      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

      List<Array2DImage> getArray2DImages(FileAreaObservational observationalFileArea)
      Returns a list of Array2DImage objects given an observation file area object.
      Parameters:
      observationalFileArea -
      Returns:
      a list of image objects
    • getArray3DImages

      List<Array3DImage> getArray3DImages(FileAreaObservational observationalFileArea)
      Returns a list of Array3DImage objects given an observation file area object.
      Parameters:
      observationalFileArea -
      Returns:
      a list of image objects
    • getArray3DSpectrums

      List<Array3DSpectrum> getArray3DSpectrums(FileAreaObservational observationalFileArea)
      Returns a list of Array3DSpectrum objects given an observation file area object.
      Parameters:
      observationalFileArea -
      Returns:
      a list of image objects
    • getTableObjects

      List<Object> getTableObjects(FileAreaObservational observationalFileArea)
      Returns a list of table objects.
      Parameters:
      observationalFileArea -
      Returns:
      a list of table objects
    • getTableObjects

      List<Object> getTableObjects(FileAreaBrowse browseFileArea)
    • getTableObjects

      List<Object> getTableObjects(FileAreaAncillary anciilaryFileArea)
    • getTableObjects

      List<Object> getTableObjects(FileAreaObservationalSupplemental observationalFileAreaSupplemental)
    • getTableObjects

      List<Object> getTableObjects(FileArea fileArea)
    • getTablesAndImages

      List<Object> getTablesAndImages(FileAreaObservational observationalFileArea)
    • getTablesAndImages

      List<Object> getTablesAndImages(FileAreaBrowse browseFileArea)
    • getTablesAndImages

      List<Object> getTablesAndImages(FileArea fileArea)
    • getHeaderObjects

      List<Object> getHeaderObjects(FileAreaObservational observationalFileArea)
      Returns a list of Header objects
      Parameters:
      observationalFileArea -
      Returns:
      a list of Header objects
    • getHeaderObjects

      List<Object> getHeaderObjects(FileAreaBrowse browseFileArea)
    • getHeaderObjects

      List<Object> getHeaderObjects(FileAreaAncillary anciilaryFileArea)
    • getHeaderObjects

      List<Object> getHeaderObjects(FileArea fileArea)
    • getTableCharacters

      List<TableCharacter> getTableCharacters(FileAreaObservational observationalFileArea)
      Returns a list of TableCharacter objects given an observation file area object.
      Parameters:
      observationalFileArea -
      Returns:
      list of TableCharacter objects
    • getTableBinaries

      List<TableBinary> getTableBinaries(FileAreaObservational observationalFileArea)
      Returns a list of TableBinary objects given an observation file area object.
      Parameters:
      observationalFileArea -
      Returns:
      list of TableBinary objects
    • getTableDelimiteds

      List<TableDelimited> getTableDelimiteds(FileAreaObservational observationalFileArea)
      Returns a list of TableDelimited objects given an observation file area object.
      Parameters:
      observationalFileArea -
      Returns:
      list of TableDelimited objects
    • getFieldCharacters

      List<FieldCharacter> getFieldCharacters(TableCharacter table)
      Returns a list of FieldCharacter objects given a table character object.
      Parameters:
      table - TableCharacter object
      Returns:
      list of FieldCharacter objects
    • getFieldBinaries

      List<FieldBinary> getFieldBinaries(TableBinary table)
      Returns a list of FieldBinary objects given a table binary object.
      Parameters:
      table - TableBinary object
      Returns:
      list of FieldBinary objects
    • getFieldDelimiteds

      List<FieldDelimited> getFieldDelimiteds(TableDelimited table)
      Returns a list of FieldDelimited objects given a table delimited object.
      Parameters:
      table - TableDelimited object
      Returns:
      list of FieldDelimited objects
    • getGroupFieldDelimiteds

      List<GroupFieldDelimited> getGroupFieldDelimiteds(TableDelimited table)
      Returns a list of GroupFieldDelimited objects given a table delimited object.
      Parameters:
      table - TableDelimited object
      Returns:
      list of GroupFieldDelimited objects
    • getFieldDelimitedAndGroupFieldDelimiteds

      List<Object> getFieldDelimitedAndGroupFieldDelimiteds(TableDelimited table)
      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

      List<Object> getFieldCharacterAndGroupFieldCharacters(TableCharacter table)
      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

      List<Object> getFieldBinaryAndGroupFieldBinaries(TableBinary table)
      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

      ProductObservational getObservationalProduct(String relativeXmlFilePath)
      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

      <T> T getProduct(File labelFile, Class<T> productClass) throws ParseException
      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 label
      productClass - the product object class
      Returns:
      an instance of the product object
      Throws:
      ParseException - if there is an error parsing the label
    • getProduct

      <T> T getProduct(URL label, Class<T> productClass) throws ParseException
      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 label
      productClass - 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 root
      product - 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

      long getOffset(Object obj) throws Exception
      Throws:
      Exception
    • getObjectLength

      long getObjectLength(Object obj) throws Exception
      Throws:
      Exception