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.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
ConstantDEFAULT_GROUP="_DEFAULT"
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
collapseAll.void
collapseAll
(boolean collapseAllEntries) void
expandAll.void
generate
(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) boolean
boolean
void
resetCollapseLevel
(ArchiveEntry entry, int maxDepth) Recursively expands and sets visible entries at or below maxDepth; hides and collapses any below.void
void
void
setSelectedEntry
(ArchiveEntry selectedEntry) void
setTrueRootElement
(ArchiveEntry trueRootElement) void
toggleSelectedEntry
(ArchiveEntry selectedEntry) void
update
(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
List
object.
-
getTreeView
getTreeView.
- Returns:
- a
List
object.
-
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
List
object.
-
getFlatEntryList
Get the hierarchical tree as a flat list- Returns:
- List
-
getEntryById
- Parameters:
identifier
-- Returns:
- the
ArchiveEntry
with the given identifier if it exists in the tree; null otherwise
-
search
- Parameters:
searchValue
-
-
resetSearch
public void resetSearch() -
isTreeFullyLoaded
public boolean isTreeFullyLoaded()
-