public class CatalogByString extends Catalog<String>
Modifier and Type | Class and Description |
---|---|
protected class |
CatalogByString.TranslationCollector |
Catalog.Const
Modifier and Type | Field and Description |
---|---|
static Pattern |
linefeedPattern |
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> |
msg |
protected String |
sourceId |
Constructor and Description |
---|
CatalogByString() |
Modifier and Type | Method and Description |
---|---|
void |
doload(InputSource s,
boolean eliminateNewlines) |
SortedSet<String> |
getKeys() |
void |
load(File f,
boolean eliminateNewlines,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Fill the data encoded in the text file into the catalog object.
|
void |
load(Reader s,
String sourceId,
boolean eliminateNewlines,
MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
Fill the data encoded in the current text of the reader into the catalog object.
|
static void |
main(String[] args)
test function:
takes
arg[0] as the path to a file which
is read into a CatalogByString object and dumped to
System.out |
static String |
normalizeLinefeed(String s) |
_format, _format, _translateArgs, containsKey, dump, get, get, get, get, getKey, getKeys, getKeys, INSITU, insitu, insitu, insitu, insitu, makeMap, makeMuli, noTranslate, put, put, put, put, putAll, readLanguageMap, readLanguages, readLanguagesString, translateAllAndFormatRobust, translateAllAndFormatRobust, translateArgsAndFormatRobust, translateArgsAndFormatRobust, translateKeyAndFormatRobust, translateKeyAndFormatRobust, translateRobust, translateRobust
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg
protected String sourceId
public static final Pattern linefeedPattern
public void load(File f, boolean eliminateNewlines, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
f
- the source filemsg
- receives error messages when parsingpublic void load(Reader s, String sourceId, boolean eliminateNewlines, MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg)
s
- represents the source streamsourceId
- substitutes the file name for generating error messagesmsg
- receives error messages when parsingpublic void doload(InputSource s, boolean eliminateNewlines)
public static void main(String[] args)
arg[0]
as the path to a file which
is read into a CatalogByString object and dumped to
System.out
see also the complete user documentation .