Class ArchiveBean

java.lang.Object
io.goobi.viewer.managedbeans.ArchiveBean
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class ArchiveBean extends Object implements Serializable
See Also:
  • Constructor Details

    • ArchiveBean

      public ArchiveBean()
    • ArchiveBean

      public ArchiveBean(ArchiveManager archiveManager)
  • Method Details

    • reset

      public void reset()
    • initializeArchiveTree

      public void initializeArchiveTree() throws ArchiveException
      Throws:
      ArchiveException
    • initializeArchiveTree

      public void initializeArchiveTree(String selectedEntryId) throws ArchiveException
      Throws:
      ArchiveException
    • getTrueRoot

      public ArchiveEntry getTrueRoot()
      Returns:
      actual root element of the document, even if it's not in the displayed tree
    • getArchiveTree

      public ArchiveTree getArchiveTree()
      Returns:
      the archiveTree
    • toggleEntryExpansion

      public void toggleEntryExpansion(ArchiveEntry entry)
    • expandEntry

      public void expandEntry(ArchiveEntry entry)

      expandEntry.

      Parameters:
      entry - a TOCElement object.
    • collapseEntry

      public void collapseEntry(ArchiveEntry entry)

      collapseEntry.

      Parameters:
      entry - a TOCElement object.
    • getArchiveHierarchyForIdentifier

      public List<ArchiveEntry> getArchiveHierarchyForIdentifier(String identifier)
      Returns the entry hierarchy from the root down to the entry with the given identifier.
      Parameters:
      identifier - Entry identifier
      Returns:
      List
    • selectEntryAction

      public String selectEntryAction(ArchiveEntry entry)
      Parameters:
      entry -
      Returns:
      empty string
    • searchAction

      public String searchAction()
      Returns:
      empty string
    • getSearchString

      public String getSearchString()
      Returns:
      the searchString
    • setSearchString

      public void setSearchString(String searchString)
      Parameters:
      searchString - the searchString to set
    • getSelectedEntryId

      public String getSelectedEntryId()
      Returns:
      ID of the selected entry
    • setSelectedEntryId

      public void setSelectedEntryId(String id)
      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

      public ArchiveEntry getDisplayEntry()
      Returns:
      the ArchiveEntry to display in the metadata section of the archives view. Either ArchiveTree.getSelectedEntry() or ArchiveTree.getRootElement() if the former is null
    • getDatabaseState

      public ArchiveManager.DatabaseState getDatabaseState()
      Returns:
      the databaseState
    • isDatabaseLoaded

      public boolean isDatabaseLoaded()
    • getCurrentResource

      public String getCurrentResource()
      Returns:
      the currentResource
    • setCurrentResource

      public void setCurrentResource(String currentResource)
      Parameters:
      currentResource - the currentResource to set
    • getCurrentArchive

      public ArchiveResource getCurrentArchive()
    • getDatabases

      @Deprecated(since="2024.06") public List<ArchiveResource> getDatabases()
      Deprecated.
      Use getFilteredDatabases()
      Returns:
      List
    • getFilteredDatabases

      public List<ArchiveResource> getFilteredDatabases()
      Returns:
      Available databases, filtered by user access
    • getNumArchives

      public int getNumArchives()
    • getArchiveId

      public String getArchiveId()
    • setArchiveId

      @Deprecated(since="2024.10") public void setArchiveId(String archiveName) throws ArchiveException
      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

      public void loadDatabaseResource(String resourceId) throws ArchiveException
      Throws:
      ArchiveException
    • redirectToOnlyDatabase

      public void redirectToOnlyDatabase()
      If only one archive database exists and database status is ArchiveManager.DatabaseState.ARCHIVES_LOADED, redirect to the matching url.
    • getUpdatedNodeTypes

      public Map<String,NodeType> getUpdatedNodeTypes()
    • getNodeType

      public NodeType getNodeType(String name)
      Parameters:
      name - Node type name
      Returns:
      NoedType with the given name; null if none found
    • updateArchives

      public void updateArchives()
    • getEadResolverUrl

      public String getEadResolverUrl()

      getMetsResolverUrl.

      Returns:
      METS resolver link
    • reIndexArchiveAction

      public String reIndexArchiveAction() throws IndexUnreachableException, DAOException, RecordNotFoundException
      Exports the currently loaded archive for re-indexing.
      Returns:
      a String object.
      Throws:
      IndexUnreachableException - if any.
      DAOException - if any.
      RecordNotFoundException - if any.
    • deleteArchiveAction

      public String deleteArchiveAction() throws IOException, IndexUnreachableException

      deleteArchiveAction.

      Returns:
      outcome
      Throws:
      IOException - if any.
      IndexUnreachableException - if any.