Package io.goobi.viewer.model.toc
Class TOC
java.lang.Object
io.goobi.viewer.model.toc.TOC
- All Implemented Interfaces:
Serializable
Table of contents and associated functionality for a record.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildTree
(String group, int visibleLevel, int collapseThreshold, int lowestLevelToCollapse, Long currentElementIdDoc) void
collapseAll.void
expandAll.int
findTocElementIndexByIddoc
(String iddoc) void
generate
(StructElement structElement, boolean addAllSiblings, String mimeType, int tocCurrentPage) generate.Recalculates the visibility of TOC elements after a +/- button has been pressed.int
Getter for the fieldcurrentPage
.getFlatView.getGroupNames.Returns the label of the first found TOCElement that has the given PI as its topStructPi.Returns the label in the given language of the first found TOCElement that has the given PI as its topStructPi.Returns the label in the given locale of the first found TOCElement that has the given PI as its topStructPi.int
Getter for the fieldmaxTocDepth
.int
Returns the number of paginator pages for the given TOC size and elements per page.getTocElements.int
Getter for the fieldtocInvisible
.int
Getter for the fieldtocVisible
.int
Getter for the fieldtotalTocSize
.getTreeView.getTreeViewForGroup
(String group) getTreeViewForGroup.Deprecated.getViewForGroup
(String group) getViewForGroup.boolean
hasChildren.void
setChildInvisible
(int id) setChildInvisible.void
setChildVisible
(int id) setChildVisible.void
setCurrentPage
(int currentPage) Setter for the fieldcurrentPage
.void
setMaxTocDepth
(int maxTocDepth) Setter for the fieldmaxTocDepth
.void
setTocInvisible
(int tocInvisible) Setter for the fieldtocInvisible
.void
setTocVisible
(int tocVisible) Setter for the fieldtocVisible
.void
setTotalTocSize
(int totalTocSize) Setter for the fieldtotalTocSize
.
-
Constructor Details
-
TOC
public TOC()Constructor for TOC.
-
-
Method Details
-
generate
public void generate(StructElement structElement, boolean addAllSiblings, String mimeType, int tocCurrentPage) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException generate.
- Parameters:
structElement
- aStructElement
object.addAllSiblings
- a boolean.mimeType
- aString
object.tocCurrentPage
- a int.- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
getGroupNames
getGroupNames.
- Returns:
- a
List
object.
-
getViewForGroup
getViewForGroup.
-
getTreeViewForGroup
getTreeViewForGroup.
-
getFlatView
getFlatView.
- Returns:
- a
List
object.
-
getTreeView
getTreeView.
- Returns:
- a
List
object.
-
getTreeViewSidebar
Deprecated.getTreeViewSidebar.
- Returns:
- a
List
object.
-
buildTree
protected void buildTree(String group, int visibleLevel, int collapseThreshold, int lowestLevelToCollapse, Long currentElementIdDoc) - Parameters:
group
-visibleLevel
-collapseThreshold
-lowestLevelToCollapse
-currentElementIdDoc
-
-
getActiveElement
Recalculates the visibility of TOC elements after a +/- button has been pressed.- Returns:
- a
TOCElement
object.
-
expandAll
public void expandAll()expandAll.
-
collapseAll
public void collapseAll()collapseAll.
-
setChildVisible
public void setChildVisible(int id) setChildVisible.
- Parameters:
id
- a int.
-
setChildInvisible
public void setChildInvisible(int id) setChildInvisible.
- Parameters:
id
- a int.
-
getTocElements
getTocElements.
- Returns:
- a
List
object.
-
findTocElementIndexByIddoc
- Parameters:
iddoc
- IDDOC of the element to find- Returns:
- Index of the element with the matching IDDOC within the list of elements; -1 if none found
-
getTocVisible
public int getTocVisible()Getter for the field
tocVisible
.- Returns:
- the tocVisible
-
setTocVisible
public void setTocVisible(int tocVisible) Setter for the field
tocVisible
.- Parameters:
tocVisible
- the tocVisible to set
-
getTocInvisible
public int getTocInvisible()Getter for the field
tocInvisible
.- Returns:
- the tocInvisible
-
setTocInvisible
public void setTocInvisible(int tocInvisible) Setter for the field
tocInvisible
.- Parameters:
tocInvisible
- the tocInvisible to set
-
getMaxTocDepth
public int getMaxTocDepth()Getter for the field
maxTocDepth
.- Returns:
- the maxTocDepth
-
setMaxTocDepth
public void setMaxTocDepth(int maxTocDepth) Setter for the field
maxTocDepth
.- Parameters:
maxTocDepth
- the maxTocDepth to set
-
getTotalTocSize
public int getTotalTocSize()Getter for the field
totalTocSize
.- Returns:
- the totalTocSize
-
setTotalTocSize
public void setTotalTocSize(int totalTocSize) Setter for the field
totalTocSize
.- Parameters:
totalTocSize
- the totalTocSize to set
-
getCurrentPage
public int getCurrentPage()Getter for the field
currentPage
.- Returns:
- the currentPage
-
setCurrentPage
public void setCurrentPage(int currentPage) Setter for the field
currentPage
.- Parameters:
currentPage
- the currentPage to set
-
getNumPages
public int getNumPages()Returns the number of paginator pages for the given TOC size and elements per page.- Returns:
- a int.
-
isHasChildren
public boolean isHasChildren()hasChildren.
- Returns:
- a boolean.
-
getLabel
Returns the label of the first found TOCElement that has the given PI as its topStructPi. -
getLabel
Returns the label in the given language of the first found TOCElement that has the given PI as its topStructPi. -
getLabel
Returns the label in the given locale of the first found TOCElement that has the given PI as its topStructPi.
-