public interface XSType extends XSDeclaration
XSComplexType
and XSSimpleType
.Modifier and Type | Field and Description |
---|---|
static int |
EXTENSION |
static int |
RESTRICTION |
static int |
SUBSTITUTION |
Modifier and Type | Method and Description |
---|---|
XSComplexType |
asComplexType()
Casts this object to XSComplexType if possible, otherwise returns null.
|
XSSimpleType |
asSimpleType()
Casts this object to XSSimpleType if possible, otherwise returns null.
|
XSType |
getBaseType()
Returns the base type of this type.
|
int |
getDerivationMethod() |
XSType |
getRedefinedBy()
If this
XSType is redefined by another type,
return that component. |
int |
getRedefinedCount()
Returns the number of complex types that redefine this component.
|
boolean |
isComplexType()
Returns true if
this instanceof XSComplexType . |
boolean |
isDerivedFrom(XSType t)
Returns true if this type is derived from the specified type.
|
boolean |
isSimpleType()
Returns true if
this instanceof XSSimpleType . |
XSType[] |
listSubstitutables()
Lists up types that can substitute this type by using xsi:type.
|
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visit
static final int EXTENSION
static final int RESTRICTION
static final int SUBSTITUTION
XSType getBaseType()
xs:anyType
, this method returns itself.
This is awkward as an API, but it follows the schema specification.int getDerivationMethod()
boolean isSimpleType()
this instanceof XSSimpleType
.boolean isComplexType()
this instanceof XSComplexType
.XSType[] listSubstitutables()
This method honors the block flag.
XSType getRedefinedBy()
XSType
is redefined by another type,
return that component.int getRedefinedCount()
For example, if A is redefined by B and B is redefined by C, A.getRedefinedCount()==2, B.getRedefinedCount()==1, and C.getRedefinedCount()==0.
XSSimpleType asSimpleType()
XSComplexType asComplexType()
boolean isDerivedFrom(XSType t)
Note that t.isDerivedFrom(t)
returns true.
Copyright © 2021 JBoss by Red Hat. All rights reserved.