Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.schema
Class FacetCollectionImpl

java.lang.Object
  |
  +--com.saxonica.schema.FacetCollectionImpl
All Implemented Interfaces:
FacetCollection

public class FacetCollectionImpl
extends java.lang.Object
implements FacetCollection

A collection of facets. This is a helper class for SimpleType


Constructor Summary
FacetCollectionImpl(SimpleType owningType, java.util.List facets)
          Constructor
 
Method Summary
 void addFacet(Facet facet)
          Add the given Facet to this Simpletype.
 Facet getFacet(java.lang.String name)
          Returns the first facet associated with the given name, defined either on this type or on a type from which it is derived
 java.util.List getFacetList()
          Return all the facets for this type
 java.util.Iterator getFacets()
          Returns an Iterator over all the Facets (including inherited facets) for this type.
 java.util.Iterator getFacets(java.lang.String name)
          Return the facets having the given name
 void mergeEnumerationFacets()
          Merge enumeration facets into a single enumerationSet pseudo-facet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacetCollectionImpl

public FacetCollectionImpl(SimpleType owningType,
                           java.util.List facets)
Constructor

Parameters:
owningType - the type whose facets are included in this collect
facets - the facets defined locally in this type
Method Detail

addFacet

public void addFacet(Facet facet)
Add the given Facet to this Simpletype.

Parameters:
facet - the Facet to add to this Simpletype

mergeEnumerationFacets

public void mergeEnumerationFacets()
                            throws SchemaException
Merge enumeration facets into a single enumerationSet pseudo-facet. This method also merges multiple pattern facets into a single pattern facet with multiple branches.

SchemaException

getFacet

public Facet getFacet(java.lang.String name)
Returns the first facet associated with the given name, defined either on this type or on a type from which it is derived

Specified by:
getFacet in interface FacetCollection
Returns:
the first facet associated with the given name

getFacetList

public java.util.List getFacetList()
Return all the facets for this type

Returns:
the list of facets defined on this simple type (this doesn't include inherited facets)

getFacets

public java.util.Iterator getFacets(java.lang.String name)
Return the facets having the given name

Specified by:
getFacets in interface FacetCollection
Parameters:
name - the required facet name, for example "totalDigits" or "maxInclusive"
Returns:
an iterator over all the facets with the given name, including those defined on a type from which this is derived by restriction or by union

getFacets

public java.util.Iterator getFacets()
Returns an Iterator over all the Facets (including inherited facets) for this type.

Specified by:
getFacets in interface FacetCollection
Returns:
an Iterator over all the Facets for this type


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.