Class UnionSimpleTypeImpl
java.lang.Object
com.sun.xml.xsom.impl.ComponentImpl
com.sun.xml.xsom.impl.DeclarationImpl
com.sun.xml.xsom.impl.SimpleTypeImpl
com.sun.xml.xsom.impl.UnionSimpleTypeImpl
- All Implemented Interfaces:
ContentTypeImpl, Ref.ContentType, Ref.SimpleType, Ref.Type, XSComponent, XSContentType, XSDeclaration, XSSimpleType, XSType, XSUnionSimpleType, Iterable<XSSimpleType>
-
Field Summary
FieldsFields inherited from class ComponentImpl
ownerDocumentFields inherited from interface XSType
EXTENSION, RESTRICTION, SUBSTITUTION -
Constructor Summary
ConstructorsConstructorDescriptionUnionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType[] _members) -
Method Summary
Modifier and TypeMethodDescriptionapply(XSSimpleTypeFunction function) asUnion()Gets the nearest ancestorXSUnionSimpleType(including itself) if the variety of this type isunion.Gets the effective facet object of the given name.For multi-valued facets (enumeration and pattern), obtain all values.getMember(int idx) intGets the ancestor primitiveXSSimpleTypeif this type isatomic.Gets the variety of this simple type.booleanisUnion()Returns true ifthis instanceof XSUnionSimpleType.iterator()voidvisit(XSSimpleTypeVisitor visitor) Methods inherited from class SimpleTypeImpl
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, visitMethods inherited from class DeclarationImpl
getName, getTargetNamespace, isAnonymous, isGlobal, isLocalMethods inherited from class ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface XSComponent
apply, getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, visitMethods inherited from interface XSContentType
apply, asEmpty, asParticle, asSimpleType, visitMethods inherited from interface XSDeclaration
getName, getTargetNamespace, isAnonymous, isGlobal, isLocalMethods inherited from interface XSSimpleType
asList, asRestriction, getBaseListType, getRedefinedBy, getSimpleBaseType, isFinal, isList, isPrimitive, isRestrictionMethods inherited from interface XSType
asComplexType, asSimpleType, getBaseType, getDerivationMethod, getRedefinedCount, isComplexType, isDerivedFrom, isSimpleType, listSubstitutables
-
Field Details
-
memberTypes
-
-
Constructor Details
-
UnionSimpleTypeImpl
public UnionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType[] _members)
-
-
Method Details
-
getMember
- Specified by:
getMemberin interfaceXSUnionSimpleType
-
getMemberSize
public int getMemberSize()- Specified by:
getMemberSizein interfaceXSUnionSimpleType
-
iterator
- Specified by:
iteratorin interfaceIterable<XSSimpleType>
-
visit
- Specified by:
visitin interfaceXSSimpleType
-
apply
- Specified by:
applyin interfaceXSSimpleType
-
getBaseUnionType
Description copied from interface:XSSimpleTypeGets the nearest ancestorXSUnionSimpleType(including itself) if the variety of this type isunion.- Specified by:
getBaseUnionTypein interfaceXSSimpleType- Overrides:
getBaseUnionTypein classSimpleTypeImpl- Returns:
- otherwise return null
-
getFacet
Description copied from interface:XSSimpleTypeGets the effective facet object of the given 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.
- Specified by:
getFacetin interfaceXSSimpleType- Returns:
- If this datatype has a facet of the given name, return that object. If the facet is not specified anywhere in its derivation chain, null will be returned.
-
getFacets
Description copied from interface:XSSimpleTypeFor multi-valued facets (enumeration and pattern), obtain all values.- Specified by:
getFacetsin interfaceXSSimpleType- Returns:
- can be empty but never null.
- See Also:
-
getVariety
Description copied from interface:XSSimpleTypeGets the variety of this simple type.- Specified by:
getVarietyin interfaceXSSimpleType
-
getPrimitiveType
Description copied from interface:XSSimpleTypeGets the ancestor primitiveXSSimpleTypeif this type isatomic.- Specified by:
getPrimitiveTypein interfaceXSSimpleType- Returns:
- null otherwise.
-
isUnion
public boolean isUnion()Description copied from interface:XSSimpleTypeReturns true ifthis instanceof XSUnionSimpleType.- Specified by:
isUnionin interfaceXSSimpleType- Overrides:
isUnionin classSimpleTypeImpl
-
asUnion
- Specified by:
asUnionin interfaceXSSimpleType- Overrides:
asUnionin classSimpleTypeImpl
-