KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > net > axis > TypeMapping


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

7
8 // $Id: TypeMapping.java,v 1.5.6.1 2005/03/02 14:19:53 tdiesler Exp $
9

10 package org.jboss.net.axis;
11
12 import org.jboss.axis.deployment.wsdd.WSDDException;
13 import org.jboss.axis.deployment.wsdd.WSDDTypeMapping;
14 import org.jboss.axis.utils.LockableHashtable;
15 import org.w3c.dom.Element JavaDoc;
16
17 import java.util.Map JavaDoc;
18
19 /**
20  * A parameterizable typemapping.
21  * @author <a HREF="mailto:Christoph.Jung@infor.de">Christoph G. Jung</a>
22  * @created 06.04.2002
23  * @version $Revision: 1.5.6.1 $
24  */

25
26
27 public class TypeMapping extends WSDDTypeMapping
28 {
29
30    //
31
// Attributes
32
//
33

34    /** carries the options */
35    protected LockableHashtable parameters = new LockableHashtable();
36
37    //
38
// Constructors
39
//
40

41    /**
42     * Constructor for TypeMapping.
43     */

44    public TypeMapping()
45    {
46       super();
47    }
48
49    /**
50     * Constructor for TypeMapping.
51     * @param e
52     * @throws WSDDException
53     */

54    public TypeMapping(Element JavaDoc e) throws WSDDException
55    {
56       super(e);
57       readParams(e);
58    }
59
60    //
61
// protected helpers
62
//
63

64    /** reads out the additional parameter elements */
65    protected void readParams(Element JavaDoc e)
66    {
67       Element JavaDoc[] paramElements = getChildElements(e, "parameter");
68
69       for (int i = 0; i < paramElements.length; i++)
70       {
71          Element JavaDoc param = paramElements[i];
72          String JavaDoc pname = param.getAttribute("name");
73          String JavaDoc value = param.getAttribute("value");
74          String JavaDoc locked = param.getAttribute("locked");
75          parameters.put(pname,
76                  value,
77                  (locked != null && locked.equalsIgnoreCase("true")));
78       }
79
80    }
81
82    //
83
// public API
84
//
85

86    /** returns the set of parameters */
87    public Map JavaDoc getParametersTable()
88    {
89       return parameters;
90    }
91
92 } // TypeMapping
93
Popular Tags