KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xslt > model > impl > XslAttributes


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xslt.model.impl;
20
21 import java.math.BigDecimal JavaDoc;
22 import java.util.List JavaDoc;
23
24 import javax.xml.namespace.QName JavaDoc;
25
26 import org.netbeans.modules.xml.xam.dom.Attribute;
27 import org.netbeans.modules.xslt.model.ApplyTemplates;
28 import org.netbeans.modules.xslt.model.AsSpec;
29 import org.netbeans.modules.xslt.model.AttrValueTamplateHolder;
30 import org.netbeans.modules.xslt.model.AttributeSet;
31 import org.netbeans.modules.xslt.model.AttributeValueTemplate;
32 import org.netbeans.modules.xslt.model.CallTemplate;
33 import org.netbeans.modules.xslt.model.CharacterMap;
34 import org.netbeans.modules.xslt.model.CollationSpec;
35 import org.netbeans.modules.xslt.model.CopyNamespacesSpec;
36 import org.netbeans.modules.xslt.model.DisableOutputExcapingSpec;
37 import org.netbeans.modules.xslt.model.FormatSpec;
38 import org.netbeans.modules.xslt.model.XslModelReference;
39 import org.netbeans.modules.xslt.model.InheritNamespacesSpec;
40 import org.netbeans.modules.xslt.model.Key;
41 import org.netbeans.modules.xslt.model.LangSpec;
42 import org.netbeans.modules.xslt.model.NamespaceSpec;
43 import org.netbeans.modules.xslt.model.Output;
44 import org.netbeans.modules.xslt.model.Param;
45 import org.netbeans.modules.xslt.model.QualifiedNameable;
46 import org.netbeans.modules.xslt.model.SelectSpec;
47 import org.netbeans.modules.xslt.model.Sort;
48 import org.netbeans.modules.xslt.model.Stylesheet;
49 import org.netbeans.modules.xslt.model.Template;
50 import org.netbeans.modules.xslt.model.TestSpec;
51 import org.netbeans.modules.xslt.model.TypeSpec;
52 import org.netbeans.modules.xslt.model.UseAttributesSetsSpec;
53 import org.netbeans.modules.xslt.model.UseCharacterMapsSpec;
54 import org.netbeans.modules.xslt.model.ValidationSpec;
55 import org.netbeans.modules.xslt.model.enums.Annotaions;
56 import org.netbeans.modules.xslt.model.enums.DefaultValidation;
57 import org.netbeans.modules.xslt.model.enums.Standalone;
58 import org.netbeans.modules.xslt.model.enums.TBoolean;
59 import org.netbeans.modules.xslt.model.enums.Validation;
60
61
62 /**
63  * @author ads
64  *
65  */

66 enum XslAttributes implements Attribute {
67     HREF( XslModelReference.HREF , String JavaDoc.class ),
68     VALIDATION( ValidationSpec.VALIDATION , Validation.class ),
69     COPY_NAMESPACES( CopyNamespacesSpec.COPY_NAMESPACES , TBoolean.class ),
70     TEST ( TestSpec.TEST , String JavaDoc.class),
71     REQUIRED( Param.REQUIRED , TBoolean.class ),
72     TUNNEL( Param.TUNNEL , TBoolean.class ),
73     ID( Stylesheet.ID , String JavaDoc.class ),
74     MATCH( Template.MATCH , String JavaDoc.class ),
75     MODE ( ApplyTemplates.MODE , String JavaDoc.class ),
76     MODES( Template.MODE, List JavaDoc.class , QName JavaDoc.class ), // this is mode attribute in Template class, it has different value type
77
DISABLE_OUTPUT_ESCAPING( DisableOutputExcapingSpec.DISABLE_OUTPUT_ESCAPING ,
78             TBoolean.class ),
79     AVT_NAME( AttrValueTamplateHolder.NAME , AttributeValueTemplate.class ),
80     NAMESPACE( NamespaceSpec.NAMESPACE , AttributeValueTemplate.class ),
81     SELECT( SelectSpec.SELECT , String JavaDoc.class ),
82     PRIORITY( Template.PRIORITY , Double JavaDoc.class ),
83     NAME( QualifiedNameable.NAME , QName JavaDoc.class ),
84     USE_ATTRIBUTE_SETS( UseAttributesSetsSpec.USE_ATTRIBUTE_SETS , List JavaDoc.class ,
85             AttributeSet.class ),
86     SEPARATOR( org.netbeans.modules.xslt.model.Attribute.SEPARATOR,
87             AttributeValueTemplate.class ),
88     NAME_OF_CALL_TMPL( CallTemplate.NAME , Template.class ),
89     COLLATION( CollationSpec.COLLATION , String JavaDoc.class ),
90     INHERIT_NAMESPACES( InheritNamespacesSpec.INHERIT_NAMESPACES, TBoolean.class ),
91     ENCODING( Output.ENCODING, String JavaDoc.class ),
92     LANG( LangSpec.LANG , AttributeValueTemplate.class ),
93     FORMAT( FormatSpec.FORMAT, AttributeValueTemplate.class ),
94     INDENT( Output.INDENT , TBoolean.class ),
95     STANDALONE( Output.STANDALONE , Standalone.class ),
96     TYPE( TypeSpec.TYPE , QName JavaDoc.class ),
97     UNDECLARE_PREFIXES( Output.UNDECLARE_PREFIXES, TBoolean.class ),
98     USE_CHARACTER_MAPS( UseCharacterMapsSpec.USE_CHARACTER_MAPS , List JavaDoc.class ,
99             CharacterMap.class ),
100     CASE_ORDER( Sort.CASE_ORDER , AttributeValueTemplate.class ),
101     DATA_TYPE( Sort.DATA_TYPE , AttributeValueTemplate.class ),
102     ORDER( Sort.ORDER, AttributeValueTemplate.class ),
103     STABLE( Sort.STABLE , TBoolean.class ),
104     USE( Key.USE , String JavaDoc.class ),
105     AS( AsSpec.AS, String JavaDoc.class ),
106     XPATH_DEFAULT_NAMESPACE( Stylesheet.XPATH_DEFAULT_NAMESPACE , String JavaDoc.class ),
107     VERSION( Stylesheet.VERSION , BigDecimal JavaDoc.class ),
108     INPUT_TYPE_ANNOTAIONS( Stylesheet.INPUT_TYPE_ANNOTAIONS, Annotaions.class ),
109     DEFAULT_VALIDATION( Stylesheet.DEFAULT_VALIDATION, DefaultValidation.class ),
110     EXTENSION_ELEMENT_PREFIXES( Stylesheet.EXTENSION_ELEMENT_PREFIXES, List JavaDoc.class,
111             String JavaDoc.class ),
112     DEFAULT_COLLATION( Stylesheet.DEFAULT_COLLATION, List JavaDoc.class,
113             String JavaDoc.class ),
114     EXCLUDE_RESULT_PREFIXES( Stylesheet.EXCLUDE_RESULT_PREFIXES, List JavaDoc.class,
115             String JavaDoc.class ),
116     ;
117
118     XslAttributes(String JavaDoc name, Class JavaDoc type, Class JavaDoc memberType) {
119         this.myName = name;
120         this.myType = type;
121         this.myMemberType = memberType;
122     }
123         
124     XslAttributes( String JavaDoc name , Class JavaDoc type ) {
125         this( name , type , null );
126     }
127     
128     public String JavaDoc getName() {
129         return myName;
130     }
131     
132     public Class JavaDoc getType() {
133         return myType;
134     }
135     
136     public Class JavaDoc getMemberType() {
137         return myMemberType;
138     }
139     
140     private final String JavaDoc myName;
141     private final Class JavaDoc myType;
142     private final Class JavaDoc myMemberType;
143
144 }
145
Popular Tags