Top Fields Constructors Methods
com.sun.xml.xsom.impl

public Class UnionSimpleTypeImpl

extends SimpleTypeImpl
implements XSUnionSimpleType
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.XSUnionSimpleType, java.lang.Iterable, com.sun.xml.xsom.XSSimpleType, com.sun.xml.xsom.XSContentType, com.sun.xml.xsom.XSComponent, com.sun.xml.xsom.XSType, com.sun.xml.xsom.XSDeclaration
Imports
com.sun.xml.xsom.XSFacet, .XSSimpleType, .XSUnionSimpleType, .XSVariety, com.sun.xml.xsom.impl.parser.SchemaDocumentImpl, com.sun.xml.xsom.visitor.XSSimpleTypeFunction, .XSSimpleTypeVisitor, org.xml.sax.Locator, java.util.Iterator, .Set, .List, .Collections

Field Summary

Modifier and TypeField and Description
private final Ref.SimpleType[]

Constructor Summary

AccessConstructor and Description
public
UnionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType[] _members)

Method Summary

Modifier and TypeMethod and Description
public <T> T
public XSUnionSimpleType
public XSUnionSimpleType
getBaseUnionType()

Overrides com.sun.xml.xsom.impl.SimpleTypeImpl.getBaseUnionType.

Implements com.sun.xml.xsom.XSSimpleType.getBaseUnionType.

Gets the nearest ancestor XSUnionSimpleType (including itself) if the variety of this type is union.

public XSFacet
getFacet(String name)

Implements com.sun.xml.xsom.XSSimpleType.getFacet.

Gets the effective facet object of the given name.

public List<XSFacet>
getFacets(String name)

Implements com.sun.xml.xsom.XSSimpleType.getFacets.

For multi-valued facets (enumeration and pattern), obtain all values.

public XSSimpleType
public int
public XSSimpleType
getPrimitiveType()

Implements com.sun.xml.xsom.XSSimpleType.getPrimitiveType.

Gets the ancestor primitive if this type is atomic.

public XSVariety
getVariety()

Implements com.sun.xml.xsom.XSSimpleType.getVariety.

Gets the variety of this simple type.

public boolean
isUnion()

Overrides com.sun.xml.xsom.impl.SimpleTypeImpl.isUnion.

Implements com.sun.xml.xsom.XSSimpleType.isUnion.

Returns true if this instanceof XSUnionSimpleType.

public Iterator<XSSimpleType>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public void
Inherited from com.sun.xml.xsom.impl.SimpleTypeImpl:
applyapplyasComplexTypeasEmptyasListasParticleasRestrictionasSimpleTypegetBaseListTypegetBaseTypegetContentTypegetDerivationMethodgetRedefinedBygetRedefinedCountgetSimpleBaseTypegetTypeisComplexTypeisDerivedFromisFinalisListisPrimitiveisRestrictionisSimpleTypelistSubstitutablesredefinevisitvisit

Field Detail

memberTypesback to summary
private final Ref.SimpleType[] memberTypes

Constructor Detail

UnionSimpleTypeImplback to summary
public UnionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType[] _members)

Method Detail

applyback to summary
public <T> T apply(XSSimpleTypeFunction<T> function)

Implements com.sun.xml.xsom.XSSimpleType.apply.

asUnionback to summary
public XSUnionSimpleType asUnion()

Overrides com.sun.xml.xsom.impl.SimpleTypeImpl.asUnion.

Implements com.sun.xml.xsom.XSSimpleType.asUnion.

getBaseUnionTypeback to summary
public XSUnionSimpleType getBaseUnionType()

Overrides com.sun.xml.xsom.impl.SimpleTypeImpl.getBaseUnionType.

Implements com.sun.xml.xsom.XSSimpleType.getBaseUnionType.

Doc from com.sun.xml.xsom.XSSimpleType.getBaseUnionType.

Gets the nearest ancestor XSUnionSimpleType (including itself) if the variety of this type is union.

getFacetback to summary
public XSFacet getFacet(String name)

Implements com.sun.xml.xsom.XSSimpleType.getFacet.

Doc from com.sun.xml.xsom.XSSimpleType.getFacet.

Gets 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.

getFacetsback to summary
public List<XSFacet> getFacets(String name)

Implements com.sun.xml.xsom.XSSimpleType.getFacets.

Doc from com.sun.xml.xsom.XSSimpleType.getFacets.

For multi-valued facets (enumeration and pattern), obtain all values.

getMemberback to summary
public XSSimpleType getMember(int idx)

Implements com.sun.xml.xsom.XSUnionSimpleType.getMember.

getMemberSizeback to summary
public int getMemberSize()

Implements com.sun.xml.xsom.XSUnionSimpleType.getMemberSize.

getPrimitiveTypeback to summary
public XSSimpleType getPrimitiveType()

Implements com.sun.xml.xsom.XSSimpleType.getPrimitiveType.

Doc from com.sun.xml.xsom.XSSimpleType.getPrimitiveType.

Gets the ancestor primitive if this type is atomic.

getVarietyback to summary
public XSVariety getVariety()

Implements com.sun.xml.xsom.XSSimpleType.getVariety.

Doc from com.sun.xml.xsom.XSSimpleType.getVariety.

Gets the variety of this simple type.

isUnionback to summary
public boolean isUnion()

Overrides com.sun.xml.xsom.impl.SimpleTypeImpl.isUnion.

Implements com.sun.xml.xsom.XSSimpleType.isUnion.

Doc from com.sun.xml.xsom.XSSimpleType.isUnion.

Returns true if this instanceof XSUnionSimpleType.

iteratorback to summary
public Iterator<XSSimpleType> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

visitback to summary
public void visit(XSSimpleTypeVisitor visitor)

Implements com.sun.xml.xsom.XSSimpleType.visit.