public abstract class State
extends java.lang.Object
implements org.xml.sax.ContentHandler
Each State-derived class is responsible for a particular type of declaration of the grammar. For example, SequenceState is responsible for parsing <sequence> element of RELAX module.
State objects interact each other. There are two ways of interaction.
In this level of inheritance, contract is somewhat abstract.
SimpleState.
this class also provides:
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
baseURI
base URI for this state.
|
protected org.xml.sax.Locator |
location
Location of the start tag.
|
protected State |
parentState
parent state of this state.
|
GrammarReader |
reader
reader object who is the owner of this object.
|
protected StartTagInfo |
startTag
information of the start tag.
|
| Constructor and Description |
|---|
State() |
| Modifier and Type | Method and Description |
|---|---|
static void |
_assert(boolean b) |
protected Expression |
callInterceptExpression(Expression exp) |
void |
characters(char[] buffer,
int from,
int len) |
void |
endPrefixMapping(java.lang.String prefix) |
java.lang.String |
getBaseURI() |
org.xml.sax.Locator |
getLocation() |
State |
getParentState() |
StartTagInfo |
getStartTag() |
void |
ignorableWhitespace(char[] buffer,
int from,
int len) |
protected void |
init(GrammarReader reader,
State parentState,
StartTagInfo startTag) |
void |
processingInstruction(java.lang.String target,
java.lang.String data) |
void |
setDocumentLocator(org.xml.sax.Locator loc) |
void |
skippedEntity(java.lang.String name) |
void |
startDocument() |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri) |
protected void |
startSelf()
performs a task that should be done before reading any child elements.
|
protected State parentState
public GrammarReader reader
protected StartTagInfo startTag
protected org.xml.sax.Locator location
protected java.lang.String baseURI
public final State getParentState()
public StartTagInfo getStartTag()
public org.xml.sax.Locator getLocation()
public java.lang.String getBaseURI()
protected final void init(GrammarReader reader, State parentState, StartTagInfo startTag)
protected void startSelf()
public static void _assert(boolean b)
public void characters(char[] buffer,
int from,
int len)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionprotected final Expression callInterceptExpression(Expression exp)
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void ignorableWhitespace(char[] buffer,
int from,
int len)
throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void skippedEntity(java.lang.String name)
throws org.xml.sax.SAXException
skippedEntity in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic final void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator loc)
setDocumentLocator in interface org.xml.sax.ContentHandlerpublic void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
endPrefixMapping in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException