KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > xs > XSComplexTypeDecl


1 /*
2  * Copyright 2001-2005 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.xerces.impl.xs;
18
19 import org.apache.xerces.impl.dv.XSSimpleType;
20 import org.apache.xerces.xs.*;
21 import org.apache.xerces.impl.xs.models.XSCMValidator;
22 import org.apache.xerces.impl.xs.models.CMBuilder;
23 import org.apache.xerces.impl.xs.util.XSObjectListImpl;
24 import org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl;
25 import org.w3c.dom.TypeInfo JavaDoc;
26
27 /**
28  * The XML representation for a complexType
29  * schema component is a <complexType> element information item
30  *
31  * @xerces.internal
32  *
33  * @author Elena Litani, IBM
34  * @author Sandy Gao, IBM
35  * @version $Id: XSComplexTypeDecl.java,v 1.22 2005/06/13 20:43:27 mrglavas Exp $
36  */

37 public class XSComplexTypeDecl implements XSComplexTypeDefinition, TypeInfo JavaDoc {
38
39     // name of the complexType
40
String JavaDoc fName = null;
41
42     // target namespace of the complexType
43
String JavaDoc fTargetNamespace = null;
44
45     // base type of the complexType
46
XSTypeDefinition fBaseType = null;
47
48     // derivation method of the complexType
49
short fDerivedBy = XSConstants.DERIVATION_RESTRICTION;
50
51     // final set of the complexType
52
short fFinal = XSConstants.DERIVATION_NONE;
53
54     // block set (prohibited substitution) of the complexType
55
short fBlock = XSConstants.DERIVATION_NONE;
56
57     // flags: whether is abstract; whether contains ID type;
58
// whether it's an anonymous tpye
59
short fMiscFlags = 0;
60
61     // the attribute group that holds the attribute uses and attribute wildcard
62
XSAttributeGroupDecl fAttrGrp = null;
63
64     // the content type of the complexType
65
short fContentType = CONTENTTYPE_EMPTY;
66
67     // if the content type is simple, then the corresponding simpleType
68
XSSimpleType fXSSimpleType = null;
69
70     // if the content type is element or mixed, the particle
71
XSParticleDecl fParticle = null;
72
73     // if there is a particle, the content model corresponding to that particle
74
XSCMValidator fCMValidator = null;
75
76     // list of annotations affiliated with this type
77
XSObjectListImpl fAnnotations = null;
78
79     // DOM Level 3 TypeInfo Derivation Method constants
80
static final int DERIVATION_ANY = 0;
81     static final int DERIVATION_RESTRICTION = 1;
82     static final int DERIVATION_EXTENSION = 2;
83     static final int DERIVATION_UNION = 4;
84     static final int DERIVATION_LIST = 8;
85     
86     public XSComplexTypeDecl() {
87         // do-nothing constructor for now.
88
}
89
90     public void setValues(String JavaDoc name, String JavaDoc targetNamespace,
91             XSTypeDefinition baseType, short derivedBy, short schemaFinal,
92             short block, short contentType,
93             boolean isAbstract, XSAttributeGroupDecl attrGrp,
94             XSSimpleType simpleType, XSParticleDecl particle,
95             XSObjectListImpl annotations) {
96         fTargetNamespace = targetNamespace;
97         fBaseType = baseType;
98         fDerivedBy = derivedBy;
99         fFinal = schemaFinal;
100         fBlock = block;
101         fContentType = contentType;
102         if(isAbstract)
103             fMiscFlags |= CT_IS_ABSTRACT;
104         fAttrGrp = attrGrp;
105         fXSSimpleType = simpleType;
106         fParticle = particle;
107         fAnnotations = annotations;
108    }
109
110    public void setName(String JavaDoc name) {
111         fName = name;
112    }
113
114     public short getTypeCategory() {
115         return COMPLEX_TYPE;
116     }
117
118     public String JavaDoc getTypeName() {
119         return fName;
120     }
121
122     public short getFinalSet(){
123         return fFinal;
124     }
125
126     public String JavaDoc getTargetNamespace(){
127         return fTargetNamespace;
128     }
129
130     // flags for the misc flag
131
private static final short CT_IS_ABSTRACT = 1;
132     private static final short CT_HAS_TYPE_ID = 2;
133     private static final short CT_IS_ANONYMOUS = 4;
134
135     // methods to get/set misc flag
136

137     public boolean containsTypeID () {
138         return((fMiscFlags & CT_HAS_TYPE_ID) != 0);
139     }
140
141     public void setIsAbstractType() {
142         fMiscFlags |= CT_IS_ABSTRACT;
143     }
144     public void setContainsTypeID() {
145         fMiscFlags |= CT_HAS_TYPE_ID;
146     }
147     public void setIsAnonymous() {
148         fMiscFlags |= CT_IS_ANONYMOUS;
149     }
150
151     public synchronized XSCMValidator getContentModel(CMBuilder cmBuilder) {
152         if (fCMValidator == null)
153             fCMValidator = cmBuilder.getContentModel(this);
154
155         return fCMValidator;
156     }
157
158     // some utility methods:
159

160     // return the attribute group for this complex type
161
public XSAttributeGroupDecl getAttrGrp() {
162         return fAttrGrp;
163     }
164
165     public String JavaDoc toString() {
166         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
167         appendTypeInfo(str);
168         return str.toString();
169     }
170
171     void appendTypeInfo(StringBuffer JavaDoc str) {
172         String JavaDoc contentType[] = {"EMPTY", "SIMPLE", "ELEMENT", "MIXED"};
173         String JavaDoc derivedBy[] = {"EMPTY", "EXTENSION", "RESTRICTION"};
174
175         str.append("Complex type name='" + fTargetNamespace + "," + getTypeName() + "', ");
176         if (fBaseType != null)
177             str.append(" base type name='" + fBaseType.getName() + "', ");
178
179         str.append(" content type='" + contentType[fContentType] + "', ");
180         str.append(" isAbstract='" + getAbstract() + "', ");
181         str.append(" hasTypeId='" + containsTypeID() + "', ");
182         str.append(" final='" + fFinal + "', ");
183         str.append(" block='" + fBlock + "', ");
184         if (fParticle != null)
185             str.append(" particle='" + fParticle.toString() + "', ");
186         str.append(" derivedBy='" + derivedBy[fDerivedBy] + "'. ");
187
188     }
189
190     public boolean derivedFromType(XSTypeDefinition ancestor, short derivationMethod) {
191         // ancestor is null, retur false
192
if (ancestor == null)
193             return false;
194         // ancestor is anyType, return true
195
if (ancestor == SchemaGrammar.fAnyType)
196             return true;
197         // recursively get base, and compare it with ancestor
198
XSTypeDefinition type = this;
199         while (type != ancestor && // compare with ancestor
200
type != SchemaGrammar.fAnySimpleType && // reached anySimpleType
201
type != SchemaGrammar.fAnyType) { // reached anyType
202
type = type.getBaseType();
203         }
204
205         return type == ancestor;
206     }
207
208     public boolean derivedFrom(String JavaDoc ancestorNS, String JavaDoc ancestorName, short derivationMethod) {
209         // ancestor is null, retur false
210
if (ancestorName == null)
211             return false;
212         // ancestor is anyType, return true
213
if (ancestorNS != null &&
214             ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA) &&
215             ancestorName.equals(SchemaSymbols.ATTVAL_ANYTYPE)) {
216             return true;
217         }
218
219         // recursively get base, and compare it with ancestor
220
XSTypeDefinition type = this;
221         while (!(ancestorName.equals(type.getName()) &&
222                  ((ancestorNS == null && type.getNamespace() == null) ||
223                   (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) && // compare with ancestor
224
type != SchemaGrammar.fAnySimpleType && // reached anySimpleType
225
type != SchemaGrammar.fAnyType) { // reached anyType
226
type = (XSTypeDefinition)type.getBaseType();
227         }
228
229         return type != SchemaGrammar.fAnySimpleType &&
230         type != SchemaGrammar.fAnyType;
231     }
232
233     /**
234      * Checks if a type is derived from another given the the name, namespace
235      * and derivation method. See:
236      * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
237      *
238      * @param ancestorNS
239      * The namspace of the ancestor type declaration
240      * @param ancestorName
241      * The name of the ancestor type declaration
242      * @param derivation
243      * The derivation method
244      *
245      * @return boolean True if the ancestor type is derived from the reference
246      * type by the specifiied derivation method.
247      */

248     public boolean isDOMDerivedFrom(String JavaDoc ancestorNS, String JavaDoc ancestorName,
249             int derivationMethod) {
250         // ancestor is null, retur false
251
if (ancestorName == null)
252             return false;
253         
254         // ancestor is anyType, return true
255
if (ancestorNS != null
256                 && ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)
257                 && ancestorName.equals(SchemaSymbols.ATTVAL_ANYTYPE)
258                 && (derivationMethod == DERIVATION_RESTRICTION
259                 && derivationMethod == DERIVATION_EXTENSION)) {
260             return true;
261         }
262         
263         // restriction
264
if ((derivationMethod & DERIVATION_RESTRICTION) != 0) {
265             if (isDerivedByRestriction(ancestorNS, ancestorName,
266                     derivationMethod, this)) {
267                 return true;
268             }
269         }
270         
271         // extension
272
if ((derivationMethod & DERIVATION_EXTENSION) != 0) {
273             if (isDerivedByExtension(ancestorNS, ancestorName,
274                     derivationMethod, this)) {
275                 return true;
276             }
277         }
278         
279         // list or union
280
if ((((derivationMethod & DERIVATION_LIST) != 0) || ((derivationMethod & DERIVATION_UNION) != 0))
281                 && ((derivationMethod & DERIVATION_RESTRICTION) == 0)
282                 && ((derivationMethod & DERIVATION_EXTENSION) == 0)) {
283
284             if (ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)
285                     && ancestorName.equals(SchemaSymbols.ATTVAL_ANYTYPE)) {
286                 ancestorName = SchemaSymbols.ATTVAL_ANYSIMPLETYPE;
287             }
288
289             if(!(fName.equals(SchemaSymbols.ATTVAL_ANYTYPE)
290                             && fTargetNamespace.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA))){
291                 if (fBaseType != null && fBaseType instanceof XSSimpleTypeDecl) {
292                     
293                     return ((XSSimpleTypeDecl) fBaseType).isDOMDerivedFrom(ancestorNS,
294                             ancestorName, derivationMethod);
295                 } else if (fBaseType != null
296                         && fBaseType instanceof XSComplexTypeDecl) {
297                     return ((XSComplexTypeDecl) fBaseType).isDOMDerivedFrom(
298                             ancestorNS, ancestorName, derivationMethod);
299                 }
300             }
301         }
302         
303         // If the value of the parameter is 0 i.e. no bit (corresponding to
304
// restriction, list, extension or union) is set to 1 for the
305
// derivationMethod parameter.
306
if (((derivationMethod & DERIVATION_EXTENSION) == 0)
307                 && (((derivationMethod & DERIVATION_RESTRICTION) == 0)
308                         && ((derivationMethod & DERIVATION_LIST) == 0)
309                         && ((derivationMethod & DERIVATION_UNION) == 0))) {
310             return isDerivedByAny(ancestorNS, ancestorName, derivationMethod, this);
311         }
312
313         return false;
314     }
315     
316     /**
317      * Checks if a type is derived from another by any combination of
318      * restriction, list ir union. See:
319      * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
320      *
321      * @param ancestorNS
322      * The namspace of the ancestor type declaration
323      * @param ancestorName
324      * The name of the ancestor type declaration
325      * @param derivationMethod
326      * A short indication the method of derivation
327      * @param type
328      * The reference type definition
329      *
330      * @return boolean True if the type is derived by any method for the
331      * reference type
332      */

333     private boolean isDerivedByAny(String JavaDoc ancestorNS, String JavaDoc ancestorName,
334             int derivationMethod, XSTypeDefinition type) {
335         XSTypeDefinition oldType = null;
336         boolean derivedFrom = false;
337         while (type != null && type != oldType) {
338             
339             // If the ancestor type is reached or is the same as this type.
340
if ((ancestorName.equals(type.getName()))
341                     && ((ancestorNS == null && type.getNamespace() == null)
342                         || (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) {
343                 derivedFrom = true;
344                 break;
345             }
346             
347             // Check if this type is derived from the base by restriction or
348
// extension
349
if (isDerivedByRestriction(ancestorNS, ancestorName,
350                     derivationMethod, type)) {
351                 return true;
352             } else if (!isDerivedByExtension(ancestorNS, ancestorName,
353                     derivationMethod, type)) {
354                 return true;
355             }
356             oldType = type;
357             type = type.getBaseType();
358         }
359         
360         return derivedFrom;
361     }
362     
363     /**
364      * Checks if a type is derived from another by restriction. See:
365      * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
366      *
367      * @param ancestorNS
368      * The namspace of the ancestor type declaration
369      * @param ancestorName
370      * The name of the ancestor type declaration
371      * @param derivationMethod
372      * A short indication the method of derivation *
373      * @param type
374      * The reference type definition
375      *
376      * @return boolean True if the type is derived by restriciton for the
377      * reference type
378      */

379     private boolean isDerivedByRestriction(String JavaDoc ancestorNS,
380             String JavaDoc ancestorName, int derivationMethod, XSTypeDefinition type) {
381         
382         XSTypeDefinition oldType = null;
383         while (type != null && type != oldType) {
384             
385             // ancestor is anySimpleType, return false
386
if (ancestorNS != null
387                     && ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)
388                     && ancestorName.equals(SchemaSymbols.ATTVAL_ANYSIMPLETYPE)) {
389                 return false;
390             }
391             
392             // if the name and namespace of this type is the same as the
393
// ancestor return true
394
if ((ancestorName.equals(type.getName()))
395                     && (ancestorNS != null && ancestorNS.equals(type.getNamespace()))
396                             || ((type.getNamespace() == null && ancestorNS == null))) {
397                 
398                 return true;
399             }
400             
401             // If the base type is a complexType with simpleContent
402
if (type instanceof XSSimpleTypeDecl) {
403                 if (ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)
404                         && ancestorName.equals(SchemaSymbols.ATTVAL_ANYTYPE)) {
405                     ancestorName = SchemaSymbols.ATTVAL_ANYSIMPLETYPE;
406                 }
407                 return ((XSSimpleTypeDecl) type).isDOMDerivedFrom(ancestorNS,
408                         ancestorName, derivationMethod);
409             } else {
410                 // If the base type is a complex type
411
// Every derivation step till the base type should be
412
// restriction. If not return false
413
if (((XSComplexTypeDecl) type).getDerivationMethod() != XSConstants.DERIVATION_RESTRICTION) {
414                     return false;
415                 }
416             }
417             oldType = type;
418             type = type.getBaseType();
419             
420         }
421         
422         return false;
423     }
424     
425     /**
426      * Checks if a type is derived from another by extension. See:
427      * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom
428      *
429      * @param ancestorNS
430      * The namspace of the ancestor type declaration
431      * @param ancestorName
432      * The name of the ancestor type declaration
433      * @param derivationMethod
434      * A short indication the method of derivation
435      * @param type
436      * The reference type definition
437      *
438      * @return boolean True if the type is derived by extension for the
439      * reference type
440      */

441     private boolean isDerivedByExtension(String JavaDoc ancestorNS,
442             String JavaDoc ancestorName, int derivationMethod, XSTypeDefinition type) {
443         
444         boolean extension = false;
445         XSTypeDefinition oldType = null;
446         while (type != null && type != oldType) {
447             // If ancestor is anySimpleType return false.
448
if (ancestorNS != null
449                     && ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)
450                     && ancestorName.equals(SchemaSymbols.ATTVAL_ANYSIMPLETYPE)
451                     && SchemaSymbols.URI_SCHEMAFORSCHEMA.equals(type.getNamespace())
452                             && SchemaSymbols.ATTVAL_ANYTYPE.equals(type.getName())) {
453                 break;
454             }
455             
456             if ((ancestorName.equals(type.getName()))
457                     && ((ancestorNS == null && type.getNamespace() == null)
458                         || (ancestorNS != null && ancestorNS.equals(type.getNamespace())))) {
459                 // returns true if atleast one derivation step was extension
460
return extension;
461             }
462             
463             // If the base type is a complexType with simpleContent
464
if (type instanceof XSSimpleTypeDecl) {
465                 if (ancestorNS.equals(SchemaSymbols.URI_SCHEMAFORSCHEMA)
466                         && ancestorName.equals(SchemaSymbols.ATTVAL_ANYTYPE)) {
467                     ancestorName = SchemaSymbols.ATTVAL_ANYSIMPLETYPE;
468                 }
469                 
470                 // derivationMethod extension will always return false for a
471
// simpleType,
472
// we treat it like a restriction
473
if ((derivationMethod & DERIVATION_EXTENSION) != 0) {
474                     return extension
475                     & ((XSSimpleTypeDecl) type).isDOMDerivedFrom(
476                             ancestorNS, ancestorName,
477                             (derivationMethod & DERIVATION_RESTRICTION));
478                 } else {
479                     return extension
480                     & ((XSSimpleTypeDecl) type).isDOMDerivedFrom(
481                             ancestorNS, ancestorName, derivationMethod);
482                 }
483                 
484             } else {
485                 // If the base type is a complex type
486
// At least one derivation step upto the ancestor type should be
487
// extension.
488
if (((XSComplexTypeDecl) type).getDerivationMethod() == XSConstants.DERIVATION_EXTENSION) {
489                     extension = extension | true;
490                 }
491             }
492             oldType = type;
493             type = type.getBaseType();
494         }
495         
496         return false;
497     }
498     
499     
500     
501     public void reset(){
502         fName = null;
503         fTargetNamespace = null;
504         fBaseType = null;
505         fDerivedBy = XSConstants.DERIVATION_RESTRICTION;
506         fFinal = XSConstants.DERIVATION_NONE;
507         fBlock = XSConstants.DERIVATION_NONE;
508
509         fMiscFlags = 0;
510
511         // reset attribute group
512
fAttrGrp.reset();
513         fContentType = CONTENTTYPE_EMPTY;
514         fXSSimpleType = null;
515         fParticle = null;
516         fCMValidator = null;
517         if(fAnnotations != null) {
518             // help out the garbage collector
519
fAnnotations.clear();
520         }
521         fAnnotations = null;
522     }
523
524     /**
525      * Get the type of the object, i.e ELEMENT_DECLARATION.
526      */

527     public short getType() {
528         return XSConstants.TYPE_DEFINITION;
529     }
530
531     /**
532      * The <code>name</code> of this <code>XSObject</code> depending on the
533      * <code>XSObject</code> type.
534      */

535     public String JavaDoc getName() {
536         return getAnonymous() ? null : fName;
537     }
538
539     /**
540      * A boolean that specifies if the type definition is anonymous.
541      * Convenience attribute. This is a field is not part of
542      * XML Schema component model.
543      */

544     public boolean getAnonymous() {
545         return((fMiscFlags & CT_IS_ANONYMOUS) != 0);
546     }
547
548     /**
549      * The namespace URI of this node, or <code>null</code> if it is
550      * unspecified. defines how a namespace URI is attached to schema
551      * components.
552      */

553     public String JavaDoc getNamespace() {
554         return fTargetNamespace;
555     }
556
557     /**
558      * {base type definition} Either a simple type definition or a complex
559      * type definition.
560      */

561     public XSTypeDefinition getBaseType() {
562         return fBaseType;
563     }
564
565     /**
566      * {derivation method} Either extension or restriction. The valid constant
567      * value for this <code>XSConstants</code> EXTENTION, RESTRICTION.
568      */

569     public short getDerivationMethod() {
570         return fDerivedBy;
571     }
572
573     /**
574      * {final} For complex type definition it is a subset of {extension,
575      * restriction}. For simple type definition it is a subset of
576      * {extension, list, restriction, union}.
577      * @param derivation Extension, restriction, list, union constants
578      * (defined in <code>XSConstants</code>).
579      * @return True if derivation is in the final set, otherwise false.
580      */

581     public boolean isFinal(short derivation) {
582         return (fFinal & derivation) != 0;
583     }
584
585     /**
586      * {final} For complex type definition it is a subset of {extension, restriction}.
587      *
588      * @return A bit flag that represents:
589      * {extension, restriction) or none for complexTypes;
590      * {extension, list, restriction, union} or none for simpleTypes;
591      */

592     public short getFinal() {
593         return fFinal;
594     }
595
596     /**
597      * {abstract} A boolean. Complex types for which {abstract} is true must
598      * not be used as the {type definition} for the validation of element
599      * information items.
600      */

601     public boolean getAbstract() {
602         return((fMiscFlags & CT_IS_ABSTRACT) != 0);
603     }
604
605     /**
606      * {attribute uses} A set of attribute uses.
607      */

608     public XSObjectList getAttributeUses() {
609         return fAttrGrp.getAttributeUses();
610     }
611
612     /**
613      * {attribute wildcard} Optional. A wildcard.
614      */

615     public XSWildcard getAttributeWildcard() {
616         return fAttrGrp.getAttributeWildcard();
617     }
618
619     /**
620      * {content type} One of empty, a simple type definition (see
621      * <code>simpleType</code>, or mixed, element-only (see
622      * <code>cmParticle</code>).
623      */

624     public short getContentType() {
625         return fContentType;
626     }
627
628     /**
629      * A simple type definition corresponding to simple content model,
630      * otherwise <code>null</code>
631      */

632     public XSSimpleTypeDefinition getSimpleType() {
633         return fXSSimpleType;
634     }
635
636     /**
637      * A particle for mixed or element-only content model, otherwise
638      * <code>null</code>
639      */

640     public XSParticle getParticle() {
641         return fParticle;
642     }
643
644     /**
645      * {prohibited substitutions} A subset of {extension, restriction}.
646      * @param prohibited extention or restriction constants (defined in
647      * <code>XSConstants</code>).
648      * @return True if prohibited is a prohibited substitution, otherwise
649      * false.
650      */

651     public boolean isProhibitedSubstitution(short prohibited) {
652         return (fBlock & prohibited) != 0;
653     }
654
655     /**
656      * {prohibited substitutions}
657      *
658      * @return A bit flag corresponding to prohibited substitutions
659      */

660     public short getProhibitedSubstitutions() {
661         return fBlock;
662     }
663
664     /**
665      * Optional. Annotation.
666      */

667     public XSObjectList getAnnotations() {
668         return fAnnotations;
669     }
670     
671     /**
672      * @see org.apache.xerces.xs.XSObject#getNamespaceItem()
673      */

674     public XSNamespaceItem getNamespaceItem() {
675         // REVISIT: implement
676
return null;
677     }
678
679     /* (non-Javadoc)
680      * @see org.apache.xerces.xs.XSComplexTypeDefinition#getAttributeUse(java.lang.String, java.lang.String)
681      */

682     public XSAttributeUse getAttributeUse(String JavaDoc namespace, String JavaDoc name) {
683          return fAttrGrp.getAttributeUse(namespace, name);
684     }
685
686     public String JavaDoc getTypeNamespace() {
687         return getNamespace();
688     }
689
690     public boolean isDerivedFrom(String JavaDoc typeNamespaceArg, String JavaDoc typeNameArg, int derivationMethod) {
691         return isDOMDerivedFrom(typeNamespaceArg, typeNameArg, derivationMethod);
692     }
693
694 } // class XSComplexTypeDecl
695
Popular Tags