Interface ObjectProvider

  • All Known Implementing Classes:
    ObjectAccess

    public interface ObjectProvider
    Provides access to PDS4 objects.
    • Method Detail

      • getArchiveRoot

        java.lang.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

        java.net.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
      • getArrays

        java.util.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

        java.util.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

        java.util.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

        java.util.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

        java.util.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

        java.util.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

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

        java.util.List<java.lang.Object> getTableObjects​(FileAreaBrowse browseFileArea)
      • getTableObjects

        java.util.List<java.lang.Object> getTableObjects​(FileAreaAncillary anciilaryFileArea)
      • getTableObjects

        java.util.List<java.lang.Object> getTableObjects​(FileArea fileArea)
      • getTablesAndImages

        java.util.List<java.lang.Object> getTablesAndImages​(FileAreaObservational observationalFileArea)
      • getTablesAndImages

        java.util.List<java.lang.Object> getTablesAndImages​(FileAreaBrowse browseFileArea)
      • getTablesAndImages

        java.util.List<java.lang.Object> getTablesAndImages​(FileArea fileArea)
      • getHeaderObjects

        java.util.List<java.lang.Object> getHeaderObjects​(FileAreaObservational observationalFileArea)
        Returns a list of Header objects
        Parameters:
        observationalFileArea -
        Returns:
        a list of Header objects
      • getHeaderObjects

        java.util.List<java.lang.Object> getHeaderObjects​(FileAreaBrowse browseFileArea)
      • getHeaderObjects

        java.util.List<java.lang.Object> getHeaderObjects​(FileAreaAncillary anciilaryFileArea)
      • getHeaderObjects

        java.util.List<java.lang.Object> getHeaderObjects​(FileArea fileArea)
      • getTableCharacters

        java.util.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

        java.util.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

        java.util.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

        java.util.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

        java.util.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

        java.util.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

        java.util.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

        java.util.List<java.lang.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

        java.util.List<java.lang.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

        java.util.List<java.lang.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​(java.lang.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​(java.io.File labelFile,
                         java.lang.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​(java.net.URL label,
                         java.lang.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​(java.lang.String relativeXmlFilePath,
                                     ProductObservational product)
                              throws java.lang.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:
        java.lang.Exception
      • setObservationalProduct

        void setObservationalProduct​(java.lang.String relativeXmlFilePath,
                                     ProductObservational product,
                                     XMLLabelContext context)
                              throws java.lang.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:
        java.lang.Exception - If there was an error creating the XML file.
      • getOffset

        long getOffset​(java.lang.Object obj)
                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getObjectLength

        long getObjectLength​(java.lang.Object obj)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception