Package org.languagetool.tools
Class RuleMatchAsXmlSerializer
- java.lang.Object
-
- org.languagetool.tools.RuleMatchAsXmlSerializer
-
public class RuleMatchAsXmlSerializer extends Object
Deprecated.don't use for new use cases, the only place this should still be used is for the API mode of the command-line client (deprecated since 3.5)Generate XML to represent matching rules.- Since:
- 2.5 (as 'RuleAsXmlSerializer' up to 3.1)
-
-
Constructor Summary
Constructors Constructor Description RuleMatchAsXmlSerializer()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getXmlEnd()
Deprecated.Get the string to end the XML.String
getXmlStart(Language lang, Language motherTongue)
Deprecated.Get the string to begin the XML.String
ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang)
Deprecated.Get an XML representation of the given rule matches.String
ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang, Language motherTongue)
Deprecated.Get an XML representation of the given rule matches.String
ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, StringTools.ApiPrintMode xmlMode, Language lang, List<String> unknownWords)
Deprecated.Get an XML representation of the given rule matches.String
ruleMatchesToXmlSnippet(List<RuleMatch> ruleMatches, String text, int contextSize)
Deprecated.Get the XML snippet (i.e.
-
-
-
Method Detail
-
getXmlStart
public String getXmlStart(Language lang, Language motherTongue)
Deprecated.Get the string to begin the XML. After this, useruleMatchesToXmlSnippet(java.util.List<org.languagetool.rules.RuleMatch>, java.lang.String, int)
and thengetXmlEnd()
or better, simply useruleMatchesToXml(java.util.List<org.languagetool.rules.RuleMatch>, java.lang.String, int, org.languagetool.Language, org.languagetool.Language)
.
-
getXmlEnd
public String getXmlEnd()
Deprecated.Get the string to end the XML. Use afterruleMatchesToXmlSnippet(java.util.List<org.languagetool.rules.RuleMatch>, java.lang.String, int)
andgetXmlStart(org.languagetool.Language, org.languagetool.Language)
.
-
ruleMatchesToXmlSnippet
public String ruleMatchesToXmlSnippet(List<RuleMatch> ruleMatches, String text, int contextSize)
Deprecated.Get the XML snippet (i.e. not a complete XML document) for the given rules.
-
ruleMatchesToXml
public String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang, Language motherTongue)
Deprecated.Get an XML representation of the given rule matches.- Parameters:
text
- the original text that was checked, used to get the context of the matchescontextSize
- the desired context size in characters
-
ruleMatchesToXml
public String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang)
Deprecated.Get an XML representation of the given rule matches.- Parameters:
text
- the original text that was checked, used to get the context of the matchescontextSize
- the desired context size in characters
-
ruleMatchesToXml
public String ruleMatchesToXml(List<RuleMatch> ruleMatches, String text, int contextSize, StringTools.ApiPrintMode xmlMode, Language lang, List<String> unknownWords)
Deprecated.Get an XML representation of the given rule matches.- Parameters:
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- Since:
- 3.0
-
-