001/* 002 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 003 * 004 * This software is open source. 005 * See the bottom of this file for the licence. 006 * 007 * $Id: NonLazyElement.java,v 1.2 2001/06/25 15:57:32 jstrachan Exp $ 008 */ 009 010package org.dom4j.util; 011 012import java.util.ArrayList; 013import java.util.Iterator; 014import java.util.List; 015import java.util.Map; 016 017import org.dom4j.Attribute; 018import org.dom4j.Branch; 019import org.dom4j.Element; 020import org.dom4j.Entity; 021import org.dom4j.Node; 022import org.dom4j.Namespace; 023import org.dom4j.QName; 024import org.dom4j.tree.BaseElement; 025 026/** <p><code>NonLazyElement</code> is the default DOM4J default implementation 027 * of an XML element.</p> 028 * 029 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a> 030 * @version $Revision: 1.2 $ 031 */ 032public class NonLazyElement extends BaseElement { 033 034 public NonLazyElement(String name) { 035 super(name); 036 this.attributes = createAttributeList(); 037 this.content = createContentList(); 038 } 039 040 public NonLazyElement(QName qname) { 041 super(qname); 042 this.attributes = createAttributeList(); 043 this.content = createContentList(); 044 } 045 046 public NonLazyElement(String name, Namespace namespace) { 047 super(name, namespace); 048 this.attributes = createAttributeList(); 049 this.content = createContentList(); 050 } 051 052 public NonLazyElement(QName qname, int attributeCount) { 053 super(qname); 054 this.attributes = createAttributeList( attributeCount ); 055 this.content = createContentList(); 056 } 057 058} 059 060 061 062 063/* 064 * Redistribution and use of this software and associated documentation 065 * ("Software"), with or without modification, are permitted provided 066 * that the following conditions are met: 067 * 068 * 1. Redistributions of source code must retain copyright 069 * statements and notices. Redistributions must also contain a 070 * copy of this document. 071 * 072 * 2. Redistributions in binary form must reproduce the 073 * above copyright notice, this list of conditions and the 074 * following disclaimer in the documentation and/or other 075 * materials provided with the distribution. 076 * 077 * 3. The name "DOM4J" must not be used to endorse or promote 078 * products derived from this Software without prior written 079 * permission of MetaStuff, Ltd. For written permission, 080 * please contact dom4j-info@metastuff.com. 081 * 082 * 4. Products derived from this Software may not be called "DOM4J" 083 * nor may "DOM4J" appear in their names without prior written 084 * permission of MetaStuff, Ltd. DOM4J is a registered 085 * trademark of MetaStuff, Ltd. 086 * 087 * 5. Due credit should be given to the DOM4J Project 088 * (http://dom4j.org/). 089 * 090 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS 091 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT 092 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 093 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 094 * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 095 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 096 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 097 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 098 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 099 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 100 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 101 * OF THE POSSIBILITY OF SUCH DAMAGE. 102 * 103 * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved. 104 * 105 * $Id: NonLazyElement.java,v 1.2 2001/06/25 15:57:32 jstrachan Exp $ 106 */