KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > wsdl > databinding > JavaTypeMapper


1 package org.apache.axis2.wsdl.databinding;
2
3
4
5
6 /*
7  * Copyright 2004,2005 The Apache Software Foundation.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Java type mapper implementation. It adds the following default mappings
22  * String xsd:string
23  * Boolean xsd:boolean
24  * boolean xsd:boolean
25  * Double xsd:double
26  * double xsd:double
27  * Long xsd:long
28  * long xsd:long
29  * Float xsd:float
30  * float xsd:float
31  * Integer xsd:int
32  * int xsd:int
33  * Short xsd:short
34  * short xsd:short
35  * Byte xsd:byte
36  * byte xsd:byte
37  * BigDecimal xsd:decimal
38  * GregorianCalendar xsd:timeInstant!
39  * Date xsd:date
40  * QName xsd:QName
41
42  */

43 public class JavaTypeMapper extends TypeMappingAdapter{
44
45     public JavaTypeMapper() {
46        //add the basic types to the table
47
// this.map.put(new QName(XSD_SCHEMA_URL,"string"),String.class.getName());
48
// this.map.put(new QName(XSD_SCHEMA_URL,"boolean"),Boolean.class.getName());
49
// this.map.put(new QName(XSD_SCHEMA_URL,"double"),Double.class.getName());
50
// this.map.put(new QName(XSD_SCHEMA_URL,"long"),Long.class.getName());
51
// this.map.put(new QName(XSD_SCHEMA_URL,"float"),Float.class.getName());
52
// this.map.put(new QName(XSD_SCHEMA_URL,"int"),Integer.class.getName());
53
// this.map.put(new QName(XSD_SCHEMA_URL,"short"),Short.class.getName());
54
// this.map.put(new QName(XSD_SCHEMA_URL,"byte"),Byte.class.getName());
55
// this.map.put(new QName(XSD_SCHEMA_URL,"decimal"),BigDecimal.class.getName());
56
// this.map.put(new QName(XSD_SCHEMA_URL,"date"),Date.class.getName());
57
// this.map.put(new QName(XSD_SCHEMA_URL,"QName"),QName.class.getName());
58
}
59
60     public String JavaDoc toString() {
61         return this.map.toString();
62     }
63 }
64
Popular Tags