Purpose:Provide a runtime public interface for preserving unmapped content from an XML Document.
Responsibilities:
The XML Binder is a runtime class that allows an association to be maintained between the original XML Document and the Java Objects built from the Document. It allows unmapped content (such as comments, processing instructions or other unmapped elements and attributes) to be preserved. The XMLBinder is created through an XMLContext.
org.eclipse.persistence.oxm.XMLContext
| Modifier and Type | Field and Description |
|---|---|
| pack-priv XMLContext | |
| pack-priv DocumentPreservationPolicy | |
| pack-priv XMLMarshaller | |
| pack-priv DOMReader | |
| pack-priv SAXUnmarshaller | |
| pack-priv XMLUnmarshaller |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private XMLRoot | Returns: an XMLRoot instance encapsulating the given objectCreate an XMLRoot instance. |
| public DocumentPreservationPolicy | Returns: an instance of DocumentPreservationPolicyGets this XMLBinder's document preservation policy. |
| public ErrorHandler | |
| public XMLMarshaller | |
| public Object | |
| public Schema | |
| public Node | Returns: an XML Node used to construct the given object. Null if no node exists for this object.Gets the XML Node associated with the provided object. |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public Object | |
| public XMLRoot | |
| public void | updateObject(Node node)
Updates the object associated with the provided node to reflect any changed made to that node. |
| public void | |
| public void | |
| private void |
| context | back to summary |
|---|---|
| pack-priv XMLContext context | |
| documentPreservationPolicy | back to summary |
|---|---|
| pack-priv DocumentPreservationPolicy documentPreservationPolicy | |
| marshaller | back to summary |
|---|---|
| pack-priv XMLMarshaller marshaller | |
| reader | back to summary |
|---|---|
| pack-priv DOMReader reader | |
| saxUnmarshaller | back to summary |
|---|---|
| pack-priv SAXUnmarshaller saxUnmarshaller | |
| unmarshaller | back to summary |
|---|---|
| pack-priv XMLUnmarshaller unmarshaller | |
| XMLBinder | back to summary |
|---|---|
| public XMLBinder(XMLContext context) | |
| XMLBinder | back to summary |
|---|---|
| public XMLBinder(XMLContext context, XMLMarshaller marshaller, XMLUnmarshaller unmarshaller) | |
| buildXMLRootFromObject | back to summary |
|---|---|
| private XMLRoot buildXMLRootFromObject(Object obj) Create an XMLRoot instance. If the object is an instance of XMLRoot it will simply be returned. Otherwise, we will create a new XMLRoot using the object's descriptor default root element - any prefixes will be resolved - and the given object
| |
| getDocumentPreservationPolicy | back to summary |
|---|---|
| public DocumentPreservationPolicy getDocumentPreservationPolicy() Gets this XMLBinder's document preservation policy.
| |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() | |
| getMarshaller | back to summary |
|---|---|
| public XMLMarshaller getMarshaller() | |
| getObject | back to summary |
|---|---|
| public Object getObject(Node node) Gets the Java Object associated with the provided XML Node.
| |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() | |
| getXMLNode | back to summary |
|---|---|
| public Node getXMLNode(Object object) Gets the XML Node associated with the provided object.
| |
| initialize | back to summary |
|---|---|
| private void initialize() | |
| marshal | back to summary |
|---|---|
| public void marshal(Object obj, Node node) | |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler errorHandler) | |
| setMarshaller | back to summary |
|---|---|
| public void setMarshaller(XMLMarshaller marshaller) | |
| setSchema | back to summary |
|---|---|
| public void setSchema(Schema aSchema) | |
| unmarshal | back to summary |
|---|---|
| public Object unmarshal(Node node) This method will unmarshal the provided node into mapped java objects. The original node will be cached rather than thrown away.
| |
| unmarshal | back to summary |
|---|---|
| public XMLRoot unmarshal(Node node, Class<?> javaClass) | |
| updateObject | back to summary |
|---|---|
| public void updateObject(Node node) Updates the object associated with the provided node to reflect any changed made to that node. If this Binder has no object associated with the given node, then no operation is performed. | |
| updateXML | back to summary |
|---|---|
| public void updateXML(Object obj) This method will update the cached XML node for the provided object. If no node exists for this object, then no operation is performed. | |
| updateXML | back to summary |
|---|---|
| public void updateXML(Object obj, Node associatedNode) | |
| validateNode | back to summary |
|---|---|
| private void validateNode(Node node) | |