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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCaption
(String... languages) Getter for a caption in a given language.getDescription
(String... languages) Getter for a description in a given language.getVers()
The methodgetVers
provides means to retrieve the combined fields versionNumber and versionDate.The methodindexPath
provides means to retrieve the directory containing the index files.boolean
The methodisObsolete
provides means to retrieve the information about the obsolete state.boolean
The methodisOrphanted
provides means to determine whether the package is orphaned.void
remove
(IndexingSession session) The methodremove
provides means to remove the entity from the search index.The methodtopicsAsString
provides means to retrieve the topic keys.toString()
void
updateIndex
(IndexingSession session) The methodupdateIndex
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
Getter for a caption in a given language.- Parameters:
languages
- the accepted languages in descending order- Returns:
- the caption for the given language or the empty string
-
getDescription
Getter for a description in a given language.- Parameters:
languages
- the languages- Returns:
- the description for the given language or the empty string
-
getVers
The methodgetVers
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
The methodindexPath
provides means to retrieve the directory containing the index files.- Specified by:
indexPath
in interfaceSearchable
- Returns:
- the index directory
- See Also:
-
isObsolete
public boolean isObsolete()The methodisObsolete
provides means to retrieve the information about the obsolete state.- Returns:
true
iff the package is obsolete
-
isOrphaned
public boolean isOrphaned()The methodisOrphanted
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
The methodremove
provides means to remove the entity from the search index.- Specified by:
remove
in interfaceSearchable
- Parameters:
session
- the session- Throws:
IOException
- in case of an I/O error- See Also:
-
topicsAsString
The methodtopicsAsString
provides means to retrieve the topic keys.- Returns:
- the topic keys concatenated with "; "
-
toString
-
updateIndex
public void updateIndex(IndexingSession session) throws org.apache.lucene.index.CorruptIndexException, IOException The methodupdateIndex
provides means to update the entity in the search index.- Specified by:
updateIndex
in interfaceSearchable
- Parameters:
session
- the session- Throws:
org.apache.lucene.index.CorruptIndexException
- in case of an errorIOException
- in case of an I/O error- See Also:
-