KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > impl > XSObjectFactoryImpl


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.xs.impl;
18
19 import org.apache.ws.jaxme.xs.XSAnnotation;
20 import org.apache.ws.jaxme.xs.XSAny;
21 import org.apache.ws.jaxme.xs.XSAppinfo;
22 import org.apache.ws.jaxme.xs.XSAttribute;
23 import org.apache.ws.jaxme.xs.XSAttributeGroup;
24 import org.apache.ws.jaxme.xs.XSDocumentation;
25 import org.apache.ws.jaxme.xs.XSElement;
26 import org.apache.ws.jaxme.xs.XSEnumeration;
27 import org.apache.ws.jaxme.xs.XSGroup;
28 import org.apache.ws.jaxme.xs.XSIdentityConstraint;
29 import org.apache.ws.jaxme.xs.XSKeyRef;
30 import org.apache.ws.jaxme.xs.XSNotation;
31 import org.apache.ws.jaxme.xs.XSObject;
32 import org.apache.ws.jaxme.xs.XSObjectFactory;
33 import org.apache.ws.jaxme.xs.XSSchema;
34 import org.apache.ws.jaxme.xs.XSSimpleContentType;
35 import org.apache.ws.jaxme.xs.XSSimpleType;
36 import org.apache.ws.jaxme.xs.XSType;
37 import org.apache.ws.jaxme.xs.XSWildcard;
38 import org.apache.ws.jaxme.xs.parser.XSContext;
39 import org.apache.ws.jaxme.xs.xml.*;
40 import org.xml.sax.SAXException JavaDoc;
41
42
43 /** <p>Default implementation of the {@link XSObjectFactory}.</p>
44  *
45  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
46  */

47 public class XSObjectFactoryImpl implements XSObjectFactory {
48   private static final XSAnnotation[] NO_ANNOTATIONS = new XSAnnotation[] {};
49
50   public XSLogicalParser newXSLogicalParser() {
51     return new XSLogicalParser();
52   }
53
54   public XSSchema newXSSchema(XSContext pContext, XsESchema pSchema) throws SAXException JavaDoc {
55     return new XSSchemaImpl(pContext, pSchema);
56   }
57
58   public XSAnnotation newXSAnnotation(XSObject pParent, XsEAnnotation pAnnotation) throws SAXException JavaDoc {
59     return new XSAnnotationImpl(pParent, pAnnotation);
60   }
61
62   public XSAnnotation[] newXSAnnotations(XSObject pParent, XsEAnnotation pAnnotation) throws SAXException JavaDoc {
63     if ( pAnnotation == null ) {
64       return NO_ANNOTATIONS;
65     } else {
66       return new XSAnnotation[] { newXSAnnotation(pParent, pAnnotation) };
67     }
68   }
69
70
71   public XSAppinfo newXSAppinfo(XSObject pParent, XsEAppinfo pAppinfo) {
72     return new XSAppinfoImpl(pParent, pAppinfo);
73   }
74
75   public XSSimpleType newXSAtomicType(XSType pParent, XSType pRestrictedType, XsERestriction pRestriction) throws SAXException JavaDoc {
76     return new XSAtomicTypeRestrictionImpl(pParent, pRestrictedType, pRestriction);
77   }
78
79   public XSSimpleType newXSAtomicType(XSType pParent, XSType pRestrictedType, XsTSimpleRestrictionType pRestriction) throws SAXException JavaDoc {
80     return new XSAtomicTypeRestrictionImpl(pParent, pRestrictedType, pRestriction);
81   }
82
83   public XSAttribute newXSAttribute(XSObject pParent, XsTAttribute pAttribute) throws SAXException JavaDoc {
84     return new XSAttributeImpl(pParent, pAttribute);
85   }
86
87   public XSAttributeGroup newXSAttributeGroup(XSObject pParent, XsTAttributeGroup pGroup) throws SAXException JavaDoc {
88     return new XSAttributeGroupImpl(pParent, pGroup);
89   }
90
91   public XSDocumentation newXSDocumentation(XSObject pParent, XsEDocumentation pDocumentation) throws SAXException JavaDoc {
92     return new XSDocumentationImpl(pParent, pDocumentation);
93   }
94
95   public XSElement newXSElement(XSObject pParent, XsTElement pElement) throws SAXException JavaDoc {
96     return new XSElementImpl(pParent, pElement);
97   }
98
99   public XSEnumeration newXSEnumeration(XSObject pParent, XsEEnumeration pEnumeration) throws SAXException JavaDoc {
100     return new XSEnumerationImpl(pParent, pEnumeration);
101   }
102
103   public XSGroup newXSGroup(XSObject pParent, XsTAll pAll) throws SAXException JavaDoc {
104     return new XSGroupImpl(pParent, pAll);
105   }
106
107   public XSGroup newXSGroup(XSObject pParent, XsEChoice pChoice) throws SAXException JavaDoc {
108     return new XSGroupImpl(pParent, pChoice);
109   }
110
111   public XSGroup newXSGroup(XSObject pParent, XsESequence pSequence) throws SAXException JavaDoc {
112     return new XSGroupImpl(pParent, pSequence);
113   }
114
115   public XSGroup newXSGroup(XSObject pParent, XsTGroupRef pGroupRef) throws SAXException JavaDoc {
116     return new XSGroupImpl(pParent, pGroupRef);
117   }
118
119   public XSGroup newXSGroup(XSObject pParent, XsTNamedGroup pNamedGroup) throws SAXException JavaDoc {
120     return new XSGroupImpl(pParent, pNamedGroup);
121   }
122
123   public XSSimpleType newXSListType(XSType pParent, XsEList pList) throws SAXException JavaDoc {
124     return new XSListTypeImpl(pParent, pList);
125   }
126
127   public XSSimpleType newXSListType(XSType pParent, XSType pRestrictedType, XsERestriction pRestriction) throws SAXException JavaDoc {
128     return new XSListTypeRestrictionImpl(pParent, pRestrictedType, pRestriction);
129   }
130
131   public XSSimpleType newXSListType(XSType pParent, XSType pRestrictedType, XsTSimpleRestrictionType pRestriction) throws SAXException JavaDoc {
132     return new XSListTypeRestrictionImpl(pParent, pRestrictedType, pRestriction);
133   }
134
135   public XSType newXSType(XSObject pParent, XsETopLevelSimpleType pType) throws SAXException JavaDoc {
136     return new XSTypeImpl(pParent, pType);
137   }
138
139   public XSType newXSType(XSObject pParent, XsTComplexType pType) throws SAXException JavaDoc {
140     return new XSTypeImpl(pParent, pType);
141   }
142
143   public XSType newXSType(XSObject pParent, XsTLocalComplexType pType) throws SAXException JavaDoc {
144     return new XSTypeImpl(pParent, pType);
145   }
146
147   public XSType newXSType(XSObject pParent, XsTLocalSimpleType pType) throws SAXException JavaDoc {
148     return new XSTypeImpl(pParent, pType);
149   }
150
151   public XSType newXSType(XSObject pParent, XsTSimpleRestrictionType pType) throws SAXException JavaDoc {
152     return new XSTypeImpl(pParent, pType);
153   }
154
155   public XSSimpleType newXSUnionType(XSType pParent, XsEUnion pUnion) throws SAXException JavaDoc {
156     return new XSUnionTypeImpl(pParent, pUnion);
157   }
158
159   public XSSimpleType newXSUnionType(XSType pParent, XSType pRestrictedType, XsERestriction pRestriction) throws SAXException JavaDoc {
160     return new XSUnionTypeRestrictionImpl(pParent, pRestrictedType, pRestriction);
161   }
162
163   public XSSimpleType newXSUnionType(XSType pParent, XSType pRestrictedType, XsTSimpleRestrictionType pRestriction) throws SAXException JavaDoc {
164     return new XSUnionTypeRestrictionImpl(pParent, pRestrictedType, pRestriction);
165   }
166
167   public XSNotation newXSNotation(XSObject pParent, XsENotation pNotation) throws SAXException JavaDoc {
168     return new XSNotationImpl(pParent, pNotation);
169   }
170
171   public XSAny newXSAny(XSObject pParent, XsEAny pAny) throws SAXException JavaDoc {
172     return new XSAnyImpl(pParent, pAny);
173   }
174
175   public XSSimpleContentType newXSSimpleContentType(XSType pParent, XSType pSimpleType, XsObject pBaseType) throws SAXException JavaDoc {
176     return new XSSimpleContentTypeImpl(pParent, pSimpleType, pBaseType);
177   }
178
179   public XSWildcard newXSWildcard(XSObject pParent, XsTWildcard pWildcard) throws SAXException JavaDoc {
180     return new XSWildcardImpl(pParent, pWildcard);
181   }
182
183   public XSIdentityConstraint newXSIdentityConstraint(
184     XSElement pParent,
185     XsEKey key
186   )
187     throws SAXException JavaDoc
188   {
189     return new XSIdentityConstraintImpl( pParent, key );
190   }
191
192   public XSKeyRef newXSKeyRef(
193     XSElement pParent,
194     XsEKeyref keyRef
195   ) throws SAXException JavaDoc {
196     return new XSKeyRefImpl( pParent, keyRef );
197   }
198
199   public XSIdentityConstraint newXSIdentityConstraint(
200     XSElement pParent,
201     XsEUnique unique
202   ) throws SAXException JavaDoc {
203     return new XSIdentityConstraintImpl( pParent, unique );
204   }
205
206 }
207
Popular Tags