32 /**
33 * Converts an element (and its descendants)
34 * from/to DOM (or similar) representation.
35 *
36 * <p>
37 * Implementations of this interface will be used in conjunction with
38 * {@link XmlAnyElement} annotation to map an element of XML into a representation
39 * of infoset such as W3C DOM.
40 *
41 * <p>
42 * Implementations hide how a portion of XML is converted into/from such
43 * DOM-like representation, allowing JAXB providers to work with arbitrary
44 * such library.
45 *
46 * <P>
47 * This interface is intended to be implemented by library writers
48 * and consumed by JAXB providers. None of those methods are intended to
49 * be called from applications.
50 *
51 * @author Kohsuke Kawaguchi
52 * @since JAXB2.0
53 */
54 public interface DomHandler<ElementT,ResultT extends Result> {
55 /**
56 * When a JAXB provider needs to unmarshal a part of a document into an
57 * infoset representation, it first calls this method to create a
58 * {@link Result} object.
59 *
60 * <p>
61 * A JAXB provider will then send a portion of the XML
62 * into the given result. Such a portion always form a subtree
63 * of the whole XML document rooted at an element.
64 *
65 * @param errorHandler
66 * if any error happens between the invocation of this method
67 * and the invocation of {@link #getElement(Result)}, they
68 * must be reported to this handler.
69 *
70 * The caller must provide a non-null error handler.
71 *
72 * The {@link Result} object created from this method
|
32 /**
33 * Converts an element (and its descendants)
34 * from/to DOM (or similar) representation.
35 *
36 * <p>
37 * Implementations of this interface will be used in conjunction with
38 * {@link XmlAnyElement} annotation to map an element of XML into a representation
39 * of infoset such as W3C DOM.
40 *
41 * <p>
42 * Implementations hide how a portion of XML is converted into/from such
43 * DOM-like representation, allowing JAXB providers to work with arbitrary
44 * such library.
45 *
46 * <P>
47 * This interface is intended to be implemented by library writers
48 * and consumed by JAXB providers. None of those methods are intended to
49 * be called from applications.
50 *
51 * @author Kohsuke Kawaguchi
52 * @since 1.6, JAXB 2.0
53 */
54 public interface DomHandler<ElementT,ResultT extends Result> {
55 /**
56 * When a JAXB provider needs to unmarshal a part of a document into an
57 * infoset representation, it first calls this method to create a
58 * {@link Result} object.
59 *
60 * <p>
61 * A JAXB provider will then send a portion of the XML
62 * into the given result. Such a portion always form a subtree
63 * of the whole XML document rooted at an element.
64 *
65 * @param errorHandler
66 * if any error happens between the invocation of this method
67 * and the invocation of {@link #getElement(Result)}, they
68 * must be reported to this handler.
69 *
70 * The caller must provide a non-null error handler.
71 *
72 * The {@link Result} object created from this method
|