1 /*
2 * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
3 *
4 * This software is open source.
5 * See the bottom of this file for the licence.
6 *
7 * $Id: JAXBObjectHandler.java,v 1.1 2004/08/02 18:44:07 maartenc Exp $
8 */
9
10 package org.dom4j.jaxb;
11
12 import javax.xml.bind.Element;
13
14 /***
15 * JAXBObjectHandler implementations can be registered with the JAXB Reader
16 * in order to receive unmarshalled XML fragments.
17 *
18 * @author Wonne Keysers (Realsoftware.be)
19 */
20 public interface JAXBObjectHandler {
21
22 /***
23 * Called when the {@link JAXBReader} has finished parsing the xml path
24 * the handler was registered for. The provided object is the unmarshalled representation
25 * of the XML path. It can be casted to the appropriate implementation class that is
26 * generated by the JAXB compiler.
27 *
28 * @param jaxbElement the unmarshalled JAXB object to handle
29 * @throws Exception of any kind, thrown by the implementation
30 */
31 public void handleObject(Element jaxbElement) throws Exception;
32
33 }
34
35
36
37
38 /*
39 * Redistribution and use of this software and associated documentation
40 * ("Software"), with or without modification, are permitted provided
41 * that the following conditions are met:
42 *
43 * 1. Redistributions of source code must retain copyright
44 * statements and notices. Redistributions must also contain a
45 * copy of this document.
46 *
47 * 2. Redistributions in binary form must reproduce the
48 * above copyright notice, this list of conditions and the
49 * following disclaimer in the documentation and/or other
50 * materials provided with the distribution.
51 *
52 * 3. The name "DOM4J" must not be used to endorse or promote
53 * products derived from this Software without prior written
54 * permission of MetaStuff, Ltd. For written permission,
55 * please contact dom4j-info@metastuff.com.
56 *
57 * 4. Products derived from this Software may not be called "DOM4J"
58 * nor may "DOM4J" appear in their names without prior written
59 * permission of MetaStuff, Ltd. DOM4J is a registered
60 * trademark of MetaStuff, Ltd.
61 *
62 * 5. Due credit should be given to the DOM4J Project -
63 * http://www.dom4j.org
64 *
65 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
66 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
67 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
68 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
69 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
70 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
71 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
72 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
73 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
74 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
75 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
76 * OF THE POSSIBILITY OF SUCH DAMAGE.
77 *
78 * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
79 *
80 * $Id: JAXBObjectHandler.java,v 1.1 2004/08/02 18:44:07 maartenc Exp $
81 */