Class X3iData

  • All Implemented Interfaces:
    FovData

    public class X3iData
    extends Object
    implements FovData
    Class for representing the data and metadata contained in FOVi data (X3I files).
    • Constructor Detail

      • X3iData

        protected X3iData()
        Protected constructor. Instances of this class are not to be created directly, but will be created by a parser.
      • X3iData

        protected X3iData​(boolean readingFirstFOVbOnly)
        Constructor for unit tests.
        Parameters:
        readingFirstFOVbOnly - if true, only the first entry should be read
    • Method Detail

      • getDataSize

        public long getDataSize()
        Description copied from interface: FovData
        Returns the size of the data source in bytes. If this data structure is created by a recovery parser, and the full FOV[b|i] data is present plus some unneccessary data appended, this value will indicate the size of the FOV[b|i] data. That is it may e.g. be smaller than the size of the file it is read from. In case of an error -1 might be returned.
        Specified by:
        getDataSize in interface FovData
        Returns:
        the size of the FOV[b|i] data in bytes
      • getDirectoryPointerLocation

        public long getDirectoryPointerLocation()
        Description copied from interface: FovData
        Returns the file offset in bytes from the beginning of the file where the FOV[b|i] directory pointer is located or -1, if it could not be found.
        Specified by:
        getDirectoryPointerLocation in interface FovData
        Returns:
        the file offset where the FOV[b|i] directory pointer is located
      • getDirectoryPointerValue

        public long getDirectoryPointerValue()
        Description copied from interface: FovData
        Returns the value of the FOV[b|i] directory pointer. That is the offset in bytes from the beginning of the file of the FOV[b|i] directory section.
        Specified by:
        getDirectoryPointerValue in interface FovData
        Returns:
        the value of the FOV[b|i] directory pointer
      • isParsedSuccessfully

        public boolean isParsedSuccessfully()
        Description copied from interface: FovData
        Returns true, if the parser could read the FOV[b|i] data without problems. That is, the FOV[b|i] header and FOV[b|i] directory could be parsed according to the specification without an error occuring.
        Specified by:
        isParsedSuccessfully in interface FovData
        Returns:
        true, if the parser could read the FOV[b|i] data successfully
      • isRecoverable

        public boolean isRecoverable()
        Description copied from interface: FovData
        Returns true, if a possibly corrupted file is recoverable.
        Specified by:
        isRecoverable in interface FovData
        Returns:
        true, if a possibly corrupted file is recoverable
      • isRecoveryMode

        public boolean isRecoveryMode()
        Description copied from interface: FovData
        Returns true, if a recovery parser was used, and not the standard parser.
        Specified by:
        isRecoveryMode in interface FovData
        Returns:
        true, if a recovery parser was used
      • isReadingFirstFOVbOnly

        public boolean isReadingFirstFOVbOnly()
        Returns true, if only the first FOVb entry was read. If true, getListEmbeddedX3f() will return a list with at most one element, while getNumEmbeddedX3f() will return the real number of embedded FOVb items.
        Returns:
        true, if only the first FOVb entry was read
      • getNumEmbeddedX3f

        public int getNumEmbeddedX3f()
        Returns the number of FOVb entries (that is the number of directory entries of type "FRAM") independantly of the value of isReadingFirstFOVbOnly().
        Returns:
        the number of FOVb entries
      • getListEmbeddedX3f

        public List<X3fData> getListEmbeddedX3f()
        Returns a list of data structures describing the embedded FOVb data.
        Returns:
        a list of data structures describing the embedded FOVb data
      • isLastX3fDamaged

        public boolean isLastX3fDamaged()
        Returns true, if the last element in getListEmbeddedX3f() was created by an X3F recovery parser, false, if it was created by an X3F standard parser.
        Returns:
        true, if the last X3fData element is damaged