Package io.goobi.viewer.managedbeans
Class TextBean
java.lang.Object
io.goobi.viewer.managedbeans.TextBean
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAbstract(StructElement topDocument, String language) Returns the abstract portion of the TEI document, converting TEI markup to HTML.getAbstract(StructElement topDocument, String abstractType, String language) Returns the abstract portion of the given type of the TEI document, converting TEI markup to HTML.getAbstractSchoolbook(StructElement topDocument, String language) Returns the schoolbook abstract portion of the TEI document, converting TEI markup to HTML.getRecordLanguages(StructElement topDocument) getTeiText(StructElement topDocument, String language) Loads and returns the TEI text for the given record and language if full-text access is granted to the client.static StringloadTeiFulltext(String filePath) Loads TEI full-text from the given file path.
-
Constructor Details
-
TextBean
public TextBean()Empty constructor.
-
-
Method Details
-
getAbstractSchoolbook
Returns the schoolbook abstract portion of the TEI document, converting TEI markup to HTML.- Parameters:
topDocument- top-level Solr document of the recordlanguage- ISO 639-1 language code- Returns:
- ProfileDescAbstractSchoolbook
-
getAbstract
Returns the abstract portion of the TEI document, converting TEI markup to HTML.- Parameters:
topDocument- top-level Solr document of the recordlanguage- ISO 639-1 language code- Returns:
- ProfileDescAbstractLong
-
getAbstract
Returns the abstract portion of the given type of the TEI document, converting TEI markup to HTML.- Parameters:
topDocument- top-level Solr document of the recordabstractType- XML id attribute of the abstract element to retrievelanguage- ISO 639-1 language code- Returns:
- Abstract of the given abstractType
-
getTeiText
public String getTeiText(StructElement topDocument, String language) throws IndexUnreachableException, DAOException, PresentationException, RecordNotFoundException Loads and returns the TEI text for the given record and language if full-text access is granted to the client.- Parameters:
topDocument- top-level Solr document of the recordlanguage- ISO 639-1 language code for the TEI file variant- Returns:
- TEI full-text or access denied message
- Throws:
IndexUnreachableExceptionDAOExceptionPresentationExceptionRecordNotFoundExceptionIOExceptionFileNotFoundException
-
getRecordLanguages
- Parameters:
topDocument- top-level structure element of the record- Returns:
- List of ISO 639-2B language codes of languages available for the record
-
loadTeiFulltext
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- path to the TEI file to load- Returns:
- TEI from the given filePath as HTML text
-
getMeiDocumentForRecord
-