Class ArchiveEntry

java.lang.Object
io.goobi.viewer.model.archives.ArchiveEntry
All Implemented Interfaces:
Serializable

public class ArchiveEntry extends Object implements Serializable
Single archive tree node.
See Also:
  • Constructor Details

    • ArchiveEntry

      public ArchiveEntry(Integer order, Integer hierarchy, org.apache.solr.common.SolrDocument doc)
      Parameters:
      order - position of this node within its parent's children
      hierarchy - depth level of this node in the tree
      doc - Solr document representing this archive entry
    • ArchiveEntry

      public ArchiveEntry(ArchiveEntry orig, ArchiveEntry parent)
      Parameters:
      orig - the entry to copy all fields from
      parent - the parent node in the cloned tree
  • Method Details

    • addSubEntry

      public void addSubEntry(ArchiveEntry other)
    • removeSubEntry

      public void removeSubEntry(ArchiveEntry other)
    • reOrderElements

      public void reOrderElements()
    • getAsFlatList

      public List<ArchiveEntry> getAsFlatList(boolean ignoreDisplayChildren)
      Parameters:
      ignoreDisplayChildren - if true, recurse into children regardless of their display state
      Returns:
      List LinkedList containing all nodes
    • isHasChildren

      public boolean isHasChildren()
    • updateHierarchy

      public void updateHierarchy()
    • markAsFound

      public void markAsFound(boolean keepChildrenVisible)
    • resetFoundList

      public void resetFoundList()
    • getSearchList

      public List<ArchiveEntry> getSearchList()
    • shiftHierarchy

      public void shiftHierarchy(int offset)
      Parameters:
      offset - value added to the hierarchy level of this node and all descendants
    • getRootNode

      public ArchiveEntry getRootNode()
      Returns:
      Root node
    • getParentNode

      public ArchiveEntry getParentNode()
    • setParentNode

      public void setParentNode(ArchiveEntry parentNode)
    • getSubEntryList

      public List<ArchiveEntry> getSubEntryList()
    • setSubEntryList

      public void setSubEntryList(List<ArchiveEntry> subEntryList)
    • getOrderNumber

      public Integer getOrderNumber()
    • setOrderNumber

      public void setOrderNumber(Integer orderNumber)
    • getHierarchyLevel

      public Integer getHierarchyLevel()
    • setHierarchyLevel

      public void setHierarchyLevel(Integer hierarchyLevel)
    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getTopstructPi

      public String getTopstructPi()
    • setTopstructPi

      public void setTopstructPi(String topstructPi)
    • getLogId

      public String getLogId()
    • setLogId

      public void setLogId(String logId)
    • isSearchHit

      public boolean isSearchHit()
    • setSearchHit

      public void setSearchHit(boolean searchHit)
    • getNodeType

      public String getNodeType()
    • setNodeType

      public void setNodeType(String nodeType)
    • isDisplaySearch

      public boolean isDisplaySearch()
    • setDisplaySearch

      public void setDisplaySearch(boolean displaySearch)
    • setDisplaySearch

      public void setDisplaySearch(boolean displaySearch, boolean recursive)
      Parameters:
      displaySearch - the display-in-search-results flag to set
      recursive - if true, apply the flag to all descendant nodes as well
    • isAccessAllowed

      public boolean isAccessAllowed()
      Checks whether access to the given node is allowed due to set access conditions.
      Returns:
      true if access granted; false otherwise
    • isImageAccessAllowed

      public boolean isImageAccessAllowed()
      Checks whether access to the given node is allowed due to set access conditions.
      Returns:
      true if access granted; false otherwise
    • isValid

      public boolean isValid()
    • setValid

      public void setValid(boolean valid)
    • getDescriptionLevel

      public String getDescriptionLevel()
    • setDescriptionLevel

      public void setDescriptionLevel(String descriptionLevel)
    • getUnitdate

      public String getUnitdate()
    • setUnitdate

      public void setUnitdate(String unitdate)
    • getAccessConditions

      public List<String> getAccessConditions()
    • setAccessConditions

      public void setAccessConditions(List<String> accessConditions)
    • isHasChild

      public boolean isHasChild()
    • getAssociatedRecordPi

      public String getAssociatedRecordPi()
    • setAssociatedRecordPi

      public void setAssociatedRecordPi(String associatedRecordPi)
    • getAncestors

      public List<ArchiveEntry> getAncestors(boolean includeSelf)
      Get the parent node hierarchy of this node, optionally including the node itself The list is sorted with hightest hierarchy level first, so the node itself will always be the last element, if included.
      Parameters:
      includeSelf - if true, this node is appended at the end of the list
      Returns:
      List
    • isContainsImage

      public boolean isContainsImage()
    • setContainsImage

      public void setContainsImage(boolean containsImage)
    • getDoc

      public org.apache.solr.common.SolrDocument getDoc()
    • isChildrenFound

      public boolean isChildrenFound()
    • setChildrenFound

      public void setChildrenFound(boolean childrenFound)
    • isChildrenLoaded

      public boolean isChildrenLoaded()
    • setChildrenLoaded

      public void setChildrenLoaded(boolean childrenLoaded)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object