public class RuleAsXmlSerializer extends Object
| Constructor and Description |
|---|
RuleAsXmlSerializer() |
| Modifier and Type | Method and Description |
|---|---|
String |
getXmlEnd()
Get the string to end the XML.
|
String |
getXmlStart(Language lang,
Language motherTongue)
Get the string to begin the XML.
|
String |
ruleMatchesToXml(List<RuleMatch> ruleMatches,
String text,
int contextSize,
Language lang)
Get an XML representation of the given rule matches.
|
String |
ruleMatchesToXml(List<RuleMatch> ruleMatches,
String text,
int contextSize,
Language lang,
Language motherTongue)
Get an XML representation of the given rule matches.
|
String |
ruleMatchesToXml(List<RuleMatch> ruleMatches,
String text,
int contextSize,
StringTools.XmlPrintMode xmlMode,
Language lang,
List<String> unknownWords)
Get an XML representation of the given rule matches.
|
String |
ruleMatchesToXmlSnippet(List<RuleMatch> ruleMatches,
String text,
int contextSize)
Get the XML snippet (i.e. not a complete XML document) for the given rules.
|
public String getXmlStart(Language lang, Language motherTongue)
ruleMatchesToXmlSnippet(java.util.List<org.languagetool.rules.RuleMatch>, java.lang.String, int) and then getXmlEnd()
or better, simply use ruleMatchesToXml(java.util.List<org.languagetool.rules.RuleMatch>, java.lang.String, int, org.languagetool.Language, org.languagetool.Language).public String getXmlEnd()
ruleMatchesToXmlSnippet(java.util.List<org.languagetool.rules.RuleMatch>, java.lang.String, int) and getXmlStart(org.languagetool.Language, org.languagetool.Language).public String ruleMatchesToXmlSnippet(List<RuleMatch> ruleMatches, String text, int contextSize)
public String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang, Language motherTongue)
text - the original text that was checked, used to get the context of the matchescontextSize - the desired context size in characterspublic String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang)
text - the original text that was checked, used to get the context of the matchescontextSize - the desired context size in characterspublic String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, StringTools.XmlPrintMode xmlMode, Language lang, List<String> unknownWords)
text - the original text that was checked, used to get the context of the matchescontextSize - the desired context size in charactersunknownWords - unknown words to be printed in a separated list