|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.relaxng.program.Item
public abstract class Item
Generates programs from patterns.
Field Summary | |
---|---|
protected static L10N |
L
|
protected static java.util.logging.Logger |
log
|
Constructor Summary | |
---|---|
Item()
|
Method Summary | |
---|---|
protected void |
addSyntaxNewline(CharBuffer cb,
int depth)
Adds a syntax newline. |
boolean |
allowAttribute(QName name,
java.lang.String value)
Sets an attribute. |
boolean |
allowEmpty()
Returns true if the item can match empty. |
boolean |
allowsElement(QName name)
Returns true if the element is allowed somewhere in the item. |
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. |
protected java.util.Iterator<Item> |
emptyItemIterator()
|
Item |
endElement()
Returns the next item when the element closes |
protected RelaxException |
error(java.lang.String msg)
Throws an error. |
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 |
Item |
groupContinuation(Item cont)
Appends a group to a continuation. |
Item |
inElementContinuation(Item cont)
Interleaves a continuation. |
Item |
interleaveContinuation(Item cont)
Interleaves a continuation. |
protected boolean |
isSimpleSyntax()
Returns true for an element with simple syntax. |
protected java.util.Iterator<Item> |
itemIterator(Item item)
|
void |
requiredFirstSet(java.util.HashSet<QName> set)
Adds to the first set the set of element names required. |
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. |
java.lang.String |
toSyntaxDescription(int depth)
Returns the pretty printed syntax. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final L10N L
protected static final java.util.logging.Logger log
Constructor Detail |
---|
public Item()
Method Detail |
---|
public void firstSet(java.util.HashSet<QName> set)
public void requiredFirstSet(java.util.HashSet<QName> set)
public boolean allowEmpty()
public java.util.Iterator<Item> getItemsIterator()
protected java.util.Iterator<Item> emptyItemIterator()
protected java.util.Iterator<Item> itemIterator(Item item)
public Item startElement(QName name) throws RelaxException
name
- the name of the element
RelaxException
public boolean allowsElement(QName name)
name
- the name of the element
public void attributeSet(java.util.HashSet<QName> set)
public boolean allowAttribute(QName name, java.lang.String value) throws RelaxException
name
- the name of the attributevalue
- the value of the attribute
RelaxException
public Item setAttribute(QName name, java.lang.String value) throws RelaxException
name
- the name of the attributevalue
- the value of the attribute
RelaxException
public Item attributeEnd()
public Item text(java.lang.CharSequence text) throws RelaxException
RelaxException
public Item endElement() throws RelaxException
RelaxException
public Item interleaveContinuation(Item cont)
public Item inElementContinuation(Item cont)
public Item groupContinuation(Item cont)
public java.lang.String toSyntaxDescription(int depth)
protected boolean isSimpleSyntax()
protected void addSyntaxNewline(CharBuffer cb, int depth)
protected RelaxException error(java.lang.String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |