KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > xml > xmlc > metadata > DocumentSection


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  *
21  * $Id: DocumentSection.java,v 1.2 2005/01/26 08:29:24 jkjome Exp $
22  */

23
24 package org.enhydra.xml.xmlc.metadata;
25
26 import org.w3c.dom.Document JavaDoc;
27
28 /**
29  * Section that describes the structure of the document and attributes of the
30  * elements. This information is used to validate a document and to control
31  * code generate on specific elements in the document.
32  */

33 public class DocumentSection extends MetaDataElement {
34     /**
35      * Element name.
36      */

37     public static final String JavaDoc TAG_NAME = "document";
38
39     /**
40      * Constructor.
41      */

42     public DocumentSection(Document JavaDoc ownerDoc) {
43         super(ownerDoc, TAG_NAME);
44     }
45
46     /**
47      * Get the ElementDef child elements.
48      */

49     public ElementDef[] getElementDef() {
50         return (ElementDef[])getChildren(ElementDef.class);
51     }
52
53     /**
54      * Add a ElementDef child element.
55      */

56     public void addElementDef(ElementDef elementDef) {
57         appendChild(elementDef);
58     }
59
60     /**
61      * Delete a ElementDef child element.
62      */

63     public void deleteElementDef(ElementDef elementDef) {
64         removeChild(elementDef);
65     }
66
67     /**
68      * Get the TagClass child elements.
69      */

70     public TagClass[] getTagClass() {
71         return (TagClass[])getChildren(TagClass.class);
72     }
73
74     /**
75      * Add a TagClass child element.
76      */

77     public void addTagClass(TagClass tagClass) {
78         appendChild(tagClass);
79     }
80
81     /**
82      * Delete a TagClass child element.
83      */

84     public void deleteTagClass(TagClass tagClass) {
85         removeChild(tagClass);
86     }
87 }
88
Popular Tags