KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > generator > sg > SchemaSG


1 /*
2  * Copyright 2003, 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  */

17 package org.apache.ws.jaxme.generator.sg;
18
19 import java.util.List JavaDoc;
20
21 import org.apache.ws.jaxme.js.JavaSourceFactory;
22 import org.apache.ws.jaxme.xs.jaxb.JAXBJavaType;
23 import org.apache.ws.jaxme.xs.xml.XsQName;
24 import org.apache.ws.jaxme.generator.sg.GroupSG;
25 import org.apache.ws.jaxme.generator.sg.ObjectSG;
26 import org.apache.ws.jaxme.generator.sg.SGItem;
27 import org.apache.ws.jaxme.generator.sg.TypeSG;
28 import org.w3c.dom.Document JavaDoc;
29 import org.xml.sax.SAXException JavaDoc;
30
31
32 /** <p>Interface of a source generator for the whole schema.</p>
33  * <p>
34  * Specifies the source representing a complete schema.
35  * The actual generation of the concrete source files
36  * is delegated to the <code>JavaSourceFactory</code>
37  * available by calling {@link #getJavaSourceFactory}.
38  * Various portions of the source artifacts are made
39  * available through property accessors.
40  * </p>
41  *
42  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
43  */

44 public interface SchemaSG extends SGItem {
45   /** <p>Returns the schemas global types.</p>
46    */

47   public TypeSG[] getTypes() throws SAXException JavaDoc;
48
49   /** <p>Returns the schemas global type with the given name or
50    * null, if no such type exists.</p>
51    */

52   public TypeSG getType(XsQName pName) throws SAXException JavaDoc;
53
54   /** <p>Returns the schemas model groups.</p>
55    */

56   public GroupSG[] getGroups() throws SAXException JavaDoc;
57
58   /** <p>Returns the schemas global group with the given name or
59    * null, if no such type exists.</p>
60    */

61   public GroupSG getGroup(XsQName pName) throws SAXException JavaDoc;
62
63   /** <p>Returns the schemas global attributes and elements.</p>
64    */

65   public ObjectSG[] getObjects() throws SAXException JavaDoc;
66
67   /** <p>Returns the schemas global element with the given name or
68    * null, if no such element exists.</p>
69    */

70   public ObjectSG getElement(XsQName pName) throws SAXException JavaDoc;
71
72   /** <p>Returns the schemas global elements.</p>
73    */

74   public ObjectSG[] getElements() throws SAXException JavaDoc;
75
76   /** <p>Returns the schemas collection type, as specified by the
77    * JAXB globalBindings tag.</p>
78    */

79   public String JavaDoc getCollectionType();
80
81   /** <p>Returns the schemas {@link org.apache.ws.jaxme.js.JavaSourceFactory}.</p>
82    */

83   public JavaSourceFactory getJavaSourceFactory();
84
85   /** <p>Performs the source generation.</p>
86    */

87   public void generate() throws SAXException JavaDoc;
88
89   /** <p>Returns whether the schema prefers model group binding style or not.
90    * Defaults to false.</p>
91    */

92   public boolean isBindingStyleModelGroup();
93
94   /** <p>Returns whether the value "choiceContentProperty" is enabled.
95    * Defaults to false.</p>
96    */

97   public boolean isChoiceContentProperty();
98
99   /** <p>Returns whether the property "enableFailFastCheck" is enabled.
100    * Defaults to false.</p>
101    */

102   public boolean isFailFastCheckEnabled();
103
104   /** <p>Returns whether the property "enableJavaConventions" is enabled.
105    * Defaults to true.</p>
106    */

107   public boolean isJavaNamingConventionsEnabled();
108
109   /** <p>Returns whether the property "isFixedAttributeConstantProperty" is
110    * enabled. Defaults to false.</p>
111    */

112   public boolean isFixedAttributeConstantProperty();
113
114   /** <p>Returns whether the property "generateIsSetMethod" is enabled.
115    * Defaults to false.</p>
116    */

117   public boolean isGeneratingIsSetMethod();
118
119   /** <p>Returns whether the property "underscoreBinding" has the value
120    * "asWordSeparator". Defaults to true.</p>
121    */

122   public boolean isUnderscoreWordSeparator();
123
124   /** <p>Returns the globally configured instances of {@link JAXBJavaType}.</p>
125    */

126   public JAXBJavaType[] getJAXBJavaTypes();
127
128   /** <p>Returns the globally configured value for <code>typesafeenumbase</code>.</p>
129    */

130   public XsQName[] getTypesafeEnumBase();
131
132   /** <p>Generates the "Configuration.xml" file as a DOM node. Event
133    * handlers may modify the DOM node.</p>
134    * @param pPackageName The package, for which a configuration is being generated.
135    * @param pContextList A list of objects generated in the package.
136    */

137   public Document JavaDoc getConfigFile(String JavaDoc pPackageName, List JavaDoc pContextList) throws SAXException JavaDoc;
138
139   /** <p>Creates the "jaxb.properties" file.</p>
140    */

141   public void generateJaxbProperties() throws SAXException JavaDoc;
142 }
143
Popular Tags