KickJava   Java API By Example, From Geeks To Geeks.

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


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: DOMEdits.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 containing DOM editing specifications. These are modifications
30  * done to elements in the DOM during the compilation of a document.
31  */

32 public class DOMEdits extends MetaDataElement {
33     /**
34      * Element name.
35      */

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

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

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

55     public void addURLMapping(URLMapping urlMapping) {
56         appendChild(urlMapping);
57     }
58
59     /**
60      * Create and add a URLMapping child element.
61      */

62     public URLMapping addURLMapping() {
63         URLMapping urlMapping = new URLMapping(getOwnerDocument());
64         appendChild(urlMapping);
65         return urlMapping;
66     }
67
68     /**
69      * Delete a URLMapping child element.
70      */

71     public void deleteURLMapping(URLMapping urlMapping) {
72         removeChild(urlMapping);
73     }
74
75     /**
76      * Get the URLRegExpMapping child elements.
77      */

78     public URLRegExpMapping[] getURLRegExpMappings() {
79         return (URLRegExpMapping[])getChildren(URLRegExpMapping.class);
80     }
81
82     /**
83      * Add a URLRegExpMapping child element.
84      */

85     public void addURLRegExpMapping(URLRegExpMapping urlRegExpMapping) {
86         appendChild(urlRegExpMapping);
87     }
88
89     /**
90      * Create and add a URLRegExpMapping child element.
91      */

92     public URLRegExpMapping addURLRegExpMapping() {
93         URLRegExpMapping urlRegExpMapping
94             = new URLRegExpMapping(getOwnerDocument());
95         appendChild(urlRegExpMapping);
96         return urlRegExpMapping;
97     }
98
99     /**
100      * Delete a URLRegExpMapping child element.
101      */

102     public void deleteURLRegExpMapping(URLRegExpMapping urlRegExpMapping) {
103         removeChild(urlRegExpMapping);
104     }
105
106     /**
107      * Get the DeleteElement child elements.
108      */

109     public DeleteElement[] getDeleteElements() {
110         return (DeleteElement[])getChildren(DeleteElement.class);
111     }
112
113     /**
114      * Add a DeleteElement child element.
115      */

116     public void addDeleteElement(DeleteElement deleteElement) {
117         appendChild(deleteElement);
118     }
119
120     /**
121      * Create and add a DeleteElement child element.
122      */

123     public DeleteElement addDeleteElement() {
124         DeleteElement deleteElement = new DeleteElement(getOwnerDocument());
125         appendChild(deleteElement);
126         return deleteElement;
127     }
128
129     /**
130      * Delete a DeleteElement child element.
131      */

132     public void deleteDeleteElement(DeleteElement deleteElement) {
133         removeChild(deleteElement);
134     }
135 }
136
Popular Tags