public interface XSSimpleType extends XSType, XSContentType
EXTENSION, RESTRICTION, SUBSTITUTION
Modifier and Type | Method and Description |
---|---|
<T> T |
apply(XSSimpleTypeFunction<T> function) |
XSListSimpleType |
asList() |
XSRestrictionSimpleType |
asRestriction() |
XSUnionSimpleType |
asUnion() |
XSListSimpleType |
getBaseListType()
Gets the nearest ancestor
XSListSimpleType (including itself)
if the variety of this type is list . |
XSUnionSimpleType |
getBaseUnionType()
Gets the nearest ancestor
XSUnionSimpleType (including itself)
if the variety of this type is union . |
XSFacet |
getFacet(String name)
Gets the effective facet object of the given name.
|
List<XSFacet> |
getFacets(String name)
For multi-valued facets (enumeration and pattern), obtain all values.
|
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. |
XSSimpleType |
getSimpleBaseType()
Gets the base type as XSSimpleType.
|
XSVariety |
getVariety()
Gets the variety of this simple 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 |
isUnion()
Returns true if
this instanceof XSUnionSimpleType . |
void |
visit(XSSimpleTypeVisitor visitor) |
asComplexType, asSimpleType, getBaseType, getDerivationMethod, getRedefinedCount, isComplexType, isDerivedFrom, isSimpleType, listSubstitutables
getName, getTargetNamespace, isAnonymous, isGlobal, isLocal
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visit
apply, asEmpty, asParticle, asSimpleType, visit
XSSimpleType getSimpleBaseType()
(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.XSVariety getVariety()
XSSimpleType getPrimitiveType()
XSSimpleType
if
this type is atomic
.boolean isPrimitive()
XSListSimpleType getBaseListType()
XSListSimpleType
(including itself)
if the variety of this type is list
.XSUnionSimpleType getBaseUnionType()
XSUnionSimpleType
(including itself)
if the variety of this type is union
.boolean isFinal(XSVariety v)
XSVariety
.XSSimpleType getRedefinedBy()
XSSimpleType
is redefined by another simple type,
return that component.getRedefinedBy
in interface XSType
XSFacet getFacet(String name)
For 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.
List<XSFacet> getFacets(String name)
getFacet(String)
void visit(XSSimpleTypeVisitor visitor)
<T> T apply(XSSimpleTypeFunction<T> function)
boolean isRestriction()
this instanceof XSRestrictionSimpleType
.boolean isList()
this instanceof XSListSimpleType
.boolean isUnion()
this instanceof XSUnionSimpleType
.XSRestrictionSimpleType asRestriction()
XSListSimpleType asList()
XSUnionSimpleType asUnion()
Copyright © 2021 JBoss by Red Hat. All rights reserved.