com.saxonica.schema
Class FacetCollection

java.lang.Object
  extended bycom.saxonica.schema.FacetCollection

public class FacetCollection
extends java.lang.Object

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


Constructor Summary
FacetCollection(UserSimpleType owningType, java.util.List facets)
          Constructor
 
Method Summary
 void addFacet(Facet facet)
          Add the given Facet to this Simpletype.
 void convertFacetValues()
          Convert the values of facets to the target data type
 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

FacetCollection

public FacetCollection(UserSimpleType 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,
                                   UnresolvedReferenceException
Merge enumeration facets into a single enumerationSet pseudo-facet. This method also merges multiple pattern facets into a single pattern facet with multiple branches.

Throws:
SchemaException
UnresolvedReferenceException

getFacet

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

Returns:
the first facet associated with the given name
Throws:
ValidationException

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)
                             throws ValidationException
Return the facets having the given name

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
Throws:
ValidationException

getFacets

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

Returns:
an Iterator over all the Facets for this type
Throws:
ValidationException

convertFacetValues

public void convertFacetValues()
                        throws SchemaException
Convert the values of facets to the target data type

Throws:
SchemaException