Package org.languagetool.tools
Class RuleMatchAsXmlSerializer
java.lang.Object
org.languagetool.tools.RuleMatchAsXmlSerializer
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)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
Deprecated.Deprecated.Get the string to end the XML.getXmlStart
(Language lang, Language motherTongue) Deprecated.Get the string to begin the XML.private String
getXmlUnknownWords
(List<String> unknownWords) Deprecated.ruleMatchesToXml
(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang) Deprecated.Get an XML representation of the given rule matches.ruleMatchesToXml
(List<RuleMatch> ruleMatches, String text, int contextSize, Language lang, Language motherTongue) Deprecated.Get an XML representation of the given rule matches.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.ruleMatchesToXmlSnippet
(List<RuleMatch> ruleMatches, String text, int contextSize) Deprecated.Get the XML snippet (i.e.
-
Field Details
-
CAPACITY
private static final int CAPACITYDeprecated.- See Also:
-
-
Constructor Details
-
RuleMatchAsXmlSerializer
public RuleMatchAsXmlSerializer()Deprecated.
-
-
Method Details
-
getXmlStart
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
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
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
-
getXmlUnknownWords
Deprecated. -
escapeXMLForAPIOutput
Deprecated.
-