Package org.languagetool.remote
Class RemoteRuleMatch
java.lang.Object
org.languagetool.remote.RemoteRuleMatch
A potential error as returned by the HTTP API of LanguageTool.
- Since:
- 3.4
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRemoteRuleMatch
(String ruleId, String ruleDescription, String msg, String context, int contextOffset, int offset, int errorLength) -
Method Summary
Modifier and TypeMethodDescriptionThe error's category.The id of the error's category.The error in its context.int
The character position of the error start inside the result ofgetContext()
.int
The length of the error in characters.int
The character position where the error starts.A text describing the error to the user.Potential corrections for the error.Description of the rule.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) void
setCategory
(String category) (package private) void
setCategoryId
(String categoryId) (package private) void
setLocQualityIssueType
(String locQualityIssueType) (package private) void
setReplacements
(List<String> replacements) (package private) void
setRuleSubId
(String subId) (package private) void
setShortMsg
(String shortMsg) (package private) void
toString()
-
Field Details
-
ruleId
-
ruleDescription
-
msg
-
context
-
contextOffset
private final int contextOffset -
offset
private final int offset -
errorLength
private final int errorLength -
subId
-
shortMsg
-
replacements
-
url
-
category
-
categoryId
-
locQualityIssueType
-
-
Constructor Details
-
RemoteRuleMatch
-
-
Method Details
-
getRuleId
Unique (per language) identifier for the error. -
getRuleDescription
Description of the rule. -
getRuleSubId
Optional sub id (rule groups have a sub id for each rule). -
getMessage
A text describing the error to the user. -
getShortMessage
Optional short message describing the error. -
getReplacements
Potential corrections for the error. Note that corrections might be wrong and they are not necessarily ordered by quality. -
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
URL with a more detailed explanation of the error. -
getCategory
The error's category. -
getCategoryId
The id of the error's category. -
getLocQualityIssueType
-
setRuleSubId
-
setShortMsg
-
setReplacements
-
setUrl
-
setCategory
-
setCategoryId
-
setLocQualityIssueType
-
toString
-