| java.lang.Object org.mmbase.util.transformers.ReaderTransformer org.mmbase.util.transformers.ConfigurableReaderTransformer org.mmbase.util.transformers.ChunkedTransformer
All known Subclasses: org.mmbase.util.transformers.RegexpReplacer,
ChunkedTransformer | abstract public class ChunkedTransformer extends ConfigurableReaderTransformer implements CharTransformer(Code) | | A chunked transformer is a transformer that transforms on a 'chunk by chunk' base. A chunck is
typically a word or a line or so. The type of the 'chunks' is controled by the 'mode' parameter.
It can ignored existing XML markup (the 'XMLTEXT' modes), and also avoids trailing dots and
comments and surrounding quotes and parentheses.
author: Michiel Meeuwissen since: MMBase-1.8 |
Inner Class :protected class Status | |
Field Summary | |
final public static int | ENTIRE Match the entire stream (so, one String must be created). | final public static int | LINES Match line by line. | final public static int | REPLACE_FIRST If this is added to the config-int, then only the first match should be used. | final public static int | REPLACE_FIRST_ALL If this is added to the config-int, then only the first match should be used. | final public static int | WORDS Match word by word. | final public static int | XMLTEXT Match in PCDATA of xml elements. | final public static int | XMLTEXT_WORDS Match word by word, but only in PCDATA of xml elements. | protected boolean | replaceFirst | protected boolean | replaceFirstAll |
Method Summary | |
abstract protected String | base() | public void | configure(int i) | public String | getEncoding() | public static void | main(String[] argv) | protected Status | newStatus() | abstract protected boolean | replace(String string, Writer w, Status status) Implement this. | protected boolean | replace(Status status) Whether still to do replacing, given status. | protected boolean | replaceWord(StringBuilder word, Writer writer, Status status) | public Writer | transform(Reader r, Writer w) | public Writer | transformEntire(Reader r, Writer w) | public Writer | transformLines(Reader r, Writer w) | public Writer | transformWords(Reader r, Writer w) | public Writer | transformXmlText(Reader r, Writer w) | public Writer | transformXmlTextWords(Reader r, Writer w) | public Map<String, Config> | transformers() |
ENTIRE | final public static int ENTIRE(Code) | | Match the entire stream (so, one String must be created).
|
LINES | final public static int LINES(Code) | | Match line by line.
|
REPLACE_FIRST | final public static int REPLACE_FIRST(Code) | | If this is added to the config-int, then only the first match should be used.
|
REPLACE_FIRST_ALL | final public static int REPLACE_FIRST_ALL(Code) | | If this is added to the config-int, then only the first match should be used.
|
WORDS | final public static int WORDS(Code) | | Match word by word.
|
XMLTEXT | final public static int XMLTEXT(Code) | | Match in PCDATA of xml elements.
|
XMLTEXT_WORDS | final public static int XMLTEXT_WORDS(Code) | | Match word by word, but only in PCDATA of xml elements.
|
replaceFirst | protected boolean replaceFirst(Code) | | |
replaceFirstAll | protected boolean replaceFirstAll(Code) | | |
ChunkedTransformer | protected ChunkedTransformer(int i)(Code) | | |
ChunkedTransformer | public ChunkedTransformer()(Code) | | |
configure | public void configure(int i)(Code) | | |
newStatus | protected Status newStatus()(Code) | | |
replace | abstract protected boolean replace(String string, Writer w, Status status) throws IOException(Code) | | Implement this. Return true if a replacement done.
|
replace | protected boolean replace(Status status)(Code) | | Whether still to do replacing, given status.
|
Fields inherited from org.mmbase.util.transformers.ConfigurableReaderTransformer | protected int to(Code)(Java Doc)
|
|
|