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
-
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 String
loadTeiFulltext
(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
-language
- ISO 639-1 language code- Returns:
- ProfileDescAbstractSchoolbook
-
getAbstract
Returns the abstract portion of the TEI document, converting TEI markup to HTML.- Parameters:
topDocument
-language
- 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
-abstractType
-language
-- 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
-language
-- Returns:
- TEI full-text or access denied message
- Throws:
IndexUnreachableException
DAOException
PresentationException
RecordNotFoundException
IOException
FileNotFoundException
-
getRecordLanguages
- Parameters:
topDocument
-- 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
-- Returns:
- TEI from the given filePath as HTML text
-