Package org.ctan.site.domain.catalogue
Class Pkg
java.lang.Object
org.ctan.site.domain.AbstractEntity
org.ctan.site.domain.catalogue.Pkg
- All Implemented Interfaces:
Searchable
The domain class
Pkg contains the description of a package in
the Catalogue.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe classPkgTextscontains the localised texts. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCaption(String locale) The methodgetCaptionprovides means to retrieve the caption text for the given language.getCaption(String locale, String fallback) The methodgetCaptionprovides means to retrieve the caption text for the given language or the fallback language.getDescription(String locale) The methodgetDescriptionprovides means to retrieve the description text for the given language.getDescription(String locale, String fallback) The methodgetDescriptionprovides means to retrieve the description text for the given language or the fallback language.getVers()The methodgetVersprovides means to retrieve the combined fields versionNumber and versionDate.The methodindexPathprovides means to retrieve the URL under which the entity is indexed.booleanThe methodisObsoleteprovides means to retrieve the information about the obsolete state.booleanThe methodisOrphantedprovides means to determine whether the package is orphaned.toMap()The methodtoMapprovides means to translate the instance into a Map.The methodtopicsAsStringprovides means to retrieve the topic keys.toString()voidupdateIndex(IndexingSession session, String locale) The methodupdateIndexprovides 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, waitMethods inherited from interface org.ctan.site.services.search.base.Searchable
getId
-
Constructor Details
-
Pkg
public Pkg()
-
-
Method Details
-
getCaption
The methodgetCaptionprovides means to retrieve the caption text for the given language.- Parameters:
locale- the current language- Returns:
- the caption or
null
-
getCaption
The methodgetCaptionprovides means to retrieve the caption text for the given language or the fallback language.- Parameters:
locale- the current languagefallback- the fallback language- Returns:
- the caption or
null
-
getDescription
The methodgetDescriptionprovides means to retrieve the description text for the given language.- Parameters:
locale- the current language- Returns:
- the description or
null
-
getDescription
The methodgetDescriptionprovides means to retrieve the description text for the given language or the fallback language.- Parameters:
locale- the current languagefallback- the fallback language- Returns:
- the description or
null
-
getVers
The methodgetVersprovides 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
The methodindexPathprovides means to retrieve the URL under which the entity is indexed.- Specified by:
indexPathin interfaceSearchable- Returns:
- the URL
- See Also:
-
isObsolete
public boolean isObsolete()The methodisObsoleteprovides means to retrieve the information about the obsolete state.- Returns:
trueiff the package is obsolete
-
isOrphaned
public boolean isOrphaned()The methodisOrphantedprovides 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
The methodtoMapprovides means to translate the instance into a Map.- Returns:
- the key-value map for the author
-
topicsAsString
The methodtopicsAsStringprovides means to retrieve the topic keys.- Returns:
- the topic keys concatenated with "; "
-
toString
-
updateIndex
public void updateIndex(IndexingSession session, String locale) throws org.apache.lucene.index.CorruptIndexException, IOException The methodupdateIndexprovides means to update the entity in the search index.- Specified by:
updateIndexin interfaceSearchable- Parameters:
session- the sessionlocale- the two-letter locale name- Throws:
org.apache.lucene.index.CorruptIndexException- in case of an errorIOException- in case of an I/O error- See Also:
-