|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jour.rt.view.config.impl.runtime.SAXUnmarshallerHandlerImpl
Implementation of UnmarshallerHandler
.
This object converts SAX events into unmarshaller events and
cooridnates the entire unmarshalling process.
Constructor Summary | |
SAXUnmarshallerHandlerImpl(UnmarshallerImpl _parent,
GrammarInfo _gi)
|
Method Summary | |
void |
addPatcher(java.lang.Runnable job)
Adds a job that will be executed at the last of the unmarshalling. |
java.lang.String |
addToIdTable(java.lang.String id)
Adds the object which is currently being unmarshalled to the ID table. |
void |
characters(char[] buf,
int start,
int len)
|
void |
consumeAttribute(int idx)
Fires an attribute event for the specified attribute, and marks the attribute as "used". |
protected void |
consumeText(java.lang.String str,
boolean ignorable)
|
java.lang.String |
eatAttribute(int idx)
Marks the attribute as "used" and return the value of the attribute. |
void |
endDocument()
|
void |
endElement(java.lang.String uri,
java.lang.String local,
java.lang.String qname)
|
void |
endPrefixMapping(java.lang.String prefix)
|
java.lang.String[] |
getAllDeclaredPrefixes()
Returns a list of all in-scope prefixes. |
int |
getAttribute(java.lang.String uri,
java.lang.String local)
Gets the index of the attribute with the specified name. |
java.lang.String |
getBaseUri()
|
UnmarshallingEventHandler |
getCurrentHandler()
Gets the current handler. |
GrammarInfo |
getGrammarInfo()
Obtains a reference to the current grammar info. |
org.xml.sax.Locator |
getLocator()
Gets the current source location information. |
java.lang.String |
getNamespaceURI(java.lang.String prefix)
|
java.lang.String[] |
getNewlyDeclaredPrefixes()
Returns a list of prefixes newly declared on this element. |
java.lang.Object |
getObjectFromId(java.lang.String id)
Looks up the ID table and gets associated object. |
java.lang.String |
getPrefix(java.lang.String uri)
|
java.util.Iterator |
getPrefixes(java.lang.String uri)
|
java.lang.Object |
getResult()
|
com.sun.xml.bind.unmarshaller.Tracer |
getTracer()
Gets a tracer object. |
org.xml.sax.Attributes |
getUnconsumedAttributes()
Gets all the unconsumed attributes. |
void |
handleEvent(javax.xml.bind.ValidationEvent event,
boolean canRecover)
Reports an error to the user, and asks if s/he wants to recover. |
void |
ignorableWhitespace(char[] buf,
int start,
int len)
|
boolean |
isNotation(java.lang.String s)
|
boolean |
isUnparsedEntity(java.lang.String s)
|
void |
popAttributes()
Discards the previously stored attribute set. |
void |
popContentHandler()
Pops a content handler from the stack and registers it as the current content handler. |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
pushAttributes(org.xml.sax.Attributes atts,
boolean collectTextFlag)
Stores a new attribute set. |
void |
pushContentHandler(UnmarshallingEventHandler handler,
int memento)
Pushes the current content handler into the stack and registers the newly specified content handler so that it can receive SAX events. |
java.lang.String |
resolveNamespacePrefix(java.lang.String prefix)
|
void |
setDocumentLocator(org.xml.sax.Locator loc)
|
void |
setTracer(com.sun.xml.bind.unmarshaller.Tracer t)
|
void |
skippedEntity(java.lang.String name)
|
void |
startDocument()
|
void |
startElement(java.lang.String uri,
java.lang.String local,
java.lang.String qname,
org.xml.sax.Attributes atts)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SAXUnmarshallerHandlerImpl(UnmarshallerImpl _parent, GrammarInfo _gi)
Method Detail |
public GrammarInfo getGrammarInfo()
UnmarshallingContext
getGrammarInfo
in interface UnmarshallingContext
public void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public void startElement(java.lang.String uri, java.lang.String local, java.lang.String qname, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public final void endElement(java.lang.String uri, java.lang.String local, java.lang.String qname) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
public java.lang.Object getResult() throws javax.xml.bind.UnmarshalException
getResult
in interface javax.xml.bind.UnmarshallerHandler
javax.xml.bind.UnmarshalException
public void pushContentHandler(UnmarshallingEventHandler handler, int memento)
UnmarshallingContext
pushContentHandler
in interface UnmarshallingContext
memento
- When this newly specified handler will be removed from the stack,
the leaveChild event will be fired to the parent handler
with this memento.public void popContentHandler() throws org.xml.sax.SAXException
UnmarshallingContext
This method will also fire the leaveChild event with the associated memento.
popContentHandler
in interface UnmarshallingContext
org.xml.sax.SAXException
public UnmarshallingEventHandler getCurrentHandler()
UnmarshallingContext
getCurrentHandler
in interface UnmarshallingContext
protected void consumeText(java.lang.String str, boolean ignorable) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public final void characters(char[] buf, int start, int len)
characters
in interface org.xml.sax.ContentHandler
public final void ignorableWhitespace(char[] buf, int start, int len)
ignorableWhitespace
in interface org.xml.sax.ContentHandler
public void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
startPrefixMapping
in interface org.xml.sax.ContentHandler
public void endPrefixMapping(java.lang.String prefix)
endPrefixMapping
in interface org.xml.sax.ContentHandler
public java.lang.String resolveNamespacePrefix(java.lang.String prefix)
resolveNamespacePrefix
in interface UnmarshallingContext
public java.lang.String[] getNewlyDeclaredPrefixes()
UnmarshallingContext
UnmarshallingContext.pushAttributes(org.xml.sax.Attributes, boolean)
method is called.
getNewlyDeclaredPrefixes
in interface UnmarshallingContext
public java.lang.String[] getAllDeclaredPrefixes()
UnmarshallingContext
getAllDeclaredPrefixes
in interface UnmarshallingContext
public java.util.Iterator getPrefixes(java.lang.String uri)
getPrefixes
in interface javax.xml.namespace.NamespaceContext
public java.lang.String getPrefix(java.lang.String uri)
getPrefix
in interface javax.xml.namespace.NamespaceContext
public java.lang.String getNamespaceURI(java.lang.String prefix)
getNamespaceURI
in interface javax.xml.namespace.NamespaceContext
public void pushAttributes(org.xml.sax.Attributes atts, boolean collectTextFlag)
UnmarshallingContext
pushAttributes
in interface UnmarshallingContext
collectTextFlag
- false if the context doesn't need to fire text events
for texts inside this element. True otherwise.public void popAttributes()
UnmarshallingContext
popAttributes
in interface UnmarshallingContext
public org.xml.sax.Attributes getUnconsumedAttributes()
UnmarshallingContext
getUnconsumedAttributes
in interface UnmarshallingContext
public int getAttribute(java.lang.String uri, java.lang.String local)
UnmarshallingContext
getAttribute
in interface UnmarshallingContext
public void consumeAttribute(int idx) throws org.xml.sax.SAXException
UnmarshallingContext
consumeAttribute
in interface UnmarshallingContext
org.xml.sax.SAXException
public java.lang.String eatAttribute(int idx) throws org.xml.sax.SAXException
UnmarshallingContext
eatAttribute
in interface UnmarshallingContext
org.xml.sax.SAXException
public void addPatcher(java.lang.Runnable job)
UnmarshallingContext
addPatcher
in interface UnmarshallingContext
job
- The run method of this object is called.public java.lang.String addToIdTable(java.lang.String id)
UnmarshallingContext
addToIdTable
in interface UnmarshallingContext
public java.lang.Object getObjectFromId(java.lang.String id)
UnmarshallingContext
getObjectFromId
in interface UnmarshallingContext
public void skippedEntity(java.lang.String name)
skippedEntity
in interface org.xml.sax.ContentHandler
public void processingInstruction(java.lang.String target, java.lang.String data)
processingInstruction
in interface org.xml.sax.ContentHandler
public void setDocumentLocator(org.xml.sax.Locator loc)
setDocumentLocator
in interface org.xml.sax.ContentHandler
public org.xml.sax.Locator getLocator()
UnmarshallingContext
getLocator
in interface UnmarshallingContext
public void handleEvent(javax.xml.bind.ValidationEvent event, boolean canRecover) throws org.xml.sax.SAXException
SAXUnmarshallerHandler
handleEvent
in interface SAXUnmarshallerHandler
org.xml.sax.SAXException
public java.lang.String getBaseUri()
getBaseUri
in interface UnmarshallingContext
public boolean isUnparsedEntity(java.lang.String s)
isUnparsedEntity
in interface UnmarshallingContext
public boolean isNotation(java.lang.String s)
isNotation
in interface UnmarshallingContext
public void setTracer(com.sun.xml.bind.unmarshaller.Tracer t)
public com.sun.xml.bind.unmarshaller.Tracer getTracer()
UnmarshallingContext
getTracer
in interface UnmarshallingContext
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |