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