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