com.caucho.relaxng.pattern
Class Pattern

java.lang.Object
  extended by com.caucho.relaxng.pattern.Pattern
Direct Known Subclasses:
AttributePattern, ChoicePattern, DataPattern, ElementPattern, EmptyPattern, GrammarPattern, GroupPattern, InterleavePattern, NameClassPattern, RefPattern, TextPattern, ZeroOrMorePattern

public abstract class Pattern
extends java.lang.Object

Relax pattern


Field Summary
protected static L10N L
           
 
Constructor Summary
Pattern()
           
 
Method Summary
 void addChild(Pattern child)
          Adds an element child.
 void addNameChild(NameClassPattern child)
          Adds a name child.
 Item createItem(GrammarPattern grammar)
          Creates the current state
 NameClassItem createNameItem()
          Creates the name program
 void endElement()
          Ends the element.
abstract  boolean equals(java.lang.Object o)
           
 RelaxException error(java.lang.String msg)
          creates an error.
 java.lang.String getElementName()
          Returns the element-name.
 java.lang.String getLocation()
          Gets the location.
 Pattern getParent()
          Gets the parent.
 java.lang.String getTagName()
          Returns the relax config name.
 boolean hasData()
          Returns true if it contains a data element.
 boolean hasElement()
          Returns true if it contains an element.
 void setElementName(java.lang.String elementName)
          Sets the element-name.
 void setFilename(java.lang.String filename)
          Sets the pattern source location.
 void setLine(int line)
          Sets the pattern line
 void setParent(Pattern parent)
          Sets the parent.
 java.lang.String toProduction()
          Returns a string for the production.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

protected static final L10N L
Constructor Detail

Pattern

public Pattern()
Method Detail

getTagName

public java.lang.String getTagName()
Returns the relax config name.


setFilename

public void setFilename(java.lang.String filename)
Sets the pattern source location.


setLine

public void setLine(int line)
Sets the pattern line


getLocation

public java.lang.String getLocation()
Gets the location.


getElementName

public java.lang.String getElementName()
Returns the element-name.


setElementName

public void setElementName(java.lang.String elementName)
Sets the element-name.


setParent

public void setParent(Pattern parent)
               throws RelaxException
Sets the parent.

Throws:
RelaxException

getParent

public Pattern getParent()
Gets the parent.


hasData

public boolean hasData()
Returns true if it contains a data element.


hasElement

public boolean hasElement()
Returns true if it contains an element.


addNameChild

public void addNameChild(NameClassPattern child)
                  throws RelaxException
Adds a name child.

Throws:
RelaxException

addChild

public void addChild(Pattern child)
              throws RelaxException
Adds an element child.

Throws:
RelaxException

endElement

public void endElement()
                throws RelaxException
Ends the element.

Throws:
RelaxException

createItem

public Item createItem(GrammarPattern grammar)
                throws RelaxException
Creates the current state

Throws:
RelaxException

createNameItem

public NameClassItem createNameItem()
                             throws RelaxException
Creates the name program

Throws:
RelaxException

equals

public abstract boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toProduction

public java.lang.String toProduction()
Returns a string for the production.


error

public RelaxException error(java.lang.String msg)
creates an error.