private class SchemaSetImpl.AnySimpleType extends DeclarationImpl implements XSRestrictionSimpleType, Ref.SimpleType
ownerDocumentEXTENSION, RESTRICTION, SUBSTITUTION| Constructor and Description |
|---|
AnySimpleType() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
apply(XSContentTypeFunction<T> f) |
<T> T |
apply(XSFunction<T> f)
Accepts a functor.
|
<T> T |
apply(XSSimpleTypeFunction<T> f) |
XSComplexType |
asComplexType()
Casts this object to XSComplexType if possible, otherwise returns null.
|
XSContentType |
asEmpty()
If this content type represents the empty content, return
this,
otherwise null. |
XSListSimpleType |
asList() |
XSParticle |
asParticle()
Equivalent of
(this instanceof XSParticle)?this:null |
XSRestrictionSimpleType |
asRestriction() |
XSSimpleType |
asSimpleType()
Casts this object to XSSimpleType if possible, otherwise returns null.
|
XSUnionSimpleType |
asUnion() |
XSListSimpleType |
getBaseListType()
Gets the nearest ancestor
XSListSimpleType (including itself)
if the variety of this type is list. |
XSType |
getBaseType()
Returns the base type of this type.
|
XSUnionSimpleType |
getBaseUnionType()
Gets the nearest ancestor
XSUnionSimpleType (including itself)
if the variety of this type is union. |
XSFacet |
getDeclaredFacet(java.lang.String name)
Gets the declared facet object of the given name.
|
java.util.Collection<? extends XSFacet> |
getDeclaredFacets()
Gets all the facets that are declared on this restriction.
|
java.util.List<XSFacet> |
getDeclaredFacets(java.lang.String name)
Gets the declared facets of the given name.
|
int |
getDerivationMethod() |
XSFacet |
getFacet(java.lang.String name)
Gets the effective facet object of the given name.
|
java.util.List<XSFacet> |
getFacets(java.lang.String name)
For multi-valued facets (enumeration and pattern), obtain all values.
|
SchemaImpl |
getOwnerSchema()
Gets a reference to the
XSSchema object to which this component
belongs. |
XSSimpleType |
getPrimitiveType()
Gets the ancestor primitive
XSSimpleType if
this type is atomic. |
XSSimpleType |
getRedefinedBy()
If this
XSSimpleType is redefined by another simple type,
return that component. |
int |
getRedefinedCount()
Returns the number of complex types that redefine this component.
|
XSSimpleType |
getSimpleBaseType()
Gets the base type as XSSimpleType.
|
XSSimpleType |
getType()
Obtains a reference as a type.
|
XSVariety |
getVariety()
Gets the variety of this simple 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(XSVariety v)
Returns true if this type definition is marked as 'final'
with respect to the given
XSVariety. |
boolean |
isList()
Returns true if
this instanceof XSListSimpleType. |
boolean |
isPrimitive()
Returns true if this is a primitive built-in simple type
(that directly derives from xs:anySimpleType, by definition.)
|
boolean |
isRestriction()
Returns true if
this instanceof XSRestrictionSimpleType. |
boolean |
isSimpleType()
Returns true if
this instanceof XSSimpleType. |
boolean |
isUnion()
Returns true if
this instanceof XSUnionSimpleType. |
java.util.Iterator<XSFacet> |
iterateDeclaredFacets()
Iterates facets that are specified in this step of derivation.
|
XSType[] |
listSubstitutables()
Lists up types that can substitute this type by using xsi:type.
|
void |
visit(XSContentTypeVisitor visitor) |
void |
visit(XSSimpleTypeVisitor visitor) |
void |
visit(XSVisitor visitor)
Accepts a visitor.
|
getName, getTargetNamespace, isAnonymous, isGlobal, isLocalgetAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getRoot, getSourceDocument, select, selectSingle, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getTargetNamespace, isAnonymous, isGlobal, isLocalgetAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getRoot, getSourceDocument, select, selectSinglepublic SchemaImpl getOwnerSchema()
XSComponentXSSchema object to which this component
belongs.
In case of XSEmpty component, this method
returns null since there is no owner component.
getOwnerSchema in interface XSComponentgetOwnerSchema in class ComponentImplpublic XSSimpleType asSimpleType()
XSTypeasSimpleType in interface XSContentTypeasSimpleType in interface XSTypepublic XSComplexType asComplexType()
XSTypeasComplexType in interface XSTypepublic boolean isDerivedFrom(XSType t)
XSTypeNote that t.isDerivedFrom(t) returns true.
isDerivedFrom in interface XSTypepublic boolean isSimpleType()
XSTypethis instanceof XSSimpleType.isSimpleType in interface XSTypepublic boolean isComplexType()
XSTypethis instanceof XSComplexType.isComplexType in interface XSTypepublic XSContentType asEmpty()
XSContentTypethis,
otherwise null.asEmpty in interface XSContentTypepublic XSParticle asParticle()
XSContentType(this instanceof XSParticle)?this:nullasParticle in interface XSContentTypepublic XSType getBaseType()
XSTypegetBaseType in interface XSTypepublic XSSimpleType getSimpleBaseType()
XSSimpleType
(XSSimpleType)getBaseType()
Since this is a simple type, we know that the base type
is also a simple type.
The only exception is xs:anySimpleType, which has xs:anyType
as the base type.getSimpleBaseType in interface XSSimpleTypepublic int getDerivationMethod()
getDerivationMethod in interface XSTypepublic java.util.Iterator<XSFacet> iterateDeclaredFacets()
XSRestrictionSimpleTypeiterateDeclaredFacets in interface XSRestrictionSimpleTypepublic java.util.Collection<? extends XSFacet> getDeclaredFacets()
XSRestrictionSimpleTypegetDeclaredFacets in interface XSRestrictionSimpleTypepublic void visit(XSSimpleTypeVisitor visitor)
visit in interface XSSimpleTypepublic void visit(XSContentTypeVisitor visitor)
visit in interface XSContentTypepublic void visit(XSVisitor visitor)
XSComponentvisit in interface XSComponentpublic <T> T apply(XSSimpleTypeFunction<T> f)
apply in interface XSSimpleTypepublic <T> T apply(XSContentTypeFunction<T> f)
apply in interface XSContentTypepublic <T> T apply(XSFunction<T> f)
XSComponentapply in interface XSComponentpublic XSVariety getVariety()
XSSimpleTypegetVariety in interface XSSimpleTypepublic XSSimpleType getPrimitiveType()
XSSimpleTypeXSSimpleType if
this type is atomic.getPrimitiveType in interface XSSimpleTypepublic boolean isPrimitive()
XSSimpleTypeisPrimitive in interface XSSimpleTypepublic XSListSimpleType getBaseListType()
XSSimpleTypeXSListSimpleType (including itself)
if the variety of this type is list.getBaseListType in interface XSSimpleTypepublic XSUnionSimpleType getBaseUnionType()
XSSimpleTypeXSUnionSimpleType (including itself)
if the variety of this type is union.getBaseUnionType in interface XSSimpleTypepublic XSFacet getFacet(java.lang.String name)
XSSimpleTypeFor example, if a simple type "foo" is derived from xs:string by restriction with the "maxLength" facet and another simple type "bar" is derived from "foo" by restriction with another "maxLength" facet, this method will return the latter one, because that is the most restrictive, effective facet.
For those facets that can have multiple values (pattern facets and enumeration facets), this method will return only the first one. TODO: allow clients to access all of them by some means.
getFacet in interface XSSimpleTypepublic java.util.List<XSFacet> getFacets(java.lang.String name)
XSSimpleTypegetFacets in interface XSSimpleTypeXSSimpleType.getFacet(String)public XSFacet getDeclaredFacet(java.lang.String name)
XSRestrictionSimpleTypeThis method returns a facet object that is added in this type and does not recursively check the ancestors.
For those facets that can have multiple values (pattern facets and enumeration facets), this method will return only the first one.
getDeclaredFacet in interface XSRestrictionSimpleTypepublic java.util.List<XSFacet> getDeclaredFacets(java.lang.String name)
XSRestrictionSimpleTypegetDeclaredFacets in interface XSRestrictionSimpleTypepublic boolean isRestriction()
XSSimpleTypethis instanceof XSRestrictionSimpleType.isRestriction in interface XSSimpleTypepublic boolean isList()
XSSimpleTypethis instanceof XSListSimpleType.isList in interface XSSimpleTypepublic boolean isUnion()
XSSimpleTypethis instanceof XSUnionSimpleType.isUnion in interface XSSimpleTypepublic boolean isFinal(XSVariety v)
XSSimpleTypeXSVariety.isFinal in interface XSSimpleTypepublic XSRestrictionSimpleType asRestriction()
asRestriction in interface XSSimpleTypepublic XSListSimpleType asList()
asList in interface XSSimpleTypepublic XSUnionSimpleType asUnion()
asUnion in interface XSSimpleTypepublic XSSimpleType getType()
Ref.TypegetType in interface Ref.SimpleTypegetType in interface Ref.Typepublic XSSimpleType getRedefinedBy()
XSSimpleTypeXSSimpleType is redefined by another simple type,
return that component.getRedefinedBy in interface XSSimpleTypegetRedefinedBy in interface XSTypepublic int getRedefinedCount()
XSTypeFor 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 XSTypepublic XSType[] listSubstitutables()
XSTypeThis method honors the block flag.
listSubstitutables in interface XSType