|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object astronomy.data.spectra.impl.runtime.SAXUnmarshallerHandlerImpl
public class 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(Runnable job)
Adds a job that will be executed at the last of the unmarshalling. |
String |
addToIdTable(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(String str,
boolean ignorable)
|
String |
eatAttribute(int idx)
Marks the attribute as "used" and return the value of the attribute. |
void |
endDocument()
|
void |
endElement(String uri,
String local,
String qname)
|
void |
endPrefixMapping(String prefix)
Removes a namespace declaration. |
int |
getAttribute(String uri,
String local)
Gets the index of the attribute with the specified name. |
String |
getBaseUri()
|
UnmarshallingEventHandler |
getCurrentHandler()
Gets the current handler. |
GrammarInfo |
getGrammarInfo()
Obtains a reference to the current grammar info. |
Locator |
getLocator()
Gets the current source location information. |
String |
getNamespaceURI(String prefix)
|
Object |
getObjectFromId(String id)
Looks up the ID table and gets associated object. |
String |
getPrefix(String uri)
|
Iterator |
getPrefixes(String uri)
|
Object |
getResult()
|
com.sun.xml.bind.unmarshaller.Tracer |
getTracer()
Gets a tracer object. |
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(String s)
|
boolean |
isUnparsedEntity(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(String target,
String data)
|
void |
pushAttributes(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. |
String |
resolveNamespacePrefix(String prefix)
|
void |
setDocumentLocator(Locator loc)
|
void |
setTracer(com.sun.xml.bind.unmarshaller.Tracer t)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String local,
String qname,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
Adds a new namespace declaration. |
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 SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startElement(String uri, String local, String qname, Attributes atts) throws SAXException
startElement
in interface ContentHandler
SAXException
public final void endElement(String uri, String local, String qname) throws SAXException
endElement
in interface ContentHandler
SAXException
public 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 SAXException
UnmarshallingContext
This method will also fire the leaveChild event with the associated memento.
popContentHandler
in interface UnmarshallingContext
SAXException
public UnmarshallingEventHandler getCurrentHandler()
UnmarshallingContext
getCurrentHandler
in interface UnmarshallingContext
protected void consumeText(String str, boolean ignorable) throws SAXException
SAXException
public final void characters(char[] buf, int start, int len)
characters
in interface ContentHandler
public final void ignorableWhitespace(char[] buf, int start, int len)
ignorableWhitespace
in interface ContentHandler
public void startPrefixMapping(String prefix, String uri)
UnmarshallingContext
startPrefixMapping
in interface UnmarshallingContext
startPrefixMapping
in interface ContentHandler
public void endPrefixMapping(String prefix)
UnmarshallingContext
endPrefixMapping
in interface UnmarshallingContext
endPrefixMapping
in interface ContentHandler
public String resolveNamespacePrefix(String prefix)
resolveNamespacePrefix
in interface org.relaxng.datatype.ValidationContext
public Iterator getPrefixes(String uri)
getPrefixes
in interface NamespaceContext
public String getPrefix(String uri)
getPrefix
in interface NamespaceContext
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface NamespaceContext
public void pushAttributes(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 Attributes getUnconsumedAttributes()
UnmarshallingContext
getUnconsumedAttributes
in interface UnmarshallingContext
public int getAttribute(String uri, String local)
UnmarshallingContext
getAttribute
in interface UnmarshallingContext
uri,local
- has to be interned.
public void consumeAttribute(int idx) throws SAXException
UnmarshallingContext
consumeAttribute
in interface UnmarshallingContext
SAXException
public String eatAttribute(int idx) throws SAXException
UnmarshallingContext
eatAttribute
in interface UnmarshallingContext
SAXException
public void addPatcher(Runnable job)
UnmarshallingContext
addPatcher
in interface UnmarshallingContext
job
- The run method of this object is called.public String addToIdTable(String id)
UnmarshallingContext
addToIdTable
in interface UnmarshallingContext
public Object getObjectFromId(String id)
UnmarshallingContext
getObjectFromId
in interface UnmarshallingContext
public void skippedEntity(String name)
skippedEntity
in interface ContentHandler
public void processingInstruction(String target, String data)
processingInstruction
in interface ContentHandler
public void setDocumentLocator(Locator loc)
setDocumentLocator
in interface ContentHandler
public Locator getLocator()
UnmarshallingContext
getLocator
in interface UnmarshallingContext
public void handleEvent(javax.xml.bind.ValidationEvent event, boolean canRecover) throws SAXException
SAXUnmarshallerHandler
handleEvent
in interface SAXUnmarshallerHandler
handleEvent
in interface UnmarshallingContext
SAXException
public String getBaseUri()
getBaseUri
in interface org.relaxng.datatype.ValidationContext
public boolean isUnparsedEntity(String s)
isUnparsedEntity
in interface org.relaxng.datatype.ValidationContext
public boolean isNotation(String s)
isNotation
in interface org.relaxng.datatype.ValidationContext
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 |