Class TocMaker

java.lang.Object
io.goobi.viewer.model.toc.TocMaker

public final class TocMaker extends Object

TocMaker class.

  • Method Details

    • getSolrFieldsToFetch

      protected static List<String> getSolrFieldsToFetch(String template)
      Returns a list of fields to be used as the field filter for Solr queries. The list constists of statically defined fields in REQUIRED_FIELDS and any additional fields configured for the TOC label.
      Parameters:
      template - a String object.
      Returns:
      a List object.
    • generateToc

      public static Map<String,List<TOCElement>> generateToc(TOC toc, StructElement structElement, boolean addAllSiblings, String mimeType, int tocCurrentPage, int hitsPerPage) throws PresentationException, IndexUnreachableException, DAOException
      Generate the TOC.
      Parameters:
      toc - The TOC object (only required to set the number of volumes for anchor TOCs.
      structElement - a StructElement object.
      addAllSiblings - If true and structElement has a parent, other siblings will be listed as well and can be navigated.
      mimeType - Mime type determines the target URL of the TOC element.
      tocCurrentPage - Current page of a paginated TOC.
      hitsPerPage - Hits per page of a paginated TOC.
      Returns:
      a LinkedHashMap object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
    • getFirstFieldValue

      public static String getFirstFieldValue(org.apache.solr.common.SolrDocument doc, String footerIdField)

      getFirstFieldValue.

      Parameters:
      doc - a SolrDocument object.
      footerIdField - a String object.
      Returns:
      a String object.
    • buildTocElementLabel

      public static de.intranda.metadata.multilanguage.IMetadataValue buildTocElementLabel(org.apache.solr.common.SolrDocument doc)
    • createMultiLanguageValue

      public static de.intranda.metadata.multilanguage.IMetadataValue createMultiLanguageValue(org.apache.solr.common.SolrDocument doc, String field, String altField)

      createMultiLanguageValue.

      Parameters:
      doc - a SolrDocument object.
      field - Index field
      altField - Fallback index field
      Returns:
      a IMetadataValue object.