Class FullIndexEntry

  • All Implemented Interfaces:
    Serializable

    public class FullIndexEntry
    extends IndexEntry
    implements Serializable
    A FullIndexEntry is an IndexEntry completed with data useful uniquely at the index creation time (mainly all the data contents which must be indexed but which is useless at retrieve time). This extra-content is indexed but not stored in the index.
    See Also:
    Serialized Form
    • Constructor Detail

    • Method Detail

      • addTextContent

        public void addTextContent​(String text)
        Add a text fragment to be indexed. All this text fragments will be indexed but not stored in the index. They may be added in any order.
      • addTextContent

        public void addTextContent​(String text,
                                   String language)
      • addFileContent

        public void addFileContent​(String path,
                                   String encoding,
                                   String format,
                                   String lang)
        Add a file to be indexed. We need :
        • the path to the file
        • the encoding of the file
        • the format of the file
        • the language of the file
        All this files will be parsed and then indexed but not stored in the index. They may be added in any order.
      • addLinkedFileId

        public void addLinkedFileId​(String fileId)
        Add a linked file id to be indexed. We need :
        • the file id
      • addLinkedFileContent

        public void addLinkedFileContent​(String path,
                                         String encoding,
                                         String format,
                                         String lang)
        Add a linked file to be indexed. We need :
        • the path to the file
        • the encoding of the file
        • the format of the file
        • the language of the file
        All this files will be parsed and then indexed but not stored in the index. They may be added in any order.
      • addField

        public void addField​(String fieldName,
                             String value)
      • addField

        public void addField​(String fieldName,
                             String value,
                             String language,
                             boolean stored)
      • addField

        public void addField​(String fieldName,
                             Date value)
      • addField

        public void addField​(String fieldName,
                             Date value,
                             String language)
      • getTextContentList

        public List<TextDescription> getTextContentList()
        Return the List of all the added texts. The returned List is a list of String.
      • getFileContentList

        public List<FileDescription> getFileContentList()
        Return the List of all the added files. The returned List is a list of FileDescription.
      • getLinkedFileContentList

        public List<FileDescription> getLinkedFileContentList()
        Return the List of all the linked files. The returned List is a list of FileDescription.
      • getLinkedFileIdsSet

        public Set<String> getLinkedFileIdsSet()
      • equals

        public boolean equals​(Object o)
        Description copied from class: IndexEntry
        To be equal two IndexEntry must have the same PK. The equals method is redefined so IndexEntry objects can be put in a Set or used as Map key.
        Overrides:
        equals in class IndexEntry
      • hashCode

        public int hashCode()
        Description copied from class: IndexEntry
        Returns the hash code of the indexEntry. The hashCode method is redefined so IndexEntry objects can be put in a Set or used as Map key. Only the primary key is used to compute the hash code, as only the primary key is used to compare two entries.
        Overrides:
        hashCode in class IndexEntry