001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019: package org.netbeans.modules.xslt.model.impl;
020:
021: import java.math.BigDecimal;
022: import java.util.List;
023:
024: import javax.xml.namespace.QName;
025:
026: import org.netbeans.modules.xml.xam.dom.Attribute;
027: import org.netbeans.modules.xslt.model.ApplyTemplates;
028: import org.netbeans.modules.xslt.model.AsSpec;
029: import org.netbeans.modules.xslt.model.AttrValueTamplateHolder;
030: import org.netbeans.modules.xslt.model.AttributeSet;
031: import org.netbeans.modules.xslt.model.AttributeValueTemplate;
032: import org.netbeans.modules.xslt.model.CallTemplate;
033: import org.netbeans.modules.xslt.model.CharacterMap;
034: import org.netbeans.modules.xslt.model.CollationSpec;
035: import org.netbeans.modules.xslt.model.CopyNamespacesSpec;
036: import org.netbeans.modules.xslt.model.DisableOutputExcapingSpec;
037: import org.netbeans.modules.xslt.model.FormatSpec;
038: import org.netbeans.modules.xslt.model.XslModelReference;
039: import org.netbeans.modules.xslt.model.InheritNamespacesSpec;
040: import org.netbeans.modules.xslt.model.Key;
041: import org.netbeans.modules.xslt.model.LangSpec;
042: import org.netbeans.modules.xslt.model.NamespaceSpec;
043: import org.netbeans.modules.xslt.model.Output;
044: import org.netbeans.modules.xslt.model.Param;
045: import org.netbeans.modules.xslt.model.QualifiedNameable;
046: import org.netbeans.modules.xslt.model.SelectSpec;
047: import org.netbeans.modules.xslt.model.Sort;
048: import org.netbeans.modules.xslt.model.Stylesheet;
049: import org.netbeans.modules.xslt.model.Template;
050: import org.netbeans.modules.xslt.model.TestSpec;
051: import org.netbeans.modules.xslt.model.TypeSpec;
052: import org.netbeans.modules.xslt.model.UseAttributesSetsSpec;
053: import org.netbeans.modules.xslt.model.UseCharacterMapsSpec;
054: import org.netbeans.modules.xslt.model.ValidationSpec;
055: import org.netbeans.modules.xslt.model.enums.Annotaions;
056: import org.netbeans.modules.xslt.model.enums.DefaultValidation;
057: import org.netbeans.modules.xslt.model.enums.Standalone;
058: import org.netbeans.modules.xslt.model.enums.TBoolean;
059: import org.netbeans.modules.xslt.model.enums.Validation;
060:
061: /**
062: * @author ads
063: *
064: */
065: enum XslAttributes implements Attribute {
066: HREF(XslModelReference.HREF, String.class), VALIDATION(
067: ValidationSpec.VALIDATION, Validation.class), COPY_NAMESPACES(
068: CopyNamespacesSpec.COPY_NAMESPACES, TBoolean.class), TEST(
069: TestSpec.TEST, String.class), REQUIRED(Param.REQUIRED,
070: TBoolean.class), TUNNEL(Param.TUNNEL, TBoolean.class), ID(
071: Stylesheet.ID, String.class), MATCH(Template.MATCH,
072: String.class), MODE(ApplyTemplates.MODE, String.class), MODES(
073: Template.MODE, List.class, QName.class), // this is mode attribute in Template class, it has different value type
074: DISABLE_OUTPUT_ESCAPING(
075: DisableOutputExcapingSpec.DISABLE_OUTPUT_ESCAPING,
076: TBoolean.class), AVT_NAME(AttrValueTamplateHolder.NAME,
077: AttributeValueTemplate.class), NAMESPACE(
078: NamespaceSpec.NAMESPACE, AttributeValueTemplate.class), SELECT(
079: SelectSpec.SELECT, String.class), PRIORITY(
080: Template.PRIORITY, Double.class), NAME(
081: QualifiedNameable.NAME, QName.class), USE_ATTRIBUTE_SETS(
082: UseAttributesSetsSpec.USE_ATTRIBUTE_SETS, List.class,
083: AttributeSet.class), SEPARATOR(
084: org.netbeans.modules.xslt.model.Attribute.SEPARATOR,
085: AttributeValueTemplate.class), NAME_OF_CALL_TMPL(
086: CallTemplate.NAME, Template.class), COLLATION(
087: CollationSpec.COLLATION, String.class), INHERIT_NAMESPACES(
088: InheritNamespacesSpec.INHERIT_NAMESPACES, TBoolean.class), ENCODING(
089: Output.ENCODING, String.class), LANG(LangSpec.LANG,
090: AttributeValueTemplate.class), FORMAT(FormatSpec.FORMAT,
091: AttributeValueTemplate.class), INDENT(Output.INDENT,
092: TBoolean.class), STANDALONE(Output.STANDALONE,
093: Standalone.class), TYPE(TypeSpec.TYPE, QName.class), UNDECLARE_PREFIXES(
094: Output.UNDECLARE_PREFIXES, TBoolean.class), USE_CHARACTER_MAPS(
095: UseCharacterMapsSpec.USE_CHARACTER_MAPS, List.class,
096: CharacterMap.class), CASE_ORDER(Sort.CASE_ORDER,
097: AttributeValueTemplate.class), DATA_TYPE(Sort.DATA_TYPE,
098: AttributeValueTemplate.class), ORDER(Sort.ORDER,
099: AttributeValueTemplate.class), STABLE(Sort.STABLE,
100: TBoolean.class), USE(Key.USE, String.class), AS(AsSpec.AS,
101: String.class), XPATH_DEFAULT_NAMESPACE(
102: Stylesheet.XPATH_DEFAULT_NAMESPACE, String.class), VERSION(
103: Stylesheet.VERSION, BigDecimal.class), INPUT_TYPE_ANNOTAIONS(
104: Stylesheet.INPUT_TYPE_ANNOTAIONS, Annotaions.class), DEFAULT_VALIDATION(
105: Stylesheet.DEFAULT_VALIDATION, DefaultValidation.class), EXTENSION_ELEMENT_PREFIXES(
106: Stylesheet.EXTENSION_ELEMENT_PREFIXES, List.class,
107: String.class), DEFAULT_COLLATION(
108: Stylesheet.DEFAULT_COLLATION, List.class, String.class), EXCLUDE_RESULT_PREFIXES(
109: Stylesheet.EXCLUDE_RESULT_PREFIXES, List.class,
110: String.class), ;
111:
112: XslAttributes(String name, Class type, Class memberType) {
113: this .myName = name;
114: this .myType = type;
115: this .myMemberType = memberType;
116: }
117:
118: XslAttributes(String name, Class type) {
119: this (name, type, null);
120: }
121:
122: public String getName() {
123: return myName;
124: }
125:
126: public Class getType() {
127: return myType;
128: }
129:
130: public Class getMemberType() {
131: return myMemberType;
132: }
133:
134: private final String myName;
135: private final Class myType;
136: private final Class myMemberType;
137:
138: }
|