Class RemoteRuleMatch
java.lang.Object
org.languagetool.server.RemoteRuleMatch
A potential error as returned by the HTTP API of LanguageTool.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRemoteRuleMatch(String ruleId, String msg, String context, int contextOffset, int offset, int errorLength) RemoteRuleMatch(String ruleId, String msg, String context, int contextOffset, int offset, int errorLength, int estimatedContextForSureMatch) -
Method Summary
Modifier and TypeMethodDescription(package private) intThe error's category.The id of the error's category.The error in its context.intThe character position of the error start inside the result ofgetContext().intThe length of the error in characters.intThe character position where the error starts.A text describing the error to the user.Potential corrections for the error.Unique (per language) identifier for the error.Optional sub id (rule groups have a sub id for each rule).Optional short message describing the error.getUrl()URL with a more detailed explanation of the error.(package private) booleanisTouchedByOneOf(List<org.languagetool.rules.RuleMatch> matches) (package private) voidsetCategory(String category) (package private) voidsetCategoryId(String categoryId) (package private) voidsetLocQualityIssueType(String locQualityIssueType) (package private) voidsetReplacements(List<String> replacements) (package private) voidsetRuleSubId(String subId) (package private) voidsetShortMsg(String shortMsg) (package private) voidtoString()
-
Field Details
-
ruleId
-
msg
-
context
-
contextOffset
private final int contextOffset -
offset
private final int offset -
errorLength
private final int errorLength -
estimatedContextForSureMatch
private final int estimatedContextForSureMatch -
subId
-
shortMsg
-
replacements
-
url
-
category
-
categoryId
-
locQualityIssueType
-
-
Constructor Details
-
RemoteRuleMatch
-
RemoteRuleMatch
-
-
Method Details
-
isTouchedByOneOf
-
getRuleId
Unique (per language) identifier for the error. -
getRuleSubId
-
getMessage
A text describing the error to the user. -
getShortMessage
-
getReplacements
-
getContext
The error in its context. SeegetContextOffset()andgetErrorLength()to get the exact position. -
getContextOffset
public int getContextOffset()The character position of the error start inside the result ofgetContext(). -
getErrorOffset
public int getErrorOffset()The character position where the error starts. -
getErrorLength
public int getErrorLength()The length of the error in characters. -
getUrl
-
getCategory
-
getCategoryId
-
getLocQualityIssueType
-
setRuleSubId
-
setShortMsg
-
setReplacements
-
setUrl
-
setCategory
-
setCategoryId
-
setLocQualityIssueType
-
estimatedContextForSureMatch
@Experimental int estimatedContextForSureMatch() -
toString
-