Class ArchiveFile


  • public class ArchiveFile
    extends Object
    This class represents a file in the arcrepository which may be indexed by the indexer.
    • Constructor Detail

      • ArchiveFile

        public ArchiveFile()
        Constructor, creates a new instance in the unindexed state.
    • Method Detail

      • getOriginalIndexFileName

        public String getOriginalIndexFileName()
        Gets originalIndexFileName.
        Returns:
        the originalIndexFileName
      • setOriginalIndexFileName

        public void setOriginalIndexFileName​(String originalIndexFileName)
        Sets originalIndexFileName.
        Parameters:
        originalIndexFileName - The new original index filename
      • getIndexedDate

        public Date getIndexedDate()
        Returns indexedDate.
        Returns:
        the date indexed.
      • setIndexedDate

        public void setIndexedDate​(Date indexedDate)
        Sets indexedDate.
        Parameters:
        indexedDate - The new indexed date.
      • getFilename

        public String getFilename()
        The filename is used as a natural key because it is a fundamental property of the arcrepository that filenames are unique.
        Returns:
        the filename.
      • setFilename

        public void setFilename​(String filename)
        Sets the filename.
        Parameters:
        filename - The new filename
      • isIndexed

        public boolean isIndexed()
        Returns true if the file has been indexed.
        Returns:
        whether the file is indexed
      • setIndexed

        public void setIndexed​(boolean indexed)
        Sets whether the file has been indexed.
        Parameters:
        indexed - The new value of the isIndexed variable.
      • getIndexingFailedAttempts

        public int getIndexingFailedAttempts()
        Gets the number of failed indexing attempts.
        Returns:
        the number of failed attempts
      • setIndexingFailedAttempts

        public void setIndexingFailedAttempts​(int indexingFailedAttempts)
        Sets the number of failed indexing attempts.
        Parameters:
        indexingFailedAttempts - The number of failed indexing attempts
      • index

        public void index()
                   throws IllegalState
        Indexes this file by either running a hadoop job or a batch job, depending on settings.
        Throws:
        IllegalState - If the indexing has already been done.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object