Jet.Pat
Class PatternSequence

java.lang.Object
  extended byJet.Pat.PatternElement
      extended byJet.Pat.PatternSequence

public class PatternSequence
extends PatternElement

a sequence of pattern elements which are to be matched in succession, to successive portions of a document. Represented in a pattern file by listing the elements in sequence,
a b c d e


Constructor Summary
PatternSequence(PatternElement[] elems)
          creates a PatternSequence from an array of PatternElements
PatternSequence(java.util.Vector elems)
          creates a PatternSequence from a Vector of PatternElements
 
Method Summary
 PatternGraph toGraph(Id id)
          converts the PatternSequence to a graph representation.
 java.lang.String toString()
          returns a printable representation of the PatternSequence, consisting of the constituent PatternElements, separated by spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternSequence

public PatternSequence(PatternElement[] elems)
creates a PatternSequence from an array of PatternElements


PatternSequence

public PatternSequence(java.util.Vector elems)
creates a PatternSequence from a Vector of PatternElements

Method Detail

toString

public java.lang.String toString()
returns a printable representation of the PatternSequence, consisting of the constituent PatternElements, separated by spaces.

Specified by:
toString in class PatternElement

toGraph

public PatternGraph toGraph(Id id)
converts the PatternSequence to a graph representation. A PatternSequence with n elements is converted into a PatternGraph with n-1 InternalPatternNodes:
a b c d
becomes
--a--> O --b--> O --c--> O --d-->
where 'O' is an internal pattern node.

Specified by:
toGraph in class PatternElement