public class AnnotatedText extends Object
AnnotatedTextBuilder
to create objects of this type.Modifier and Type | Class and Description |
---|---|
static class |
AnnotatedText.MetaDataKey |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getCustomMetaData() |
Map<AnnotatedText.MetaDataKey,String> |
getGlobalMetaData() |
String |
getGlobalMetaData(AnnotatedText.MetaDataKey key,
String defaultValue) |
String |
getGlobalMetaData(String key,
String defaultValue) |
String |
getOriginalText()
Get the plain text, without markup and content from
interpretAs . |
int |
getOriginalTextPositionFor(int plainTextPosition,
boolean isToPos)
Internally used by LanguageTool to adjust error positions to point to the
original location with markup, even though markup was ignored during text checking.
|
List<TextPart> |
getParts() |
String |
getPlainText()
Get the plain text, without markup but with content from
interpretAs . |
String |
getTextWithMarkup() |
String |
toString() |
public String getOriginalText()
interpretAs
.public String getPlainText()
interpretAs
.public String getTextWithMarkup()
public int getOriginalTextPositionFor(int plainTextPosition, boolean isToPos)
plainTextPosition
- the position in the plain text (no markup) that was checkedisToPos
- the from/to position neededpublic String getGlobalMetaData(AnnotatedText.MetaDataKey key, String defaultValue)
public Map<AnnotatedText.MetaDataKey,String> getGlobalMetaData()