Package io.goobi.viewer.model.archives
Class ArchiveTree
java.lang.Object
io.goobi.viewer.model.archives.ArchiveTree
- All Implemented Interfaces:
- Serializable
Table of contents and associated functionality for a record. Instances can be either the default archive or a session-local copy.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final StringConstantDEFAULT_GROUP="_DEFAULT"
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcollapseAll.voidcollapseAll(boolean collapseAllEntries) voidcollapseEntry(ArchiveEntry entry) Collapses this entry and hides all sub-entries.voidexpandAll.voidexpandEntry(ArchiveEntry entry) Expands this entry and sets all sub-entries visible if their immediate parent is expanded.voidexpandUpEntry(ArchiveEntry entry) Expands and sets visible all ancestors of this node and expands siblings of this node.voidgenerate(ArchiveEntry root) Sets the given root entry, generates a new flat list and adds it to entryMap.getEntryById(String identifier) Get the hierarchical tree as a flat listgetFlatView.getRootElement(String group) getTocElements.getTreeView.getTreeViewForGroup(String group) getTreeViewForGroup.getViewForGroup(String group) getViewForGroup.getVisibleTree(boolean searchActive) booleanisEntryExpanded(ArchiveEntry entry) booleanisEntryVisible(ArchiveEntry entry) booleanbooleanvoidresetCollapseLevel(ArchiveEntry entry, int maxDepth) Recursively expands and sets visible entries at or below maxDepth; hides and collapses any below.voidvoidvoidsetSelectedEntry(ArchiveEntry selectedEntry) voidsetTrueRootElement(ArchiveEntry trueRootElement) voidtoggleSelectedEntry(ArchiveEntry selectedEntry) voidupdate(ArchiveEntry rootElement) 
- 
Field Details- 
DEFAULT_GROUPConstantDEFAULT_GROUP="_DEFAULT"- See Also:
 
- 
DEFAULT_COLLAPSE_LEVELpublic static final int DEFAULT_COLLAPSE_LEVEL- See Also:
 
 
- 
- 
Constructor Details- 
ArchiveTreepublic ArchiveTree()Constructor for TOC. 
- 
ArchiveTree
 
- 
- 
Method Details- 
update- Parameters:
- rootElement-
 
- 
generateSets the given root entry, generates a new flat list and adds it to entryMap.- Parameters:
- root- The root entry to set
 
- 
getViewForGroupgetViewForGroup. 
- 
getTreeViewForGroupgetTreeViewForGroup. 
- 
getFlatViewgetFlatView. - Returns:
- a Listobject.
 
- 
getTreeViewgetTreeView. - Returns:
- a Listobject.
 
- 
getVisibleTree- Parameters:
- searchActive-
- Returns:
- List
 
- 
resetCollapseLevelRecursively expands and sets visible entries at or below maxDepth; hides and collapses any below.- Parameters:
- entry-
- maxDepth-
 
- 
getSelectedEntry- Returns:
- the selectedEntry
 
- 
setSelectedEntry- Parameters:
- selectedEntry- the selectedEntry to set
 
- 
isExpandEntryOnSelectionpublic boolean isExpandEntryOnSelection()
- 
toggleSelectedEntry- Parameters:
- selectedEntry-
 
- 
getTrueRootElement- Returns:
- the trueRootElement
 
- 
setTrueRootElement- Parameters:
- trueRootElement- the trueRootElement to set
 
- 
getRootElement- Returns:
- Root element for the default group
 
- 
getRootElement- Parameters:
- group-
- Returns:
- Root element for the given group
 
- 
expandAllpublic void expandAll()expandAll. 
- 
collapseAllpublic void collapseAll()collapseAll. 
- 
collapseAllpublic void collapseAll(boolean collapseAllEntries) - Parameters:
- collapseAllEntries- If true, all invisible child children will also be collapsed
 
- 
getTocElementsgetTocElements. - Returns:
- a Listobject.
 
- 
getFlatEntryListGet the hierarchical tree as a flat list- Returns:
- List
 
- 
getEntryById- Parameters:
- identifier-
- Returns:
- the ArchiveEntrywith the given identifier if it exists in the tree; null otherwise
 
- 
search- Parameters:
- searchValue-
 
- 
resetSearchpublic void resetSearch()
- 
isTreeFullyLoadedpublic boolean isTreeFullyLoaded()
- 
isEntryVisible- Parameters:
- entry-
- Returns:
- true if given entry is currently visible; false otherwise
 
- 
isEntryExpanded- Parameters:
- entry-
- Returns:
- true if given entry is currently expanded; false otherwise
 
- 
expandEntryExpands this entry and sets all sub-entries visible if their immediate parent is expanded.- Parameters:
- entry-
 
- 
collapseEntryCollapses this entry and hides all sub-entries.- Parameters:
- entry-
 
- 
expandUpEntryExpands and sets visible all ancestors of this node and expands siblings of this node.- Parameters:
- entry-
 
 
-