private class SchemaSetImpl.AnyType extends DeclarationImpl implements XSComplexType, Ref.Type
Modifier and Type | Field and Description |
---|---|
private WildcardImpl |
anyWildcard |
private XSContentType |
contentType |
ownerDocument
EXTENSION, RESTRICTION, SUBSTITUTION
Constructor and Description |
---|
AnyType() |
Modifier and Type | Method and Description |
---|---|
<T> T |
apply(XSFunction<T> f)
Accepts a functor.
|
XSComplexType |
asComplexType()
Casts this object to XSComplexType if possible, otherwise returns null.
|
XSContentType |
asEmpty() |
XSSimpleType |
asSimpleType()
Casts this object to XSSimpleType if possible, otherwise returns null.
|
java.util.Collection<? extends XSAttGroupDecl> |
getAttGroups()
Iterates all AttGroups which are directly referenced from
this component.
|
XSAttributeUse |
getAttributeUse(java.lang.String nsURI,
java.lang.String localName)
Looks for the attribute use with the specified name from
all the attribute uses that are directly/indirectly
referenced from this component.
|
java.util.Collection<XSAttributeUse> |
getAttributeUses()
Gets all the attribute uses.
|
XSWildcard |
getAttributeWildcard() |
XSType |
getBaseType()
Returns the base type of this type.
|
XSContentType |
getContentType()
The content of this complex type.
|
XSAttributeUse |
getDeclaredAttributeUse(java.lang.String nsURI,
java.lang.String localName)
Looks for the attribute use with the specified name from
the attribute uses which are declared in this complex type.
|
java.util.Collection<? extends XSAttributeUse> |
getDeclaredAttributeUses()
Lists all the attribute uses that are declared in this complex type.
|
int |
getDerivationMethod() |
java.util.List<XSElementDecl> |
getElementDecls()
Returns a list of element declarations of this type.
|
XSContentType |
getExplicitContent()
Gets the explicit content of a complex type with a complex content
that was derived by extension.
|
SchemaImpl |
getOwnerSchema()
Gets a reference to the
XSSchema object to which this component
belongs. |
XSComplexType |
getRedefinedBy()
If this
XSComplexType is redefined by another complex type,
return that component. |
int |
getRedefinedCount()
Returns the number of complex types that redefine this component.
|
XSElementDecl |
getScope()
Gets the scope of this complex type.
|
java.util.List<XSComplexType> |
getSubtypes()
Returns a list of direct subtypes of this complex type.
|
XSType |
getType()
Obtains a reference as a type.
|
boolean |
isAbstract()
Checks if this complex type is declared as an abstract type.
|
boolean |
isComplexType()
Returns true if
this instanceof XSComplexType . |
boolean |
isDerivedFrom(XSType t)
Returns true if this type is derived from the specified type.
|
boolean |
isFinal(int i) |
boolean |
isMixed() |
boolean |
isSimpleType()
Returns true if
this instanceof XSSimpleType . |
boolean |
isSubstitutionProhibited(int i)
Roughly corresponds to the block attribute.
|
java.util.Iterator<XSAttGroupDecl> |
iterateAttGroups()
Iterates all AttGroups which are directly referenced from
this component.
|
java.util.Iterator<XSAttributeUse> |
iterateAttributeUses()
Lists all the attribute uses that are directly/indirectly
referenced from this component.
|
java.util.Iterator<XSAttributeUse> |
iterateDeclaredAttributeUses()
Lists all the attribute uses that are declared in this complex type.
|
XSType[] |
listSubstitutables()
Lists up types that can substitute this type by using xsi:type.
|
void |
visit(XSVisitor visitor)
Accepts a visitor.
|
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getRoot, getSourceDocument, select, selectSingle, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getRoot, getSourceDocument, select, selectSingle
private final WildcardImpl anyWildcard
private final XSContentType contentType
public SchemaImpl getOwnerSchema()
XSComponent
XSSchema
object to which this component
belongs.
In case of XSEmpty
component, this method
returns null since there is no owner component.
getOwnerSchema
in interface XSComponent
getOwnerSchema
in class ComponentImpl
public boolean isAbstract()
XSComplexType
isAbstract
in interface XSComplexType
public XSWildcard getAttributeWildcard()
getAttributeWildcard
in interface XSAttContainer
public XSAttributeUse getAttributeUse(java.lang.String nsURI, java.lang.String localName)
XSAttContainer
This is the exact implementation of the "attribute use" schema component.
getAttributeUse
in interface XSAttContainer
public java.util.Iterator<XSAttributeUse> iterateAttributeUses()
XSAttContainer
This is the exact implementation of the "attribute use" schema component.
iterateAttributeUses
in interface XSAttContainer
public XSAttributeUse getDeclaredAttributeUse(java.lang.String nsURI, java.lang.String localName)
XSAttContainer
getDeclaredAttributeUse
in interface XSAttContainer
public java.util.Iterator<XSAttributeUse> iterateDeclaredAttributeUses()
XSAttContainer
iterateDeclaredAttributeUses
in interface XSAttContainer
public java.util.Iterator<XSAttGroupDecl> iterateAttGroups()
XSAttContainer
iterateAttGroups
in interface XSAttContainer
public java.util.Collection<XSAttributeUse> getAttributeUses()
XSAttContainer
getAttributeUses
in interface XSAttContainer
public java.util.Collection<? extends XSAttributeUse> getDeclaredAttributeUses()
XSAttContainer
getDeclaredAttributeUses
in interface XSAttContainer
public java.util.Collection<? extends XSAttGroupDecl> getAttGroups()
XSAttContainer
getAttGroups
in interface XSAttContainer
public boolean isFinal(int i)
isFinal
in interface XSComplexType
public boolean isSubstitutionProhibited(int i)
XSComplexType
isSubstitutionProhibited
in interface XSComplexType
public boolean isMixed()
isMixed
in interface XSComplexType
public XSContentType getContentType()
XSComplexType
getContentType
in interface XSComplexType
public XSContentType getExplicitContent()
XSComplexType
Informally, the "explicit content" is the portion of the content model added in this derivation. IOW, it's a delta between the base complex type and this complex type.
For example, when a complex type T2 derives fom T1, then:
content type of T2 = SEQUENCE( content type of T1, explicit content of T2 )
getExplicitContent
in interface XSComplexType
public XSType getBaseType()
XSType
getBaseType
in interface XSType
public XSSimpleType asSimpleType()
XSType
asSimpleType
in interface XSType
public XSComplexType asComplexType()
XSType
asComplexType
in interface XSType
public boolean isDerivedFrom(XSType t)
XSType
Note that t.isDerivedFrom(t) returns true.
isDerivedFrom
in interface XSType
public boolean isSimpleType()
XSType
this instanceof XSSimpleType
.isSimpleType
in interface XSType
public boolean isComplexType()
XSType
this instanceof XSComplexType
.isComplexType
in interface XSType
public XSContentType asEmpty()
public int getDerivationMethod()
getDerivationMethod
in interface XSType
public XSElementDecl getScope()
XSComplexType
getScope
in interface XSComplexType
public void visit(XSVisitor visitor)
XSComponent
visit
in interface XSComponent
public <T> T apply(XSFunction<T> f)
XSComponent
apply
in interface XSComponent
public XSType getType()
Ref.Type
public XSComplexType getRedefinedBy()
XSComplexType
XSComplexType
is redefined by another complex type,
return that component.getRedefinedBy
in interface XSComplexType
getRedefinedBy
in interface XSType
public int getRedefinedCount()
XSType
For example, if A is redefined by B and B is redefined by C, A.getRedefinedCount()==2, B.getRedefinedCount()==1, and C.getRedefinedCount()==0.
getRedefinedCount
in interface XSType
public XSType[] listSubstitutables()
XSType
This method honors the block flag.
listSubstitutables
in interface XSType
public java.util.List<XSComplexType> getSubtypes()
XSComplexType
getSubtypes
in interface XSComplexType
public java.util.List<XSElementDecl> getElementDecls()
XSComplexType
getElementDecls
in interface XSComplexType