com.saxonica.schema
Class ScaleFacet

java.lang.Object
  extended by com.saxonica.schema.Facet
      extended by com.saxonica.schema.ScaleFacet
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MaxScaleFacet, MinScaleFacet

public abstract class ScaleFacet
extends Facet

Represents either of the facets minScale or maxScale

See Also:
Serialized Form

Constructor Summary
ScaleFacet()
           
 
Method Summary
 void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler)
          Check that this facet is legal when used on a type derived by restriction
 int getNumericValue()
          Get the value of this facet as an integer
 String getValue()
          Get the value of this facet as a string
 void setNumericValue(int value)
          Set the value of this facet as an integer
 void setValue(String value)
          Set the value of this facet as a string
 
Methods inherited from class com.saxonica.schema.Facet
getMessage, getName, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testAtomicValue, testLength, testListValue, toLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScaleFacet

public ScaleFacet()
Method Detail

setValue

public void setValue(String value)
              throws SchemaException
Set the value of this facet as a string

Parameters:
value - the string value of the facet
Throws:
SchemaException

getValue

public String getValue()
Get the value of this facet as a string

Specified by:
getValue in class Facet
Returns:
the value of this facet as a string

getNumericValue

public int getNumericValue()
Get the value of this facet as an integer


setNumericValue

public void setNumericValue(int value)
Set the value of this facet as an integer


checkFacetRestriction

public void checkFacetRestriction(UserSimpleType type,
                                  SimpleType base,
                                  SchemaCompiler compiler)
                           throws SchemaException,
                                  ValidationException
Check that this facet is legal when used on a type derived by restriction

Overrides:
checkFacetRestriction in class Facet
Parameters:
base - the type from which the restricted type is derived
compiler -
type - the type on which the facet is defined
Throws:
SchemaException - if the facet is not allowed for this simple type, or if the combination of facets is inconsistent with values defined on the base type.
ValidationException


Copyright (c) 2004-2010 Saxonica Limited. All rights reserved.