Class BrowseElement

java.lang.Object
io.goobi.viewer.model.search.BrowseElement
All Implemented Interfaces:
Serializable

public class BrowseElement extends Object implements Serializable
Representation of a search hit.
See Also:
  • Constructor Details

    • BrowseElement

      public BrowseElement(String pi, int imageNo, String label, String fulltext, Locale locale, String dataRepository, String url)
      Constructor for unit tests and special instances.
      Parameters:
      pi -
      imageNo -
      label -
      fulltext -
      locale -
      dataRepository -
      url - Injected URL, overrides URL generation
  • Method Details

    • createMultiLanguageLabel

      public de.intranda.metadata.multilanguage.IMetadataValue createMultiLanguageLabel(StructElement structElement)

      createMultiLanguageLabel.

      Parameters:
      structElement - a StructElement object.
      Returns:
      a IMetadataValue object.
    • getLabel

      public String getLabel()

      Getter for the field label.

      Returns:
      the label
    • getLabel

      public String getLabel(Locale locale)

      Getter for the field label.

      Parameters:
      locale - a Locale object.
      Returns:
      a String object.
    • getLabelAsMetadataValue

      public de.intranda.metadata.multilanguage.IMetadataValue getLabelAsMetadataValue()

      getLabelAsMetadataValue.

      Returns:
      a IMetadataValue object.
    • getLabelShort

      public String getLabelShort()

      Getter for the field labelShort.

      Returns:
      the labelShort
    • setLabelShort

      public void setLabelShort(de.intranda.metadata.multilanguage.IMetadataValue labelShort)

      Setter for the field labelShort.

      Parameters:
      labelShort - the labelShort to set
    • getDocStructType

      public String getDocStructType()

      Getter for the field docStructType.

      Returns:
      the type
    • getIddoc

      public String getIddoc()

      Getter for the field iddoc.

      Returns:
      the iddoc
    • getThumbnailUrl

      public String getThumbnailUrl()

      Getter for the field thumbnailUrl.

      Returns:
      the thumbnailUrl
    • getThumbnailUrl

      public String getThumbnailUrl(String width, String height)
      Called from HTML.
      Parameters:
      width - a String object.
      height - a String object.
      Returns:
      a String object.
    • getImageNo

      public int getImageNo()

      Getter for the field imageNo.

      Returns:
      a int.
    • setImageNo

      public void setImageNo(int imageNo)
      Parameters:
      imageNo - the imageNo to set
    • getStructElements

      public List<StructElementStub> getStructElements()

      Getter for the field structElements.

      Returns:
      the structElements
    • getBottomStructElement

      public StructElementStub getBottomStructElement()
      Returns the lowest StructElementStub in the list.
      Returns:
      last StructElementStub in the list
    • getEvents

      public List<EventElement> getEvents()
      Returns:
      the events
    • setFulltext

      public void setFulltext(String fulltext)

      Setter for the field fulltext.

      Parameters:
      fulltext - the fulltext to set
    • getFulltext

      public String getFulltext()

      Getter for the field fulltext.

      Returns:
      the fulltext
    • getFulltextForHtml

      public String getFulltextForHtml()
      Returns a relevant full-text fragment for displaying in the search hit box, stripped of any contained JavaScript.
      Returns:
      Full-text fragment sans any line breaks or JavaScript
    • getVolumeNo

      public String getVolumeNo()

      Getter for the field volumeNo.

      Returns:
      the volumeNo
    • setVolumeNo

      public void setVolumeNo(String volumeNo)

      Setter for the field volumeNo.

      Parameters:
      volumeNo - the volumeNo to set
    • isGroup

      public boolean isGroup()
      Returns:
      true if doctype is GROUP; false otherwise
    • isArchive

      public boolean isArchive()
      Returns:
      true if doctype is ARCHIVE; false otherwise
    • isCmsPage

      public boolean isCmsPage()
      Returns:
      the cmsPage
    • setCmsPage

      public void setCmsPage(boolean cmsPage)
      Parameters:
      cmsPage - the cmsPage to set
    • isWork

      public boolean isWork()
      Returns:
      the work
    • setWork

      public void setWork(boolean work)
      Parameters:
      work - the work to set
    • isAnchor

      public boolean isAnchor()

      isAnchor.

      Returns:
      the anchor
    • setAnchor

      public void setAnchor(boolean anchor)

      Setter for the field anchor.

      Parameters:
      anchor - the anchor to set
    • isHasImages

      public boolean isHasImages()

      isHasImages.

      Returns:
      the hasImages
    • setHasImages

      public void setHasImages(boolean hasImages)

      Setter for the field hasImages.

      Parameters:
      hasImages - the hasImages to set
    • isHasTeiFiles

      public boolean isHasTeiFiles()
      Returns:
      the hasTeiFiles
    • setHasTeiFiles

      public void setHasTeiFiles(boolean hasTeiFiles)
      Parameters:
      hasTeiFiles - the hasTeiFiles to set
    • isShowThumbnail

      public boolean isShowThumbnail()
      Returns:
      the showThumbnail
    • setShowThumbnail

      public void setShowThumbnail(boolean showThumbnail)
      Parameters:
      showThumbnail - the showThumbnail to set
    • getNumVolumes

      public long getNumVolumes()

      Getter for the field numVolumes.

      Returns:
      the numVolumes
    • setPi

      public void setPi(String pi)

      Setter for the field pi.

      Parameters:
      pi - the identifier to set
    • getPi

      public String getPi()

      Getter for the field pi.

      Returns:
      the identifier
    • getUrl

      public String getUrl()
      Returns the search hint URL (without the application root!).
      Returns:
      the url
    • getSidebarPrevUrl

      public String getSidebarPrevUrl()

      Getter for the field sidebarPrevUrl.

      Returns:
      the sidebarPrevUrl
    • getSidebarNextUrl

      public String getSidebarNextUrl()

      Getter for the field sidebarNextUrl.

      Returns:
      the sidebarNextUrl
    • getRisExport

      public String getRisExport()
      Returns:
      the risExport
    • getMetadataFieldNames

      public Set<String> getMetadataFieldNames()
      Returns:
      List of field names in the metadata list
    • getMetadataList

      public List<Metadata> getMetadataList()

      Getter for the field metadataList.

      Returns:
      a List object.
    • getMetadataValues

      public List<String> getMetadataValues(String field)
    • getFirstMetadataValue

      public String getFirstMetadataValue(String field)
    • getMetadataListForLocale

      public List<Metadata> getMetadataListForLocale(String field, Locale locale)
      Parameters:
      field -
      locale -
      Returns:
      List
    • getMetadataListForLocale

      public List<Metadata> getMetadataListForLocale(String field, Locale locale, String metadataListType)
      Parameters:
      field - Requested field name
      locale - Requested locale
      metadataListType -
      Returns:
      List
    • getMetadataListForLocale

      public List<Metadata> getMetadataListForLocale(Locale locale)

      getMetadataListForLocale.

      Parameters:
      locale - a Locale object.
      Returns:
      a List object.
    • getMetadataListForLocale

      public List<Metadata> getMetadataListForLocale(Locale locale, String metadataListType)
      Parameters:
      locale -
      metadataListType -
      Returns:
      List
    • getMetadataListForCurrentLocale

      public List<Metadata> getMetadataListForCurrentLocale()

      getMetadataListForCurrentLocale.

      Returns:
      a List object.
    • getSecondaryMetadataListForCurrentLocale

      public List<Metadata> getSecondaryMetadataListForCurrentLocale()
      Returns:
      First metadata list in metadataListMap that's not the default search metadata list configuration; empty list if not found
    • getExistingMetadataFields

      public Set<String> getExistingMetadataFields()
      Returns:
      the existingMetadataFields
    • getMetadataGroupType

      public SolrConstants.MetadataGroupType getMetadataGroupType()

      Getter for the field metadataGroupType.

      Returns:
      the metadataGroupType
    • getMetadataList

      public List<Metadata> getMetadataList(String metadataLabel)

      Getter for the field metadataList.

      Parameters:
      metadataLabel - a String object.
      Returns:
      a List object.
    • getFoundMetadataList

      public List<Metadata> getFoundMetadataList()

      Getter for the field foundMetadataList.

      Returns:
      the foundMetadataList
    • getDataRepository

      public String getDataRepository()

      Getter for the field dataRepository.

      Returns:
      the dataRepository
    • getContextObject

      public String getContextObject()
      Returns the ContextObject value for a COinS element using the docstruct hierarchy for this search hit..
      Returns:
      a String object.
    • getRecordLanguages

      public List<String> getRecordLanguages()

      Getter for the field recordLanguages.

      Returns:
      the recordLanguages
    • setHasMedia

      public void setHasMedia(boolean hasMedia)

      Setter for the field hasMedia.

      Parameters:
      hasMedia - the hasMedia to set
    • isHasMedia

      public boolean isHasMedia()

      isHasMedia.

      Returns:
      the hasMedia
    • getOriginalFieldName

      public String getOriginalFieldName()

      Getter for the field originalFieldName.

      Returns:
      the originalFieldName
    • determinePageType

      public PageType determinePageType()

      determinePageType.

      Returns:
      a PageType object.
    • getLogId

      public String getLogId()

      Getter for the field logId.

      Returns:
      the logId
    • setLogId

      public void setLogId(String logId)
      Parameters:
      logId - the logId to set
    • getDocType

      public SolrConstants.DocType getDocType()

      Getter for the field docType.

      Returns:
      the docType
    • setThumbnailUrl

      public void setThumbnailUrl(String thumbnailUrl)