Class Pkg

java.lang.Object
org.ctan.site.domain.AbstractEntity
org.ctan.site.domain.catalogue.Pkg
All Implemented Interfaces:
Searchable

@Entity public class Pkg extends AbstractEntity implements Searchable
The domain class Pkg contains the description of a package in the Catalogue.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The class PkgTexts contains the localised texts.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pkg()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The method getCaption provides means to retrieve the caption text for the given language.
    getCaption(String locale, String fallback)
    The method getCaption provides means to retrieve the caption text for the given language or the fallback language.
    The method getDescription provides means to retrieve the description text for the given language.
    getDescription(String locale, String fallback)
    The method getDescription provides means to retrieve the description text for the given language or the fallback language.
    The method getVers provides means to retrieve the combined fields versionNumber and versionDate.
    The method indexPath provides means to retrieve the URL under which the entity is indexed.
    boolean
    The method isObsolete provides means to retrieve the information about the obsolete state.
    boolean
    The method isOrphanted provides means to determine whether the package is orphaned.
    The method toMap provides means to translate the instance into a Map.
    The method topicsAsString provides means to retrieve the topic keys.
    void
    The method updateIndex provides means to update the entity in the search index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.ctan.site.services.search.base.Searchable

    getId
  • Constructor Details

    • Pkg

      public Pkg()
  • Method Details

    • getCaption

      public String getCaption(String locale)
      The method getCaption provides means to retrieve the caption text for the given language.
      Parameters:
      locale - the current language
      Returns:
      the caption or null
    • getCaption

      public String getCaption(String locale, String fallback)
      The method getCaption provides means to retrieve the caption text for the given language or the fallback language.
      Parameters:
      locale - the current language
      fallback - the fallback language
      Returns:
      the caption or null
    • getDescription

      public String getDescription(String locale)
      The method getDescription provides means to retrieve the description text for the given language.
      Parameters:
      locale - the current language
      Returns:
      the description or null
    • getDescription

      public String getDescription(String locale, String fallback)
      The method getDescription provides means to retrieve the description text for the given language or the fallback language.
      Parameters:
      locale - the current language
      fallback - the fallback language
      Returns:
      the description or null
    • getVers

      public String getVers()
      The method getVers provides means to retrieve the combined fields versionNumber and versionDate. The fields are combined with a separating space if both are defined. Otherwise only one field is returned.
      Returns:
      the joined fields
    • indexPath

      public String indexPath()
      The method indexPath provides means to retrieve the URL under which the entity is indexed.
      Specified by:
      indexPath in interface Searchable
      Returns:
      the URL
      See Also:
    • isObsolete

      public boolean isObsolete()
      The method isObsolete provides means to retrieve the information about the obsolete state.
      Returns:
      true iff the package is obsolete
    • isOrphaned

      public boolean isOrphaned()
      The method isOrphanted provides means to determine whether the package is orphaned. This is the case if there is no author which is marked as active and who is not marked as dead.
      Returns:
      the indicator for orphaned packages
    • toMap

      public Map<String,Object> toMap()
      The method toMap provides means to translate the instance into a Map.
      Returns:
      the key-value map for the author
    • topicsAsString

      public String topicsAsString()
      The method topicsAsString provides means to retrieve the topic keys.
      Returns:
      the topic keys concatenated with "; "
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • updateIndex

      public void updateIndex(IndexingSession session, String locale) throws org.apache.lucene.index.CorruptIndexException, IOException
      The method updateIndex provides means to update the entity in the search index.
      Specified by:
      updateIndex in interface Searchable
      Parameters:
      session - the session
      locale - the two-letter locale name
      Throws:
      org.apache.lucene.index.CorruptIndexException - in case of an error
      IOException - in case of an I/O error
      See Also: