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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final StringConstantDEFAULT_GROUP="_DEFAULT" -
Constructor Summary
Constructors -
Method Summary
Modifier 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_GROUP
ConstantDEFAULT_GROUP="_DEFAULT"- See Also:
-
DEFAULT_COLLAPSE_LEVEL
public static final int DEFAULT_COLLAPSE_LEVEL- See Also:
-
-
Constructor Details
-
ArchiveTree
public ArchiveTree()Constructor for TOC.
-
ArchiveTree
-
-
Method Details
-
update
- Parameters:
rootElement-
-
generate
Sets the given root entry, generates a new flat list and adds it to entryMap.- Parameters:
root- The root entry to set
-
getViewForGroup
getViewForGroup.
-
getTreeViewForGroup
getTreeViewForGroup.
-
getFlatView
getFlatView.
- Returns:
- a
Listobject.
-
getTreeView
getTreeView.
- Returns:
- a
Listobject.
-
getVisibleTree
- Parameters:
searchActive-- Returns:
- List
-
resetCollapseLevel
Recursively 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
-
isExpandEntryOnSelection
public 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
-
expandAll
public void expandAll()expandAll.
-
collapseAll
public void collapseAll()collapseAll.
-
collapseAll
public void collapseAll(boolean collapseAllEntries) - Parameters:
collapseAllEntries- If true, all invisible child children will also be collapsed
-
getTocElements
getTocElements.
- Returns:
- a
Listobject.
-
getFlatEntryList
Get 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-
-
resetSearch
public void resetSearch() -
isTreeFullyLoaded
public 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
-
expandEntry
Expands this entry and sets all sub-entries visible if their immediate parent is expanded.- Parameters:
entry-
-
collapseEntry
Collapses this entry and hides all sub-entries.- Parameters:
entry-
-
expandUpEntry
Expands and sets visible all ancestors of this node and expands siblings of this node.- Parameters:
entry-
-