01: /*
02: * The contents of this file are subject to the terms of the Common Development
03: * and Distribution License (the License). You may not use this file except in
04: * compliance with the License.
05: *
06: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
07: * or http://www.netbeans.org/cddl.txt.
08: *
09: * 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.tmap.model.api;
20:
21: import org.netbeans.modules.xml.wsdl.model.extensions.bpel.PartnerLinkType;
22: import org.netbeans.modules.xml.wsdl.model.extensions.bpel.Role;
23: import org.netbeans.modules.xml.wsdl.model.Operation;
24: import org.netbeans.modules.xml.xam.dom.Attribute;
25: import org.netbeans.modules.xslt.tmap.model.impl.AttributesType;
26:
27: /**
28: *
29: * @author Vitaly Bychkov
30: * @version 1.0
31: */
32: public enum TMapAttributes implements Attribute {
33: // PARTNER_LINK_TYPE(PartnerLinkTypeReference.PARTNER_LINK_TYPE, QName.class),
34: // ROLE_NAME(PartnerLinkTypeReference.ROLE_NAME, String.class, AttributesType.AttrType.NCNAME),
35: // OPERATION_NAME(OperationReference.OPERATION_NAME, String.class, AttributesType.AttrType.NCNAME),
36: PARTNER_LINK_TYPE(PartnerLinkTypeReference.PARTNER_LINK_TYPE,
37: PartnerLinkType.class, AttributesType.AttrType.QNAME), ROLE_NAME(
38: PartnerLinkTypeReference.ROLE_NAME, Role.class,
39: AttributesType.AttrType.NCNAME), OPERATION_NAME(
40: OperationReference.OPERATION_NAME, Operation.class,
41: AttributesType.AttrType.NCNAME), TRANSFORM_JBI(
42: TransformerDescriptor.TRANSFORM_JBI, Boolean.class), INPUT_VARIABLE(
43: VariableDeclarator.INPUT_VARIABLE, String.class), OUTPUT_VARIABLE(
44: VariableDeclarator.OUTPUT_VARIABLE, String.class), SOURCE(
45: Transform.SOURCE, String.class), RESULT(Transform.RESULT,
46: String.class), TYPE(Param.TYPE, String.class), NAME(
47: Param.NAME, String.class), VALUE(Param.VALUE, String.class), FILE(
48: Transform.FILE, String.class);
49:
50: private String myName;
51: private Class myAttributeType;
52: private Class myAttributeTypeInContainer;
53: private AttributesType.AttrType myType;
54:
55: private TMapAttributes(String name, Class attrType, Class subtype) {
56: myName = name;
57: myAttributeType = attrType;
58: myAttributeTypeInContainer = subtype;
59: }
60:
61: private TMapAttributes(String name, Class attrType) {
62: this (name, attrType, (Class) null);
63: }
64:
65: private TMapAttributes(String name, Class attrType,
66: AttributesType.AttrType type) {
67: this (name, attrType);
68: myType = type;
69: }
70:
71: public String getName() {
72: return myName;
73: }
74:
75: public Class getType() {
76: return myAttributeType;
77: }
78:
79: public Class getMemberType() {
80: return myAttributeTypeInContainer;
81: }
82:
83: public AttributesType.AttrType getAttributeType() {
84: return myType;
85: }
86:
87: }
|