public abstract class Item
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static L10N |
L |
protected static java.util.logging.Logger |
log |
Constructor and Description |
---|
Item() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected static final L10N L
protected static final java.util.logging.Logger log
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()
public Item startElement(QName name) throws RelaxException
name
- the name of the elementRelaxException
public boolean allowsElement(QName name)
name
- the name of the elementpublic 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 attributeRelaxException
public Item setAttribute(QName name, java.lang.String value) throws RelaxException
name
- the name of the attributevalue
- the value of the attributeRelaxException
public Item attributeEnd()
public Item text(java.lang.CharSequence text) throws RelaxException
RelaxException
public Item endElement() throws RelaxException
RelaxException
public java.lang.String toSyntaxDescription(int depth)
protected boolean isSimpleSyntax()
protected void addSyntaxNewline(CharBuffer cb, int depth)
protected RelaxException error(java.lang.String msg)