|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectastronomy.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 ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startElement(String uri,
String local,
String qname,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerSAXException
public final void endElement(String uri,
String local,
String qname)
throws SAXException
endElement in interface ContentHandlerSAXException
public Object getResult()
throws javax.xml.bind.UnmarshalException
getResult in interface javax.xml.bind.UnmarshallerHandlerjavax.xml.bind.UnmarshalException
public void pushContentHandler(UnmarshallingEventHandler handler,
int memento)
UnmarshallingContext
pushContentHandler in interface UnmarshallingContextmemento - 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
UnmarshallingContextThis method will also fire the leaveChild event with the associated memento.
popContentHandler in interface UnmarshallingContextSAXExceptionpublic 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 UnmarshallingContextstartPrefixMapping in interface ContentHandlerpublic void endPrefixMapping(String prefix)
UnmarshallingContext
endPrefixMapping in interface UnmarshallingContextendPrefixMapping in interface ContentHandlerpublic String resolveNamespacePrefix(String prefix)
resolveNamespacePrefix in interface org.relaxng.datatype.ValidationContextpublic Iterator getPrefixes(String uri)
getPrefixes in interface NamespaceContextpublic String getPrefix(String uri)
getPrefix in interface NamespaceContextpublic String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContext
public void pushAttributes(Attributes atts,
boolean collectTextFlag)
UnmarshallingContext
pushAttributes in interface UnmarshallingContextcollectTextFlag - 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 UnmarshallingContextpublic Attributes getUnconsumedAttributes()
UnmarshallingContext
getUnconsumedAttributes in interface UnmarshallingContext
public int getAttribute(String uri,
String local)
UnmarshallingContext
getAttribute in interface UnmarshallingContexturi,local - has to be interned.
public void consumeAttribute(int idx)
throws SAXException
UnmarshallingContext
consumeAttribute in interface UnmarshallingContextSAXException
public String eatAttribute(int idx)
throws SAXException
UnmarshallingContext
eatAttribute in interface UnmarshallingContextSAXExceptionpublic void addPatcher(Runnable job)
UnmarshallingContext
addPatcher in interface UnmarshallingContextjob - The run method of this object is called.public String addToIdTable(String id)
UnmarshallingContext
addToIdTable in interface UnmarshallingContextpublic Object getObjectFromId(String id)
UnmarshallingContext
getObjectFromId in interface UnmarshallingContextpublic void skippedEntity(String name)
skippedEntity in interface ContentHandler
public void processingInstruction(String target,
String data)
processingInstruction in interface ContentHandlerpublic void setDocumentLocator(Locator loc)
setDocumentLocator in interface ContentHandlerpublic Locator getLocator()
UnmarshallingContext
getLocator in interface UnmarshallingContext
public void handleEvent(javax.xml.bind.ValidationEvent event,
boolean canRecover)
throws SAXException
SAXUnmarshallerHandler
handleEvent in interface SAXUnmarshallerHandlerhandleEvent in interface UnmarshallingContextSAXExceptionpublic String getBaseUri()
getBaseUri in interface org.relaxng.datatype.ValidationContextpublic boolean isUnparsedEntity(String s)
isUnparsedEntity in interface org.relaxng.datatype.ValidationContextpublic boolean isNotation(String s)
isNotation in interface org.relaxng.datatype.ValidationContextpublic 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 | ||||||||