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.
  • Constructor Details

    • Pkg

      public Pkg()
  • Method Details

    • getCaption

      public PkgCaption getCaption(String... languages)
      Getter for a caption in a given language.
      Parameters:
      languages - the accepted languages in descending order
      Returns:
      the caption for the given language or null
    • getDescription

      public PkgDescription getDescription(String... languages)
      Getter for a description in a given language.
      Parameters:
      languages - the languages
      Returns:
      the description for the given language 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 directory containing the index files.
      Specified by:
      indexPath in interface Searchable
      Returns:
      the index directory
      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
    • remove

      public void remove(IndexingSession session) throws IOException
      The method remove provides means to remove the entity from the search index.
      Specified by:
      remove in interface Searchable
      Parameters:
      session - the session
      Throws:
      IOException - in case of an I/O error
      See Also:
    • 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) 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
      Throws:
      org.apache.lucene.index.CorruptIndexException - in case of an error
      IOException - in case of an I/O error
      See Also: