-
- All Implemented Interfaces:
-
org.readium.r2.shared.publication.services.content.Content.AttributesHolder,org.readium.r2.shared.publication.services.content.Content.Element,org.readium.r2.shared.publication.services.content.Content.TextualElement
public final class Content.TextElement implements Content.TextualElement
A text element.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceContent.TextElement.RoleRepresents a purpose of an element in the broader context of the document.
public final classContent.TextElement.SegmentRanged portion of text with associated attributes.
-
Field Summary
Fields Modifier and Type Field Description private final Stringtextprivate final Locatorlocatorprivate final Content.TextElement.Roleroleprivate final List<Content.TextElement.Segment>segmentsprivate final List<Content.Attribute<?>>attributesprivate final Languagelanguageprivate final StringaccessibilityLabel
-
Constructor Summary
Constructors Constructor Description Content.TextElement(Locator locator, Content.TextElement.Role role, List<Content.TextElement.Segment> segments, List<Content.Attribute<?>> attributes)
-
Method Summary
Modifier and Type Method Description StringgetText()LocatorgetLocator()Locator targeting this element in the Publication. final Content.TextElement.RolegetRole()final List<Content.TextElement.Segment>getSegments()List<Content.Attribute<?>>getAttributes()Associated list of attributes. LanguagegetLanguage()StringgetAccessibilityLabel()-
-
Constructor Detail
-
Content.TextElement
Content.TextElement(Locator locator, Content.TextElement.Role role, List<Content.TextElement.Segment> segments, List<Content.Attribute<?>> attributes)
- Parameters:
role- Purpose of this element in the broader context of the document.segments- Ranged portions of text with associated attributes.
-
-
Method Detail
-
getLocator
Locator getLocator()
Locator targeting this element in the Publication.
-
getRole
final Content.TextElement.Role getRole()
-
getSegments
final List<Content.TextElement.Segment> getSegments()
-
getAttributes
List<Content.Attribute<?>> getAttributes()
Associated list of attributes.
-
getLanguage
Language getLanguage()
-
getAccessibilityLabel
String getAccessibilityLabel()
-
-
-
-