KickJava   Java API By Example, From Geeks To Geeks.

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


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: HTMLCyberStudioTagSet.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 /**
27  * Abobe CyberStudio proprietary tags. CyberStudio makes up a bunch of tags
28  * it expects to be ignored on display. It uses these for metadata and its
29  * all rather tacky. This returns lists of HTMLTagDef and HTMLAttrDef
30  * objects. It is not part of the DOM. Objects are immutable and a singleton.
31  */

32 class HTMLCyberStudioTagSet extends HTMLTagSetDef {
33     /**
34      * Singleton instance.
35      */

36     private static HTMLCyberStudioTagSet cyberStubioTagSet;
37
38     /**
39      * Constructor.
40      */

41     private HTMLCyberStudioTagSet() {
42         String JavaDoc[] csBlockTags = {
43             "csactionclass", "csactiondict", "csactionitem",
44             "csactionparam", "csactions", "csgroup",
45             "csimport", "csmagic", "cspart",
46             "csscriptdict", "cssequence", "cssequencer",
47             "cstrack"
48         };
49         for (int i = 0; i < csBlockTags.length; i++) {
50             // block
51
addTagDef(new HTMLTagDefImpl(csBlockTags[i], false, true,
52                                          false, false));
53         }
54
55         // block+inline
56
addTagDef(new HTMLTagDefImpl("csobj", true, true, false, false));
57
58         String JavaDoc[] csEmptyTags = {
59             "csbrowser", "csaction", "csactioncntl",
60             "csactionenum", "csgeneric", "csseqaction"
61         };
62         for (int i = 0; i < csEmptyTags.length; i++) {
63             // inline+empty+optclose
64
addTagDef(new HTMLTagDefImpl(csEmptyTags[i], true, false,
65                                          true, true));
66         }
67         setReadOnly();
68     }
69
70     /**
71      * Get the singleton instance of the tag set.
72      */

73     public static HTMLCyberStudioTagSet getTagSet() {
74         if (cyberStubioTagSet == null) {
75             cyberStubioTagSet = new HTMLCyberStudioTagSet();
76         }
77         return cyberStubioTagSet;
78     }
79 }
80
Popular Tags