KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dom4j > util > NonLazyElement


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.util;
9
10 import org.dom4j.Namespace;
11 import org.dom4j.QName;
12 import org.dom4j.tree.BaseElement;
13
14 /**
15  * <p>
16  * <code>NonLazyElement</code> is the default DOM4J default implementation of
17  * an XML element.
18  * </p>
19  *
20  * @author <a HREF="mailto:jstrachan@apache.org">James Strachan </a>
21  * @version $Revision: 1.8 $
22  */

23 public class NonLazyElement extends BaseElement {
24     public NonLazyElement(String JavaDoc 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 JavaDoc 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  * Redistribution and use of this software and associated documentation
51  * ("Software"), with or without modification, are permitted provided that the
52  * following conditions are met:
53  *
54  * 1. Redistributions of source code must retain copyright statements and
55  * notices. Redistributions must also contain a copy of this document.
56  *
57  * 2. Redistributions in binary form must reproduce the above copyright notice,
58  * this list of conditions and the following disclaimer in the documentation
59  * and/or other materials provided with the distribution.
60  *
61  * 3. The name "DOM4J" must not be used to endorse or promote products derived
62  * from this Software without prior written permission of MetaStuff, Ltd. For
63  * written permission, please contact dom4j-info@metastuff.com.
64  *
65  * 4. Products derived from this Software may not be called "DOM4J" nor may
66  * "DOM4J" appear in their names without prior written permission of MetaStuff,
67  * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
68  *
69  * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
70  *
71  * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
72  * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
73  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
74  * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
75  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
76  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
77  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
78  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
79  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
80  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
81  * POSSIBILITY OF SUCH DAMAGE.
82  *
83  * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
84  */

85
Popular Tags