|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tudarmstadt.ukp.jwktl.api.WiktionaryFormatter
public class WiktionaryFormatter
Utility class for producing simple string representations for the most commonly used JWKTL data objects. The string representations are designed for human perception rather than as an interoperable data exchange format.
Constructor Summary | |
---|---|
WiktionaryFormatter()
|
Method Summary | |
---|---|
String |
formatEntry(IWiktionaryEntry entry)
Returns a string representation of the given entry using separate prefixed lines for each information type. |
String |
formatHeader(IWiktionaryEntry entry)
Returns the entry key, word, word language, and part of speech of the given entry. |
String |
formatHeader(IWiktionaryPage page)
Returns the ID and the title of the given page. |
String |
formatHeader(IWiktionarySense sense)
Returns the sense key, word, sense index, and definition of the given word sense. |
protected static String |
formatLanguage(ILanguage language)
|
String |
formatPage(IWiktionaryPage page,
ILanguage... languages)
Returns a string representation of the given page using separate prefixed lines for each information type. |
String |
formatSense(IWiktionarySense sense)
Returns a string representation of the given word sense using separate prefixed lines for each information type. |
static WiktionaryFormatter |
instance()
Returns the static singleton reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WiktionaryFormatter()
Method Detail |
---|
public static WiktionaryFormatter instance()
public String formatHeader(IWiktionaryPage page)
public String formatHeader(IWiktionaryEntry entry)
public String formatHeader(IWiktionarySense sense)
public String formatPage(IWiktionaryPage page, ILanguage... languages)
public String formatEntry(IWiktionaryEntry entry)
public String formatSense(IWiktionarySense sense)
protected static String formatLanguage(ILanguage language)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |