KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > webservice > metadata > jaxrpcmapping > JavaXmlTypeMapping


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.webservice.metadata.jaxrpcmapping;
8
9 // $Id: JavaXmlTypeMapping.java,v 1.6.4.2 2005/06/17 22:31:50 tdiesler Exp $
10

11 import javax.xml.namespace.QName JavaDoc;
12 import java.util.ArrayList JavaDoc;
13
14 /**
15  * XML mapping of the java-wsdl-mapping/java-xml-type-mapping element.
16  *
17  * @author Thomas.Diesler@jboss.org
18  * @since 14-May-2004
19  */

20 public class JavaXmlTypeMapping
21 {
22    // The parent <java-wsdl-mapping> element
23
private JavaWsdlMapping javaWsdlMapping;
24
25    /** The required <java-type> element
26     * The java-type element is the fully qualified class name of a Java class.
27     */

28    private String JavaDoc javaType;
29    // The choice <root-type-qname> element
30
private QName JavaDoc rootTypeQName;
31    // The choice <anonymous-type-qname> element
32
private QName JavaDoc anonymousTypeQName;
33
34    /** The required <qname-scope> element
35     * The qname-scope elements scopes the reference of a QName to the WSDL element type it applies to.
36     * The value of qname-scope may be simpleType, complexType, or element
37     */

38    private String JavaDoc qnameScope;
39
40    // Zero or more <variable-mapping> elements
41
private ArrayList JavaDoc variableMappings = new ArrayList JavaDoc();
42
43    public JavaXmlTypeMapping(JavaWsdlMapping javaWsdlMapping)
44    {
45       this.javaWsdlMapping = javaWsdlMapping;
46    }
47
48    public JavaWsdlMapping getJavaWsdlMapping()
49    {
50       return javaWsdlMapping;
51    }
52
53    public String JavaDoc getJavaType()
54    {
55       return javaType;
56    }
57
58    public void setJavaType(String JavaDoc javaType)
59    {
60       this.javaType = javaType;
61    }
62
63    public String JavaDoc getQnameScope()
64    {
65       return qnameScope;
66    }
67
68    public void setQnameScope(String JavaDoc qnameScope)
69    {
70       this.qnameScope = qnameScope;
71    }
72
73    public QName JavaDoc getRootTypeQName()
74    {
75       return rootTypeQName;
76    }
77
78    public void setRootTypeQName(QName JavaDoc rootTypeQName)
79    {
80       this.rootTypeQName = rootTypeQName;
81    }
82
83    public QName JavaDoc getAnonymousTypeQName()
84    {
85       return anonymousTypeQName;
86    }
87
88    public void setAnonymousTypeQName(QName JavaDoc anonymousTypeQName)
89    {
90       this.anonymousTypeQName = anonymousTypeQName;
91    }
92
93    public VariableMapping[] getVariableMappings()
94    {
95       VariableMapping[] arr = new VariableMapping[variableMappings.size()];
96       variableMappings.toArray(arr);
97       return arr;
98    }
99
100    public void addVariableMapping(VariableMapping variableMapping)
101    {
102       variableMappings.add(variableMapping);
103    }
104
105    public String JavaDoc toString()
106    {
107       return "[qname=" + rootTypeQName + ",javaType=" + javaType + ",scope=" + qnameScope + "]";
108    }
109 }
110
Popular Tags