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()
    • initializeArchiveTree

      public void initializeArchiveTree(String selectedEntryId)
    • 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
      Throws:
      BaseXException
    • 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
      Throws:
      BaseXException
    • 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()
    • getCurrentDatabase

      public String getCurrentDatabase()
      Returns:
      the currentDatabase
    • getCurrentResource

      public String getCurrentResource()
      Returns:
      the currentResource
    • setCurrentDatabase

      public void setCurrentDatabase(String currentDatabase)
      Parameters:
      currentDatabase - the currentDatabase to set
    • setCurrentResource

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

      public ArchiveResource getCurrentArchive()
    • getDatabases

      public List<ArchiveResource> getDatabases()
    • getNumArchives

      public int getNumArchives()
    • getArchiveId

      public String getArchiveId()
    • setArchiveId

      public void setArchiveId(String archiveName)
    • loadDatabaseResource

      public void loadDatabaseResource(String databaseId, String resourceId)
    • redirectToOnlyDatabase

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

      public NodeType getNodeType(String name)
    • updateArchives

      public void updateArchives()