com.caucho.relaxng.program
Class MemoItem

java.lang.Object
  extended by com.caucho.relaxng.program.Item
      extended by com.caucho.relaxng.program.MemoItem

public class MemoItem
extends Item

Generates programs from patterns.


Field Summary
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Constructor Summary
MemoItem(Item item)
           
MemoItem(Item item, LruCache<java.lang.Object,Item> memoMap)
           
 
Method Summary
 boolean allowAttribute(QName name, java.lang.String value)
          Sets an attribute.
 boolean allowEmpty()
          Returns true if the item can match empty.
 Item attributeEnd()
          Returns true if the item can match empty.
 void attributeSet(java.util.HashSet<QName> set)
          Adds to the first set, the set of attribute names possible.
 Item endElement()
          Returns the next item when the element closes
 void firstSet(java.util.HashSet<QName> set)
          Adds to the first set, the set of element names possible.
 java.util.Iterator<Item> getItemsIterator()
          Return all possible child items or null
 void requiredFirstSet(java.util.HashSet<QName> set)
          Adds to the first set, the set of element names possible.
 Item setAttribute(QName name, java.lang.String value)
          Sets an attribute.
 Item startElement(QName name)
          Returns the next item when an element of the given name is returned
 Item text(java.lang.CharSequence text)
          Adds text.
 
Methods inherited from class com.caucho.relaxng.program.Item
addSyntaxNewline, allowsElement, emptyItemIterator, error, groupContinuation, inElementContinuation, interleaveContinuation, isSimpleSyntax, itemIterator, toSyntaxDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

protected static final L10N L

log

protected static final java.util.logging.Logger log
Constructor Detail

MemoItem

public MemoItem(Item item,
                LruCache<java.lang.Object,Item> memoMap)

MemoItem

public MemoItem(Item item)
Method Detail

firstSet

public void firstSet(java.util.HashSet<QName> set)
Adds to the first set, the set of element names possible.

Overrides:
firstSet in class Item

requiredFirstSet

public void requiredFirstSet(java.util.HashSet<QName> set)
Adds to the first set, the set of element names possible.

Overrides:
requiredFirstSet in class Item

allowEmpty

public boolean allowEmpty()
Returns true if the item can match empty.

Overrides:
allowEmpty in class Item

getItemsIterator

public java.util.Iterator<Item> getItemsIterator()
Return all possible child items or null

Overrides:
getItemsIterator in class Item

startElement

public Item startElement(QName name)
                  throws RelaxException
Returns the next item when an element of the given name is returned

Overrides:
startElement in class Item
Parameters:
name - the name of the element
Returns:
the program for handling the element
Throws:
RelaxException

attributeSet

public void attributeSet(java.util.HashSet<QName> set)
Adds to the first set, the set of attribute names possible.

Overrides:
attributeSet in class Item

allowAttribute

public boolean allowAttribute(QName name,
                              java.lang.String value)
                       throws RelaxException
Sets an attribute.

Overrides:
allowAttribute in class Item
Parameters:
name - the name of the attribute
value - the value of the attribute
Returns:
the program for handling the element
Throws:
RelaxException

setAttribute

public Item setAttribute(QName name,
                         java.lang.String value)
                  throws RelaxException
Sets an attribute.

Overrides:
setAttribute in class Item
Parameters:
name - the name of the attribute
value - the value of the attribute
Returns:
the program for handling the element
Throws:
RelaxException

attributeEnd

public Item attributeEnd()
Returns true if the item can match empty.

Overrides:
attributeEnd in class Item

text

public Item text(java.lang.CharSequence text)
          throws RelaxException
Adds text.

Overrides:
text in class Item
Throws:
RelaxException

endElement

public Item endElement()
                throws RelaxException
Returns the next item when the element closes

Overrides:
endElement in class Item
Throws:
RelaxException