|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IUnmarshallingContext
User interface for deserializer from XML. This provides methods used to set up and control the marshalling process, as well as access to the unmarshalling object stack while unmarshalling.
Method Summary | |
---|---|
java.lang.String |
getDocumentName()
Return the supplied document name. |
int |
getStackDepth()
Get current unmarshalling object stack depth. |
java.lang.Object |
getStackObject(int depth)
Get object from unmarshalling stack. |
java.lang.Object |
getStackTop()
Get top object on unmarshalling stack. |
IUnmarshaller |
getUnmarshaller(java.lang.String mapname)
Find the unmarshaller for a particular class in the current context. |
java.lang.Object |
getUserContext()
Get the user context object. |
boolean |
isAt(java.lang.String ns,
java.lang.String name)
Check if next tag is start of element. |
boolean |
isEnd()
Check if next tag is an end tag. |
boolean |
isStart()
Check if next tag is a start tag. |
void |
popObject()
Pop unmarshalled object from stack. |
void |
pushObject(java.lang.Object obj)
Push created object to unmarshalling stack. |
void |
reset()
Reset unmarshalling information. |
void |
setDocument(java.io.InputStream ins,
java.lang.String enc)
Set document to be parsed from stream. |
void |
setDocument(java.io.InputStream ins,
java.lang.String name,
java.lang.String enc)
Set named document to be parsed from stream. |
void |
setDocument(java.io.Reader rdr)
Set document to be parsed from reader. |
void |
setDocument(java.io.Reader rdr,
java.lang.String name)
Set named document to be parsed from reader. |
void |
setUserContext(java.lang.Object obj)
Set a user context object. |
java.lang.Object |
unmarshalDocument(java.io.InputStream ins,
java.lang.String enc)
Unmarshal document from stream to object. |
java.lang.Object |
unmarshalDocument(java.io.InputStream ins,
java.lang.String name,
java.lang.String enc)
Unmarshal named document from stream to object. |
java.lang.Object |
unmarshalDocument(java.io.Reader rdr)
Unmarshal document from reader to object. |
java.lang.Object |
unmarshalDocument(java.io.Reader rdr,
java.lang.String name)
Unmarshal named document from reader to object. |
java.lang.Object |
unmarshalElement()
Unmarshal the current element. |
Method Detail |
---|
void setDocument(java.io.InputStream ins, java.lang.String enc) throws JiBXException
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
determined by parser
JiBXException
- if error creating parservoid setDocument(java.io.Reader rdr) throws JiBXException
rdr
- reader supplying document data
JiBXException
- if error creating parservoid setDocument(java.io.InputStream ins, java.lang.String name, java.lang.String enc) throws JiBXException
ins
- stream supplying document dataname
- document nameenc
- document input encoding, or null
if to be
determined by parser
JiBXException
- if error creating parservoid setDocument(java.io.Reader rdr, java.lang.String name) throws JiBXException
rdr
- reader supplying document dataname
- document name
JiBXException
- if error creating parservoid reset()
java.lang.Object unmarshalElement() throws JiBXException
JiBXException
- on any error (possibly wrapping other exception)java.lang.Object unmarshalDocument(java.io.InputStream ins, java.lang.String enc) throws JiBXException
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
determined by parser
JiBXException
- if error creating parserjava.lang.Object unmarshalDocument(java.io.Reader rdr) throws JiBXException
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
rdr
- reader supplying document data
JiBXException
- if error creating parserjava.lang.Object unmarshalDocument(java.io.InputStream ins, java.lang.String name, java.lang.String enc) throws JiBXException
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
ins
- stream supplying document dataname
- document nameenc
- document input encoding, or null
if to be
determined by parser
JiBXException
- if error creating parserjava.lang.Object unmarshalDocument(java.io.Reader rdr, java.lang.String name) throws JiBXException
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
rdr
- reader supplying document dataname
- document name
JiBXException
- if error creating parserjava.lang.String getDocumentName()
null
if none)boolean isAt(java.lang.String ns, java.lang.String name) throws JiBXException
ns
- namespace URI for expected element (may be null
or the empty string for the empty namespace)name
- element name expected
true
if at start of element with supplied name,
false
if not
JiBXException
- on any error (possibly wrapping other exception)boolean isStart() throws JiBXException
true
if at start of element, false
if
at end
JiBXException
- on any error (possibly wrapping other exception)boolean isEnd() throws JiBXException
true
if at end of element, false
if
at start
JiBXException
- on any error (possibly wrapping other exception)IUnmarshaller getUnmarshaller(java.lang.String mapname) throws JiBXException
mapname
- unmarshaller mapping name (generally the class name to be
handled, or abstract mapping type name)
JiBXException
- if unable to create unmarshallervoid setUserContext(java.lang.Object obj)
reset()
method,
so to make use of this you need to first call the appropriate version of
the setDocument()
method, then this method, and finally the
unmarshalElement()
method.
obj
- user context object, or null
if clearing existing
context objectgetUserContext()
java.lang.Object getUserContext()
null
if no context object
setsetUserContext(Object)
void pushObject(java.lang.Object obj)
obj
- object being unmarshalledvoid popObject() throws JiBXException
JiBXException
- if stack emptyint getStackDepth()
java.lang.Object getStackObject(int depth)
depth
- object depth in stack to be retrieved (must be in the range
of zero to the current depth minus one).
java.lang.Object getStackTop()
null
if none
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |