Class AbstractDataRasterReader

    • Field Detail

      • description

        protected final java.lang.String description
      • mimeTypes

        protected final java.lang.String[] mimeTypes
      • suffixes

        protected final java.lang.String[] suffixes
    • Constructor Detail

      • AbstractDataRasterReader

        public AbstractDataRasterReader​(java.lang.String description,
                                        java.lang.String[] mimeTypes,
                                        java.lang.String[] suffixes)
      • AbstractDataRasterReader

        public AbstractDataRasterReader​(java.lang.String[] mimeTypes,
                                        java.lang.String[] suffixes)
      • AbstractDataRasterReader

        protected AbstractDataRasterReader​(java.lang.String description)
    • Method Detail

      • doCanRead

        protected abstract boolean doCanRead​(java.lang.Object source,
                                             AVList params)
      • doRead

        protected abstract DataRaster[] doRead​(java.lang.Object source,
                                               AVList params)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • doReadMetadata

        protected abstract void doReadMetadata​(java.lang.Object source,
                                               AVList params)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getMimeTypes

        public java.lang.String[] getMimeTypes()
      • canRead

        public boolean canRead​(java.lang.Object source,
                               AVList params)
        Indicates whether this reader can read a specified data source. The source may be one of the following:
        • File
        • String
        • InputStream
        • URL
        Specified by:
        canRead in interface DataRasterReader
        Parameters:
        source - the source to examine.
        params - parameters required by certain reader implementations. May be null for most readers.
        Returns:
        true if this reader can read the data source, otherwise false.
      • canReadSuffix

        protected boolean canReadSuffix​(java.lang.Object source)
      • read

        public DataRaster[] read​(java.lang.Object source,
                                 AVList params)
                          throws java.io.IOException
        Reads and returns the DataRaster instances from a data source. The source may be one of the following: The source may be one of the following:
        • File
        • String
        • InputStream
        • URL
        Specified by:
        read in interface DataRasterReader
        Parameters:
        source - the source to read.
        params - parameters required by certain reader implementations. May be null for most readers. If non-null, the metadata is added to this list, and the list reference is the return value of this method.
        Returns:
        the list of metadata read from the data source. The list is empty if the data source has no metadata.
        Throws:
        java.io.IOException - if an IO error occurs.
      • readMetadata

        public AVList readMetadata​(java.lang.Object source,
                                   AVList params)
                            throws java.io.IOException
        Reads and returns the metadata from a data source. The source may be one of the following:
        • File
        • String
        • InputStream
        • URL
        TODO: Why would the caller specify parameters to this method?
        Specified by:
        readMetadata in interface DataRasterReader
        Parameters:
        source - the source to examine.
        params - parameters required by certain reader implementations. May be null for most readers. If non-null, the metadata is added to this list, and the list reference is the return value of this method.
        Returns:
        the list of metadata read from the data source. The list is empty if the data source has no metadata.
        Throws:
        java.io.IOException - if an IO error occurs.
      • validateMetadata

        protected java.lang.String validateMetadata​(java.lang.Object source,
                                                    AVList params)
      • isImageryRaster

        public boolean isImageryRaster​(java.lang.Object source,
                                       AVList params)
        Indicates whether a data source is imagery. TODO: Identify when parameters must be passed. The source may be one of the following:
        • File
        • String
        • InputStream
        • URL
        Specified by:
        isImageryRaster in interface DataRasterReader
        Parameters:
        source - the source to examine.
        params - parameters required by certain reader implementations. May be null for most readers.
        Returns:
        true if the source is imagery, otherwise false.
      • isElevationsRaster

        public boolean isElevationsRaster​(java.lang.Object source,
                                          AVList params)
        Indicates whether a data source is elevation data. TODO: Identify when parameters must be passed. The source may be one of the following:
        • File
        • String
        • InputStream
        • URL
        Specified by:
        isElevationsRaster in interface DataRasterReader
        Parameters:
        source - the source to examine.
        params - parameters required by certain reader implementations. May be null for most readers. TODO: Identify when parameters must be passed.
        Returns:
        true if the source is elevation data, otherwise false.