Class Topic

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

@Entity public class Topic extends AbstractEntity implements Searchable
The domain class Topic represents a topic in the Catalogue.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The class TopicTexts contains the language specific texts for a topic.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The method getDescription provides means to retrieve the description of a topic in a given language.
    The method getTitle provides means to retrieve the title in a given language.
    The method getTopicTexts provides means to retrieve the text of a topic in a given language.
    The method indexPath provides means to retrieve the URL under which the entity is indexed.
    com.google.common.collect.ImmutableMap<String,Object>
    The method toMap provides means to get the instance as an immutable Map.
    com.google.common.collect.ImmutableMap<String,Object>
    toMap(String locale)
    The method toMap provides means to get the instance as an immutable Map.
    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, toString, wait, wait, wait

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

    getId
  • Constructor Details

    • Topic

      public Topic()
  • Method Details

    • getDescription

      public String getDescription(String lang)
      The method getDescription provides means to retrieve the description of a topic in a given language.
      Parameters:
      lang - the two-letter language code
      Returns:
      the description or the empty string
    • getTitle

      public String getTitle(String lang)
      The method getTitle provides means to retrieve the title in a given language.
      Parameters:
      lang - the two-letter language code
      Returns:
      the title or the empty string
    • getTopicTexts

      public Topic.TopicTexts getTopicTexts(String lang)
      The method getTopicTexts provides means to retrieve the text of a topic in a given language.
      Parameters:
      lang - the two-letter language code
      Returns:
      the detail
    • 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:
    • toMap

      public com.google.common.collect.ImmutableMap<String,Object> toMap()
      The method toMap provides means to get the instance as an immutable Map.
      Returns:
      the Map
    • toMap

      public com.google.common.collect.ImmutableMap<String,Object> toMap(String locale)
      The method toMap provides means to get the instance as an immutable Map.
      Parameters:
      locale - the language code
      Returns:
      the Map
    • 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: