|
BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.beanio.internal.parser.ParsingContext
org.beanio.internal.parser.UnmarshallingContext
org.beanio.internal.parser.format.xml.XmlUnmarshallingContext
public class XmlUnmarshallingContext
An UnmarshallingContext for an XML formatted record.
The record value type is a Document.
| Field Summary |
|---|
| Fields inherited from class org.beanio.internal.parser.ParsingContext |
|---|
MARSHALLING, UNMARSHALLING |
| Constructor Summary | |
|---|---|
XmlUnmarshallingContext(int groupDepth)
Constructs a new XmlUnmarshallingContext |
|
| Method Summary | |
|---|---|
Element |
findElement(XmlNode node)
Finds a child element of the current position. |
Document |
getDocument()
Returns the XML document object model (DOM) for the current record. |
Element |
getPosition()
Returns the current unmarshalled position in the DOM tree, or null if a node has not been matched yet. |
Element |
getPreviousElement()
Returns the last parsed DOM element for a field or bean collection. |
Iteration |
popIteration()
Pops the last Iteration pushed onto the stack. |
void |
popPosition()
Updates position to its parent (element), or null if the parent element is the document itself. |
void |
pushIteration(Iteration b)
Pushes an Iteration onto a stack for adjusting
field positions and indices. |
Element |
pushPosition(XmlNode node)
Updates position by finding a child of the current position that matches a given node. |
Element |
pushPosition(XmlNode node,
int depth,
boolean isGroup)
Updates position by finding a child of the current position that matches a given node. |
void |
setPreviousElement(Element e)
Sets the last parsed DOM element for a field or bean collection. |
void |
setRecordValue(Object value)
Sets the value of the record returned from the RecordReader |
Object |
toRecordValue(Node node)
Converts a Node to a record value. |
| Methods inherited from class org.beanio.internal.parser.ParsingContext |
|---|
createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, setLocal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlUnmarshallingContext(int groupDepth)
groupDepth - the maximum depth of an element mapped to a Group in the DOM| Method Detail |
|---|
public void setRecordValue(Object value)
UnmarshallingContext
setRecordValue in class UnmarshallingContextvalue - the record value read by a record readerRecordReaderpublic void pushIteration(Iteration b)
ParsingContextIteration onto a stack for adjusting
field positions and indices.
pushIteration in class ParsingContextb - the Iteration to pushParsingContext.popIteration()public Iteration popIteration()
ParsingContextIteration pushed onto the stack.
popIteration in class ParsingContextParsingContext.pushIteration(Iteration)public Element getPreviousElement()
public void setPreviousElement(Element e)
e - the last parsed elementpublic Document getDocument()
public Element getPosition()
pushPosition(XmlNode, int, boolean),
pushPosition(XmlNode)
public Element pushPosition(XmlNode node,
int depth,
boolean isGroup)
node - the XmlNode to matchdepth - the depth of the node in the DOM treeisGroup - whether the node is mapped to a Group
public Element pushPosition(XmlNode node)
node - the XmlNode to match
getPosition()public void popPosition()
getPosition()public Element findElement(XmlNode node)
node - the XmlNodeUtil
public Object toRecordValue(Node node)
UnmarshallingContextNode to a record value.
toRecordValue in class UnmarshallingContextnode - the Node to convert
|
BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||