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 voidbuildTree(String group, int visibleLevel, int collapseThreshold, int lowestLevelToCollapse, String currentElementIdDoc) voidcollapseAll.voidexpandAll.intfindTocElementIndexByIddoc(String iddoc) voidgenerate(StructElement structElement, boolean addAllSiblings, String mimeType, int tocCurrentPage) generate.Recalculates the visibility of TOC elements after a +/- button has been pressed.intGetter 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.intGetter for the fieldmaxTocDepth.intReturns the number of paginator pages for the given TOC size and elements per page.getTocElements.intGetter for the fieldtocInvisible.intGetter for the fieldtocVisible.intGetter for the fieldtotalTocSize.getTreeView.getTreeViewForGroup(String group) getTreeViewForGroup.Deprecated.getViewForGroup(String group) getViewForGroup.booleanhasChildren.voidsetChildInvisible(int id) setChildInvisible.voidsetChildVisible(int id) setChildVisible.voidsetCurrentPage(int currentPage) Setter for the fieldcurrentPage.voidsetMaxTocDepth(int maxTocDepth) Setter for the fieldmaxTocDepth.voidsetTocInvisible(int tocInvisible) Setter for the fieldtocInvisible.voidsetTocVisible(int tocVisible) Setter for the fieldtocVisible.voidsetTotalTocSize(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- aStructElementobject.addAllSiblings- a boolean.mimeType- aStringobject.tocCurrentPage- a int.- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
getGroupNames
getGroupNames.
- Returns:
- a
Listobject.
-
getViewForGroup
getViewForGroup.
-
getTreeViewForGroup
getTreeViewForGroup.
-
getFlatView
getFlatView.
- Returns:
- a
Listobject.
-
getTreeView
getTreeView.
- Returns:
- a
Listobject.
-
getTreeViewSidebar
Deprecated.getTreeViewSidebar.
- Returns:
- a
Listobject.
-
buildTree
protected void buildTree(String group, int visibleLevel, int collapseThreshold, int lowestLevelToCollapse, String currentElementIdDoc) - Parameters:
group-visibleLevel-collapseThreshold-lowestLevelToCollapse-currentElementIdDoc-
-
getActiveElement
Recalculates the visibility of TOC elements after a +/- button has been pressed.- Returns:
- a
TOCElementobject.
-
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
Listobject.
-
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.
-