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

public Class RestrictionSimpleTypeImpl

extends SimpleTypeImpl
implements XSRestrictionSimpleType
Class Inheritance
All Implemented Interfaces
com.sun.xml.xsom.XSRestrictionSimpleType, 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, .XSRestrictionSimpleType, .XSVariety, .XSSimpleType, com.sun.xml.xsom.impl.parser.SchemaDocumentImpl, com.sun.xml.xsom.visitor.XSSimpleTypeFunction, .XSSimpleTypeVisitor, org.xml.sax.Locator, java.util.ArrayList, .Collection, .Iterator, .List, .Set

Field Summary

Modifier and TypeField and Description
private final List<XSFacet>

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
public void
public <T> T
public XSRestrictionSimpleType
public XSFacet
getDeclaredFacet(String name)

Implements com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacet.

Gets the declared facet object of the given name.

public Collection<? extends XSFacet>
getDeclaredFacets()

Implements com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacets.

Gets all the facets that are declared on this restriction.

public List<XSFacet>
getDeclaredFacets(String name)

Implements com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacets.

Gets the declared facets of the given name.

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
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
isPrimitive()

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

Implements com.sun.xml.xsom.XSSimpleType.isPrimitive.

Returns true if this is a primitive built-in simple type (that directly derives from xs:anySimpleType, by definition.)

public boolean
isRestriction()

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

Implements com.sun.xml.xsom.XSSimpleType.isRestriction.

Returns true if this instanceof XSRestrictionSimpleType.

public Iterator<XSFacet>
iterateDeclaredFacets()

Implements com.sun.xml.xsom.XSRestrictionSimpleType.iterateDeclaredFacets.

Iterates facets that are specified in this step of derivation.

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

Field Detail

facetsback to summary
private final List<XSFacet> facets

Constructor Detail

RestrictionSimpleTypeImplback to summary
public RestrictionSimpleTypeImpl(SchemaDocumentImpl _parent, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl _fa, String _name, boolean _anonymous, Set<XSVariety> finalSet, Ref.SimpleType _baseType)

Method Detail

addFacetback to summary
public void addFacet(XSFacet facet)
applyback to summary
public <T> T apply(XSSimpleTypeFunction<T> function)

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

asRestrictionback to summary
public XSRestrictionSimpleType asRestriction()

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

Implements com.sun.xml.xsom.XSSimpleType.asRestriction.

getDeclaredFacetback to summary
public XSFacet getDeclaredFacet(String name)

Implements com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacet.

Doc from com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacet.

Gets the declared facet object of the given name.

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

getDeclaredFacetsback to summary
public Collection<? extends XSFacet> getDeclaredFacets()

Implements com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacets.

Doc from com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacets.

Gets all the facets that are declared on this restriction.

getDeclaredFacetsback to summary
public List<XSFacet> getDeclaredFacets(String name)

Implements com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacets.

Doc from com.sun.xml.xsom.XSRestrictionSimpleType.getDeclaredFacets.

Gets the declared facets of the given name. This method is for those facets (such as 'pattern') that can be specified multiple times on a simple type.

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.

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.

isPrimitiveback to summary
public boolean isPrimitive()

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

Implements com.sun.xml.xsom.XSSimpleType.isPrimitive.

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

Returns true if this is a primitive built-in simple type (that directly derives from xs:anySimpleType, by definition.)

isRestrictionback to summary
public boolean isRestriction()

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

Implements com.sun.xml.xsom.XSSimpleType.isRestriction.

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

Returns true if this instanceof XSRestrictionSimpleType.

iterateDeclaredFacetsback to summary
public Iterator<XSFacet> iterateDeclaredFacets()

Implements com.sun.xml.xsom.XSRestrictionSimpleType.iterateDeclaredFacets.

Doc from com.sun.xml.xsom.XSRestrictionSimpleType.iterateDeclaredFacets.

Iterates facets that are specified in this step of derivation.

visitback to summary
public void visit(XSSimpleTypeVisitor visitor)

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