public class UnionSimpleTypeImpl extends SimpleTypeImpl implements XSUnionSimpleType
| Modifier and Type | Field and Description |
|---|---|
private Ref.SimpleType[] |
memberTypes |
ownerDocumentEXTENSION, RESTRICTION, SUBSTITUTION| Constructor and Description |
|---|
UnionSimpleTypeImpl(SchemaDocumentImpl _parent,
AnnotationImpl _annon,
org.xml.sax.Locator _loc,
ForeignAttributesImpl _fa,
java.lang.String _name,
boolean _anonymous,
java.util.Set<XSVariety> finalSet,
Ref.SimpleType[] _members) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
apply(XSSimpleTypeFunction function) |
XSUnionSimpleType |
asUnion() |
XSUnionSimpleType |
getBaseUnionType()
Gets the nearest ancestor
XSUnionSimpleType (including itself)
if the variety of this type is union. |
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.
|
XSSimpleType |
getMember(int idx) |
int |
getMemberSize() |
XSSimpleType |
getPrimitiveType()
Gets the ancestor primitive
XSSimpleType if
this type is atomic. |
XSVariety |
getVariety()
Gets the variety of this simple type.
|
boolean |
isUnion()
Returns true if
this instanceof XSUnionSimpleType. |
java.util.Iterator<XSSimpleType> |
iterator() |
void |
visit(XSSimpleTypeVisitor visitor) |
apply, apply, asComplexType, asEmpty, asList, asParticle, asRestriction, asSimpleType, getBaseListType, getBaseType, getContentType, getDerivationMethod, getRedefinedBy, getRedefinedCount, getSimpleBaseType, getType, isComplexType, isDerivedFrom, isFinal, isList, isPrimitive, isRestriction, isSimpleType, listSubstitutables, redefine, visit, visitgetName, getTargetNamespace, isAnonymous, isGlobal, isLocalgetAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasList, asRestriction, getBaseListType, getRedefinedBy, getSimpleBaseType, isFinal, isList, isPrimitive, isRestrictionasComplexType, asSimpleType, getBaseType, getDerivationMethod, getRedefinedCount, isComplexType, isDerivedFrom, isSimpleType, listSubstitutablesgetName, getTargetNamespace, isAnonymous, isGlobal, isLocalapply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visitapply, asEmpty, asParticle, asSimpleType, visitprivate final Ref.SimpleType[] memberTypes
public UnionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, org.xml.sax.Locator _loc, ForeignAttributesImpl _fa, java.lang.String _name, boolean _anonymous, java.util.Set<XSVariety> finalSet, Ref.SimpleType[] _members)
public XSSimpleType getMember(int idx)
getMember in interface XSUnionSimpleTypepublic int getMemberSize()
getMemberSize in interface XSUnionSimpleTypepublic java.util.Iterator<XSSimpleType> iterator()
iterator in interface java.lang.Iterable<XSSimpleType>public void visit(XSSimpleTypeVisitor visitor)
visit in interface XSSimpleTypepublic java.lang.Object apply(XSSimpleTypeFunction function)
apply in interface XSSimpleTypepublic XSUnionSimpleType getBaseUnionType()
XSSimpleTypeXSUnionSimpleType (including itself)
if the variety of this type is union.getBaseUnionType in interface XSSimpleTypegetBaseUnionType in class SimpleTypeImplpublic 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 XSVariety getVariety()
XSSimpleTypegetVariety in interface XSSimpleTypepublic XSSimpleType getPrimitiveType()
XSSimpleTypeXSSimpleType if
this type is atomic.getPrimitiveType in interface XSSimpleTypepublic boolean isUnion()
XSSimpleTypethis instanceof XSUnionSimpleType.isUnion in interface XSSimpleTypeisUnion in class SimpleTypeImplpublic XSUnionSimpleType asUnion()
asUnion in interface XSSimpleTypeasUnion in class SimpleTypeImpl