Package io.goobi.viewer.managedbeans
Class ArchiveBean
java.lang.Object
io.goobi.viewer.managedbeans.ArchiveBean
- All Implemented Interfaces:
Serializable
JSF backing bean for the archive view. Manages loading, searching, and navigating EAD-based
archive trees, and maintains the selected archive resource and entry state per user session.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollapseEntry(ArchiveEntry entry) collapseEntry.deleteArchiveAction.voidexpandEntry(ArchiveEntry entry) expandEntry.getArchiveHierarchyForIdentifier(String identifier) Returns the entry hierarchy from the root down to the entry with the given identifier.getMetsResolverUrl.getNodeType(String name) intvoidvoidinitializeArchiveTree(String selectedEntryId) booleanbooleanvoidloadDatabaseResource(String resourceId) voidIf only one archive database exists and database status isArchiveManager.DatabaseState.ARCHIVES_LOADED, redirect to the matching url.Exports the currently loaded archive for re-indexing.voidreset()selectEntryAction(ArchiveEntry entry) voidsetCurrentResource(String currentResource) voidsetSearchString(String searchString) voidSetter for the URL parameter.voidtoggleEntryExpansion(ArchiveEntry entry) void
-
Constructor Details
-
ArchiveBean
public ArchiveBean() -
ArchiveBean
-
-
Method Details
-
reset
public void reset() -
initializeArchiveTree
- Throws:
ArchiveException
-
initializeArchiveTree
- Throws:
ArchiveException
-
getBreadcrumbTitle
- Returns:
- configured title or root entry label
-
getTrueRoot
- Returns:
- actual root element of the document, even if it's not in the displayed tree
-
getArchiveTree
-
getArchiveConfig
-
toggleEntryExpansion
-
expandEntry
expandEntry.- Parameters:
entry- aTOCElementobject.
-
collapseEntry
collapseEntry.- Parameters:
entry- aTOCElementobject.
-
getArchiveHierarchyForIdentifier
Returns the entry hierarchy from the root down to the entry with the given identifier.- Parameters:
identifier- Entry identifier- Returns:
- List
-
selectEntryAction
- Parameters:
entry- archive entry to select- Returns:
- empty string
-
searchAction
- Returns:
- empty string
-
getSearchString
-
setSearchString
-
getSelectedEntryId
- Returns:
- ID of the selected entry
-
setSelectedEntryId
Setter for the URL parameter. Loads the entry that has the given ID. Loads the tree, if this is a new sessions.- Parameters:
id- Entry ID
-
isSearchActive
public boolean isSearchActive() -
getDisplayEntry
- Returns:
- the
ArchiveEntryto display in the metadata section of the archives view. EitherArchiveTree.getSelectedEntry()orArchiveTree.getRootElement()if the former is null
-
getDatabaseState
-
isDatabaseLoaded
public boolean isDatabaseLoaded() -
getCurrentResource
-
setCurrentResource
-
getCurrentArchive
-
getFilteredArchiveWrappers
- Throws:
DAOException
-
getFilteredDatabases
- Returns:
- Available databases, filtered by user access
-
getNumArchives
public int getNumArchives() -
getArchiveId
-
loadDatabaseResource
- Throws:
ArchiveException
-
redirectToOnlyDatabase
public void redirectToOnlyDatabase()If only one archive database exists and database status isArchiveManager.DatabaseState.ARCHIVES_LOADED, redirect to the matching url. -
getUpdatedNodeTypes
-
getNodeType
- Parameters:
name- Node type name- Returns:
- NoedType with the given name; null if none found
-
updateArchives
public void updateArchives() -
getEadResolverUrl
getMetsResolverUrl.- Returns:
- METS resolver link
-
reIndexArchiveAction
public String reIndexArchiveAction() throws IndexUnreachableException, DAOException, RecordNotFoundExceptionExports the currently loaded archive for re-indexing.- Returns:
- the empty navigation outcome string after triggering re-indexing
- Throws:
IndexUnreachableException- if any.DAOException- if any.RecordNotFoundException- if any.
-
deleteArchiveAction
deleteArchiveAction.- Returns:
- outcome
- Throws:
IOException- if any.IndexUnreachableException- if any.
-