KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsdl > gen > GeneratorFactory


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.gen;
17
18 import org.apache.axis.wsdl.symbolTable.BaseTypeMapping;
19 import org.apache.axis.wsdl.symbolTable.SymbolTable;
20 import org.apache.axis.wsdl.symbolTable.TypeEntry;
21
22 import javax.wsdl.Binding;
23 import javax.wsdl.Definition;
24 import javax.wsdl.Message;
25 import javax.wsdl.PortType;
26 import javax.wsdl.Service;
27
28 /**
29  * Generator and Generatoractory are part of the generator framework.
30  * Folks who want to use the emitter to generate stuff from WSDL should
31  * do 3 things:
32  * 1. Write implementations of the Generator interface, one each fo
33  * Message, PortType, Binding, Service, and Type. These
34  * implementations generate the stuff for each of these WSDL types.
35  * 2. Write an implementation of the GeneratorFactory interface that
36  * returns instantiations of these Generator implementations as
37  * appropriate.
38  * 3. Implement a class with a main method (like WSDL2Java) that
39  * instantiates an Emitter and passes it the GeneratorFactory
40  * implementation.
41  */

42 public interface GeneratorFactory {
43
44     /**
45      * Allow the Generator extension to make a pass through the
46      * symbol table doing any pre-generation logic, like creating
47      * the Java names for each object and constructing signature
48      * strings.
49      *
50      * @param def
51      * @param symbolTable
52      */

53     public void generatorPass(Definition def, SymbolTable symbolTable);
54
55     /**
56      * Get a Generator implementation that will generate bindings for the given Message.
57      *
58      * @param message
59      * @param symbolTable
60      * @return
61      */

62     public Generator getGenerator(Message message, SymbolTable symbolTable);
63
64     /**
65      * Get a Generator implementation that will generate bindings for the given PortType.
66      *
67      * @param portType
68      * @param symbolTable
69      * @return
70      */

71     public Generator getGenerator(PortType portType, SymbolTable symbolTable);
72
73     /**
74      * Get a Generator implementation that will generate bindings for the given Binding.
75      *
76      * @param binding
77      * @param symbolTable
78      * @return
79      */

80     public Generator getGenerator(Binding binding, SymbolTable symbolTable);
81
82     /**
83      * Get a Generator implementation that will generate bindings for the given Service.
84      *
85      * @param service
86      * @param symbolTable
87      * @return
88      */

89     public Generator getGenerator(Service service, SymbolTable symbolTable);
90
91     /**
92      * Get a Generator implementation that will generate bindings for the given Type.
93      *
94      * @param type
95      * @param symbolTable
96      * @return
97      */

98     public Generator getGenerator(TypeEntry type, SymbolTable symbolTable);
99
100     /**
101      * Get a Generator implementation that will generate anything that doesn't
102      * fit into the scope of any of the other Generators.
103      *
104      * @param definition
105      * @param symbolTable
106      * @return
107      */

108     public Generator getGenerator(Definition definition,
109                                   SymbolTable symbolTable);
110
111     /**
112      * Get TypeMapping to use for translating
113      * QNames to base types
114      *
115      * @param btm
116      */

117     public void setBaseTypeMapping(BaseTypeMapping btm);
118
119     /**
120      * Method getBaseTypeMapping
121      *
122      * @return
123      */

124     public BaseTypeMapping getBaseTypeMapping();
125 }
126
Popular Tags