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: NonLazyElement.java,v 1.6 2004/06/25 08:03:41 maartenc Exp $ 8 */ 9 10 package org.dom4j.util; 11 12 import org.dom4j.Namespace; 13 import org.dom4j.QName; 14 import org.dom4j.tree.BaseElement; 15 16 /*** <p><code>NonLazyElement</code> is the default DOM4J default implementation 17 * of an XML element.</p> 18 * 19 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a> 20 * @version $Revision: 1.6 $ 21 */ 22 public class NonLazyElement extends BaseElement { 23 24 public NonLazyElement(String name) { 25 super(name); 26 this.attributes = createAttributeList(); 27 this.content = createContentList(); 28 } 29 30 public NonLazyElement(QName qname) { 31 super(qname); 32 this.attributes = createAttributeList(); 33 this.content = createContentList(); 34 } 35 36 public NonLazyElement(String name, Namespace namespace) { 37 super(name, namespace); 38 this.attributes = createAttributeList(); 39 this.content = createContentList(); 40 } 41 42 public NonLazyElement(QName qname, int attributeCount) { 43 super(qname); 44 this.attributes = createAttributeList( attributeCount ); 45 this.content = createContentList(); 46 } 47 48 } 49 50 51 52 53 /* 54 * Redistribution and use of this software and associated documentation 55 * ("Software"), with or without modification, are permitted provided 56 * that the following conditions are met: 57 * 58 * 1. Redistributions of source code must retain copyright 59 * statements and notices. Redistributions must also contain a 60 * copy of this document. 61 * 62 * 2. Redistributions in binary form must reproduce the 63 * above copyright notice, this list of conditions and the 64 * following disclaimer in the documentation and/or other 65 * materials provided with the distribution. 66 * 67 * 3. The name "DOM4J" must not be used to endorse or promote 68 * products derived from this Software without prior written 69 * permission of MetaStuff, Ltd. For written permission, 70 * please contact dom4j-info@metastuff.com. 71 * 72 * 4. Products derived from this Software may not be called "DOM4J" 73 * nor may "DOM4J" appear in their names without prior written 74 * permission of MetaStuff, Ltd. DOM4J is a registered 75 * trademark of MetaStuff, Ltd. 76 * 77 * 5. Due credit should be given to the DOM4J Project - 78 * http://www.dom4j.org 79 * 80 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS 81 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT 82 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 83 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 84 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 85 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 86 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 87 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 88 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 89 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 90 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 91 * OF THE POSSIBILITY OF SUCH DAMAGE. 92 * 93 * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved. 94 * 95 * $Id: NonLazyElement.java,v 1.6 2004/06/25 08:03:41 maartenc Exp $ 96 */