Class IndexEntry

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    FullIndexEntry, MatchingIndexEntry

    public class IndexEntry
    extends Object
    implements Serializable
    IndexEntry is the base class for all the entries which are indexed in the Silverpeas indexes. An IndexEntry is created by a Silverpeas component when it creates a new element or document. This IndexEntry will be returned later when the document matches a query.
    See Also:
    Serialized Form
    • Constructor Detail

      • IndexEntry

        public IndexEntry​(String component,
                          String objectType,
                          String objectId)
      • IndexEntry

        public IndexEntry​(IndexEntryKey pk)
        The constructor only set the key part of the IndexEntry.
    • Method Detail

      • toString

        public String toString()
        Returns as a string the key part of the indexEntry. the key part of the IndexEntry
        Overrides:
        toString in class Object
      • getPK

        public IndexEntryKey getPK()
        Return the key part of the IndexEntry
      • getComponent

        public String getComponent()
        Return the name of the component's instance which handles the object.
      • getObjectType

        public String getObjectType()
        Return the type of the indexed document. The meaning of this type is uniquely determined by the component handling the object.
      • getObjectId

        public String getObjectId()
        Return the object id.
      • setTitle

        public void setTitle​(String title)
        Set the title of the index entry as it will be displayed to the user if the indexed document match his query.
      • setTitle

        public void setTitle​(String title,
                             String lang)
      • getTitle

        public String getTitle()
        Return the title of the index entry as it will be displayed to the user if the indexed document match his query.
      • setKeywords

        public void setKeywords​(String keywords)
        Set key words for the index entry.
      • setKeywords

        public void setKeywords​(String keywords,
                                String lang)
      • getKeywords

        public String getKeywords()
        Return the key words of the index entry.
      • setPreview

        public void setPreview​(String preview)
        Set a pre-view text for the index entry as it will be displayed at the user when the document will be retrieved.
      • setPreview

        public void setPreview​(String preview,
                               String lang)
      • getPreview

        public String getPreview()
        Return the pre-view text for the index entry as it will be displayed at the user when the document will be retrieved.
      • setLang

        public void setLang​(String lang)
        Set the language of the indexed document.
      • getLang

        public String getLang()
        Return the language of the indexed document.
      • setCreationDate

        public void setCreationDate​(Date creationDate)
        Set the creation time of the indexed document.
      • setCreationDate

        public void setCreationDate​(LocalDate creationDate)
        Set the creation time of the indexed document.
      • getCreationDate

        public String getCreationDate()
        Return the creation time of the indexed document.
      • setCreationUser

        public void setCreationUser​(String creationUser)
        Set the author of the indexed document. This is the full name of the user (and not his login or user_id).
      • getCreationUser

        public String getCreationUser()
        Return the author of the indexed document. This is the full name of the user (and not his login or user_id).
      • setStartDate

        public void setStartDate​(Date date)
        Set the start date from which the document will be displayed.
      • setStartDate

        public void setStartDate​(LocalDate date)
      • getStartDate

        public String getStartDate()
        Get the start date from which the document will be displayed. Returns 0000/00/00 if the start date is not set.
      • setEndDate

        public void setEndDate​(Date date)
        Set the end date until which the document will be displayed.
      • setEndDate

        public void setEndDate​(LocalDate date)
      • getEndDate

        public String getEndDate()
        Get the end date until which the document will be displayed. Returns 9999/99/99 if the end date is not set.
      • equals

        public boolean equals​(Object o)
        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 Object
      • hashCode

        public int hashCode()
        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 Object
      • getThumbnail

        public String getThumbnail()
      • setThumbnail

        public void setThumbnail​(String thumbnail)
      • getThumbnailDirectory

        public String getThumbnailDirectory()
      • setThumbnailDirectory

        public void setThumbnailDirectory​(String thumbnailDirectory)
      • getThumbnailMimeType

        public String getThumbnailMimeType()
      • setThumbnailMimeType

        public void setThumbnailMimeType​(String thumbnailMimeType)
      • isIndexId

        public boolean isIndexId()
      • setIndexId

        public void setIndexId​(boolean indexId)
      • getLastModificationDate

        public String getLastModificationDate()
      • setLastModificationDate

        public void setLastModificationDate​(Date lastModificationDate)
      • setLastModificationDate

        public void setLastModificationDate​(LocalDate lastModificationDate)
      • getLastModificationUser

        public String getLastModificationUser()
      • setLastModificationUser

        public void setLastModificationUser​(String lastModificationUser)
      • getServerName

        public String getServerName()
        Returns:
        the serverName in order to distinguish each server for external server research
      • setServerName

        public void setServerName​(String serverName)
        Parameters:
        serverName - the serverName to set
      • setFilename

        public void setFilename​(String filename)
      • getFilename

        public String getFilename()
      • setPaths

        public void setPaths​(List<String> paths)
      • isAlias

        public boolean isAlias()
      • setAlias

        public void setAlias​(boolean alias)