Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.txt2xml.core
Class RegexDelimitedProcessor  view RegexDelimitedProcessor download RegexDelimitedProcessor.java

java.lang.Object
  extended byorg.txt2xml.core.Processor
      extended byorg.txt2xml.core.AbstractRegexProcessor
          extended byorg.txt2xml.core.RegexDelimitedProcessor

public class RegexDelimitedProcessor
extends AbstractRegexProcessor

Repeatedly matches sections of text delimited by a regex pattern. For example, when regex=',' this Processor will operate against "1,2,3" with the following matches: "1", "2", "3".


Field Summary
private static java.util.logging.Logger LOG
           
protected  int matchEnd
           
protected  int matchStart
           
protected  int nextMatchFrom
           
 
Fields inherited from class org.txt2xml.core.AbstractRegexProcessor
matcher, pattern, regex
 
Fields inherited from class org.txt2xml.core.Processor
chars, handler, NULL_ATTRIBUTES, parent
 
Constructor Summary
RegexDelimitedProcessor()
           
 
Method Summary
protected  boolean findMatch()
          Find next match, updating state appropriately.
protected  java.lang.CharSequence getMatchedText()
          Override this!
protected  java.lang.CharSequence getRemainderText()
          Override this!
protected  void resetMatching()
          Called at start of Processor.generateXmlFragment(CharSequence, ContentHandler) 55 to reset the state before starting a round of matching.
 
Methods inherited from class org.txt2xml.core.AbstractRegexProcessor
getRegex, setRegex
 
Methods inherited from class org.txt2xml.core.Processor
generateEndXmlElement, generateStartXmlElement, generateXmlElementCharacters, generateXmlFragment, getElement, getNextProcessor, getSubProcessor, setElement, setNextProcessor, setSubProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final java.util.logging.Logger LOG

matchStart

protected int matchStart

matchEnd

protected int matchEnd

nextMatchFrom

protected int nextMatchFrom
Constructor Detail

RegexDelimitedProcessor

public RegexDelimitedProcessor()
Method Detail

findMatch

protected boolean findMatch()
Description copied from class: Processor
Find next match, updating state appropriately. Override this!

Specified by:
findMatch in class Processor

getMatchedText

protected java.lang.CharSequence getMatchedText()
Description copied from class: Processor
Override this!

Specified by:
getMatchedText in class Processor

getRemainderText

protected java.lang.CharSequence getRemainderText()
Description copied from class: Processor
Override this!

Specified by:
getRemainderText in class Processor

resetMatching

protected void resetMatching()
Description copied from class: Processor
Called at start of Processor.generateXmlFragment(CharSequence, ContentHandler) 55 to reset the state before starting a round of matching. Override to prepare for a round of matching, eg RegexDelimitedProcessor resets the regex Matcher here.

Overrides:
resetMatching in class AbstractRegexProcessor