KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsdl > symbolTable > DefinedType


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis.wsdl.symbolTable;
17
18 import org.w3c.dom.Node JavaDoc;
19
20 import javax.xml.namespace.QName JavaDoc;
21
22 /**
23  * This Type is for a QName that is a complex or simple type, these types are
24  * always emitted.
25  */

26 public class DefinedType extends Type {
27
28     // cache lookups for our base type
29

30     /** Field extensionBase */
31     protected TypeEntry extensionBase;
32     
33     /** Field searchedForExtensionBase */
34     protected boolean searchedForExtensionBase = false;
35
36     /**
37      * Constructor DefinedType
38      *
39      * @param pqName
40      * @param pNode
41      */

42     public DefinedType(QName JavaDoc pqName, Node JavaDoc pNode) {
43         super(pqName, pNode);
44     }
45
46     /**
47      * Constructor DefinedType
48      *
49      * @param pqName
50      * @param refType
51      * @param pNode
52      * @param dims
53      */

54     public DefinedType(QName JavaDoc pqName, TypeEntry refType, Node JavaDoc pNode,
55                        String JavaDoc dims) {
56         super(pqName, refType, pNode, dims);
57     }
58
59     /**
60      * Get a TypeEntry for the base type of this type, if one exists.
61      *
62      * @param symbolTable a <code>SymbolTable</code> value
63      * @return a <code>TypeEntry</code> value
64      */

65     public TypeEntry getComplexTypeExtensionBase(SymbolTable symbolTable) {
66
67         if(!searchedForExtensionBase) {
68             if (null == extensionBase) {
69                 extensionBase =
70                         SchemaUtils.getComplexElementExtensionBase(getNode(),
71                                 symbolTable);
72             }
73             searchedForExtensionBase = true;
74         }
75
76         return extensionBase;
77     }
78 }
79
Popular Tags