com.simonstl.fragment
Class RegexProc

java.lang.Object
  |
  +--com.simonstl.fragment.RegexProc
All Implemented Interfaces:
Matcher, Splitter

public class RegexProc
extends java.lang.Object
implements Matcher, Splitter

RegexProc currently wraps the Apache Xerces org.apache.xerces.utils.regex.RegularExpression class for matching, and org.apache.regexp.RE for splitting. Eventually this functionality will be extended to allow developers to plug in alternative packages for processing regular expressions. Currently, this class implements Splitter and Matcher, but that functionality will move out to other classes.

Version 0.02 starts the move toward plug-in functionality by adding the makeSplitter() and makeMatcher() methods, but they aren't used yet.

Version:
0.02 8 July 2001
Author:
Simon St.Laurent

Field Summary
 java.lang.String matchRegEx
           
 java.util.ArrayList results
           
 
Constructor Summary
RegexProc(java.lang.String regEx)
           
 
Method Summary
 boolean getIsSplit()
          getIsSplit identifies whether processing of this RegEx will operate through split() functionality or match() functionality.
 java.lang.Object makeMatcher()
          When finished, the makeMatcher() method will return an object which implements the Matcher interface for match() processing using a regex package wrapped in the object identified by the com.simonstl.fragment.splitProc property.
 java.lang.Object makeSplitter()
          When finished, the makeSplitter() method will return an object which implements the Splitter interface for split() processing using a regex package wrapped in the object identified by the com.simonstl.fragment.splitProc property.
 java.util.ArrayList matcherImpl(java.lang.String elementContent)
          This class, which currently uses the Apache Xerces regex engine, will eventually move out to another class which implements the Matcher interface.
 java.util.ArrayList processString(java.lang.String elementContent)
          This class will eventually call out to separate classes depending on whether a rule is a split() or a match.
 void setIsSplit(boolean split)
          setIsSplit sets whether processing of this RegEx will operate through split() functionality or match() functionality.
 java.util.ArrayList splitterImpl(java.lang.String elementContent)
          This class, which currently uses the Apache regexr engine, will eventually move out to another class which implements the Splitter interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matchRegEx

public java.lang.String matchRegEx

results

public java.util.ArrayList results
Constructor Detail

RegexProc

public RegexProc(java.lang.String regEx)
Method Detail

setIsSplit

public void setIsSplit(boolean split)
setIsSplit sets whether processing of this RegEx will operate through split() functionality or match() functionality. (true means split().)

getIsSplit

public boolean getIsSplit()
getIsSplit identifies whether processing of this RegEx will operate through split() functionality or match() functionality. (true means split().)

makeSplitter

public java.lang.Object makeSplitter()
When finished, the makeSplitter() method will return an object which implements the Splitter interface for split() processing using a regex package wrapped in the object identified by the com.simonstl.fragment.splitProc property.

makeMatcher

public java.lang.Object makeMatcher()
When finished, the makeMatcher() method will return an object which implements the Matcher interface for match() processing using a regex package wrapped in the object identified by the com.simonstl.fragment.splitProc property.

processString

public java.util.ArrayList processString(java.lang.String elementContent)
This class will eventually call out to separate classes depending on whether a rule is a split() or a match.

matcherImpl

public java.util.ArrayList matcherImpl(java.lang.String elementContent)
This class, which currently uses the Apache Xerces regex engine, will eventually move out to another class which implements the Matcher interface.
Specified by:
matcherImpl in interface Matcher

splitterImpl

public java.util.ArrayList splitterImpl(java.lang.String elementContent)
This class, which currently uses the Apache regexr engine, will eventually move out to another class which implements the Splitter interface.
Specified by:
splitterImpl in interface Splitter