Package io.goobi.viewer.managedbeans
Class ArchiveBean
java.lang.Object
io.goobi.viewer.managedbeans.ArchiveBean
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
collapseEntry
(ArchiveEntry entry) collapseEntry.deleteArchiveAction.void
expandEntry
(ArchiveEntry entry) expandEntry.getArchiveHierarchyForIdentifier
(String identifier) Returns the entry hierarchy from the root down to the entry with the given identifier.Deprecated.Use getFilteredDatabases()getMetsResolverUrl.getNodeType
(String name) int
void
void
initializeArchiveTree
(String selectedEntryId) boolean
boolean
void
loadDatabaseResource
(String resourceId) void
If 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.void
reset()
selectEntryAction
(ArchiveEntry entry) void
setArchiveId
(String archiveName) Deprecated.Redundant resolving of archive ID via the name + duplicate call to initializeArchiveTree(); use setCurrentResource()void
setCurrentResource
(String currentResource) void
setSearchString
(String searchString) void
Setter for the URL parameter.void
toggleEntryExpansion
(ArchiveEntry entry) void
-
Constructor Details
-
ArchiveBean
public ArchiveBean() -
ArchiveBean
-
-
Method Details
-
reset
public void reset() -
initializeArchiveTree
- Throws:
ArchiveException
-
initializeArchiveTree
- Throws:
ArchiveException
-
getTrueRoot
- Returns:
- actual root element of the document, even if it's not in the displayed tree
-
getArchiveTree
- Returns:
- the archiveTree
-
toggleEntryExpansion
-
expandEntry
expandEntry.
- Parameters:
entry
- aTOCElement
object.
-
collapseEntry
collapseEntry.
- Parameters:
entry
- aTOCElement
object.
-
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
-- Returns:
- empty string
-
searchAction
- Returns:
- empty string
-
getSearchString
- Returns:
- the searchString
-
setSearchString
- Parameters:
searchString
- the searchString to set
-
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
ArchiveEntry
to display in the metadata section of the archives view. EitherArchiveTree.getSelectedEntry()
orArchiveTree.getRootElement()
if the former is null
-
getDatabaseState
- Returns:
- the databaseState
-
isDatabaseLoaded
public boolean isDatabaseLoaded() -
getCurrentResource
- Returns:
- the currentResource
-
setCurrentResource
- Parameters:
currentResource
- the currentResource to set
-
getCurrentArchive
-
getDatabases
Deprecated.Use getFilteredDatabases()- Returns:
- List
-
getFilteredDatabases
- Returns:
- Available databases, filtered by user access
-
getNumArchives
public int getNumArchives() -
getArchiveId
-
setArchiveId
Deprecated.Redundant resolving of archive ID via the name + duplicate call to initializeArchiveTree(); use setCurrentResource()Called when selecting an archive in the drop-down.- Parameters:
archiveName
-- Throws:
ArchiveException
-
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:
- a
String
object. - Throws:
IndexUnreachableException
- if any.DAOException
- if any.RecordNotFoundException
- if any.
-
deleteArchiveAction
deleteArchiveAction.
- Returns:
- outcome
- Throws:
IOException
- if any.IndexUnreachableException
- if any.
-