Class TextBean

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

@Named @SessionScoped public class TextBean extends Object implements Serializable
Bean representing the primary source record for image display. Whether a source record or an annotation record is currently loaded in ActiveDocumentBean, this bean will always contain the source record.
See Also:
  • Constructor Details

    • TextBean

      public TextBean()
      Empty constructor.
  • Method Details

    • getAbstractSchoolbook

      public String getAbstractSchoolbook(StructElement topDocument, String language)
      Returns the schoolbook abstract portion of the TEI document, converting TEI markup to HTML.
      Parameters:
      topDocument -
      language - ISO 639-1 language code
      Returns:
      ProfileDescAbstractSchoolbook
    • getAbstract

      public String getAbstract(StructElement topDocument, String language)
      Returns the abstract portion of the TEI document, converting TEI markup to HTML.
      Parameters:
      topDocument -
      language - ISO 639-1 language code
      Returns:
      ProfileDescAbstractLong
    • getAbstract

      public String getAbstract(StructElement topDocument, String abstractType, String language)
      Returns the abstract portion of the given type of the TEI document, converting TEI markup to HTML.
      Parameters:
      topDocument -
      abstractType -
      language -
      Returns:
      Abstract of the given abstractType
    • getTeiText

      Loads and returns the TEI text for the given record and language if full-text access is granted to the client.
      Parameters:
      topDocument -
      language -
      Returns:
      TEI full-text or access denied message
      Throws:
      IndexUnreachableException
      DAOException
      PresentationException
      RecordNotFoundException
      IOException
      FileNotFoundException
    • getRecordLanguages

      public List<String> getRecordLanguages(StructElement topDocument)
      Parameters:
      topDocument -
      Returns:
      List of ISO 639-2B language codes of languages available for the record
    • loadTeiFulltext

      public static String loadTeiFulltext(String filePath)
      Loads TEI full-text from the given file path. The text portion is cut out of the main document and its markup is converted to HTML.
      Parameters:
      filePath -
      Returns:
      TEI from the given filePath as HTML text