KickJava   Java API By Example, From Geeks To Geeks.

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


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: HTMLTag.java,v 1.1.1.1 2003/03/10 16:36:23 taweili Exp $
22  */

23
24 package org.enhydra.xml.xmlc.metadata;
25
26 import org.w3c.dom.Document JavaDoc;
27
28 /**
29  * Add a proprietary tag to set of valid html tags.
30  */

31 public class HTMLTag extends MetaDataElement implements HTMLTagDef {
32     /**
33      * Element name.
34      */

35     public static final String JavaDoc TAG_NAME = "htmlTag";
36
37     /**
38      * Attribute names.
39      */

40     private static final String JavaDoc NAME_ATTR = "name";
41     private static final String JavaDoc INLINE_ATTR = "inline";
42     private static final String JavaDoc BLOCK_ATTR = "block";
43     private static final String JavaDoc EMPTY_ATTR = "empty";
44     private static final String JavaDoc OPT_CLOSE_ATTR = "optclose";
45
46     /**
47      * Constructor.
48      */

49     public HTMLTag(Document JavaDoc ownerDoc) {
50         super(ownerDoc, TAG_NAME);
51     }
52
53     /**
54      * Get the name attribute value.
55      */

56     public String JavaDoc getName() {
57         return getAttributeNull(NAME_ATTR);
58     }
59
60     /**
61      * Set the name attribute value.
62      */

63     public void setName(String JavaDoc value) {
64         setRemoveAttribute(NAME_ATTR, value);
65     }
66
67     /**
68      * Get the inline attribute value.
69      */

70     public boolean getInline() {
71         return getBooleanAttribute(INLINE_ATTR);
72     }
73
74     /**
75      * Set the inline attribute value.
76      */

77     public void setInline(boolean value) {
78         setBooleanAttribute(INLINE_ATTR, value);
79     }
80
81     /**
82      * Get the block attribute value.
83      */

84     public boolean getBlock() {
85         return getBooleanAttribute(BLOCK_ATTR);
86     }
87
88     /**
89      * Set the block attribute value.
90      */

91     public void setBlock(boolean value) {
92         setBooleanAttribute(BLOCK_ATTR, value);
93     }
94
95     /**
96      * Get the empty attribute value.
97      */

98     public boolean getEmpty() {
99         return getBooleanAttribute(EMPTY_ATTR);
100     }
101
102     /**
103      * Set the empty attribute value.
104      */

105     public void setEmpty(boolean value) {
106         setBooleanAttribute(EMPTY_ATTR, value);
107     }
108
109     /**
110      * Get the optclose attribute value.
111      */

112     public boolean getOptclose() {
113         return getBooleanAttribute(OPT_CLOSE_ATTR);
114     }
115
116     /**
117      * Set the optclose attribute value.
118      */

119     public void setOptclose(boolean value) {
120         setBooleanAttribute(OPT_CLOSE_ATTR, value);
121     }
122 }
123
124
Popular Tags