Top Description Fields Constructors Methods
com.sun.msv.datatype.xsd

pack-priv abstract Class IntegerDerivedType

extends BuiltinAtomicType
implements Comparator
Class Inheritance
All Implemented Interfaces
com.sun.msv.datatype.xsd.Comparator
Known Direct Subclasses
com.sun.msv.datatype.xsd.IntegerType, com.sun.msv.datatype.xsd.ShortType, com.sun.msv.datatype.xsd.IntType, com.sun.msv.datatype.xsd.ByteType, com.sun.msv.datatype.xsd.LongType
Imports
com.sun.msv.datatype.SerializationContext, org.relaxng.datatype.DatatypeException, .ValidationContext

base class for types derived from integer.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
private final XSDatatypeImpl
private static final long

Constructor Summary

AccessConstructor and Description
protected
IntegerDerivedType(String typeName, XSDatatypeImpl _baseFacets)

Method Summary

Modifier and TypeMethod and Description
protected final boolean
public final int
compare(Object o1, Object o2)

Implements com.sun.msv.datatype.xsd.Comparator.compare.

compare to value types and decides its order relation
public String
convertToLexicalValue(Object value, SerializationContext
Context information that will be possibly used for the conversion. Currently, this object is used only by QName, but may be extended in the future.
context
)

Implements com.sun.msv.datatype.xsd.XSDatatype.convertToLexicalValue.

converts value object back to the corresponding value in the lexical space.
protected static XSDatatypeImpl
createRangeFacet(XSDatatypeImpl baseType, Number min, Number max)

Apply a range facet.

public DataTypeWithFacet
getFacetObject(String facetName)

Overrides com.sun.msv.datatype.xsd.XSDatatypeImpl.getFacetObject.

Implements com.sun.msv.datatype.xsd.XSDatatype.getFacetObject.

gets the facet object that restricts the specified facet
public final int
isFacetApplicable(String facetName)

Implements com.sun.msv.datatype.xsd.XSDatatype.isFacetApplicable.

returns if the specified facet is applicable to this datatype.
protected static String
removeOptionalPlus(String s)

removes leading optional '+' sign.

Inherited from com.sun.msv.datatype.xsd.BuiltinAtomicType:
displayNamegetVarietyreadResolve

Field Detail

baseFacetsback to summary
private final XSDatatypeImpl baseFacets
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.sun.msv.datatype.xsd.BuiltinAtomicType.serialVersionUID.

Constructor Detail

IntegerDerivedTypeback to summary
protected IntegerDerivedType(String typeName, XSDatatypeImpl _baseFacets)

Method Detail

checkFormatback to summary
protected final boolean checkFormat(String content, ValidationContext context)

Implements abstract com.sun.msv.datatype.xsd.XSDatatypeImpl.checkFormat.

compareback to summary
public final int compare(Object o1, Object o2)

Implements com.sun.msv.datatype.xsd.Comparator.compare.

Doc from com.sun.msv.datatype.xsd.Comparator.compare.

compare to value types and decides its order relation

convertToLexicalValueback to summary
public String convertToLexicalValue(Object value, SerializationContext context)

Implements com.sun.msv.datatype.xsd.XSDatatype.convertToLexicalValue.

Doc from com.sun.msv.datatype.xsd.XSDatatype.convertToLexicalValue.

converts value object back to the corresponding value in the lexical space.

This method does the reverse operation of the createValue method. The returned string is not necessarily the canonical representation. Also note that the implementation may accept invalid values without throwing IllegalArgumentException. To make sure that the result is actually a valid representation, call the isValid method.

Be careful not to confuse this method with The serializeJavaObject method, which is defined in the DatabindableDatatype method.

Parameters
context:SerializationContext

Context information that will be possibly used for the conversion. Currently, this object is used only by QName, but may be extended in the future.

createRangeFacetback to summary
protected static XSDatatypeImpl createRangeFacet(XSDatatypeImpl baseType, Number min, Number max)

Apply a range facet.

getFacetObjectback to summary
public DataTypeWithFacet getFacetObject(String facetName)

Overrides com.sun.msv.datatype.xsd.XSDatatypeImpl.getFacetObject.

Implements com.sun.msv.datatype.xsd.XSDatatype.getFacetObject.

Doc from com.sun.msv.datatype.xsd.XSDatatypeImpl.getFacetObject.

gets the facet object that restricts the specified facet

Returns:DataTypeWithFacet

null if no such facet object exists.

isFacetApplicableback to summary
public final int isFacetApplicable(String facetName)

Implements com.sun.msv.datatype.xsd.XSDatatype.isFacetApplicable.

Doc from com.sun.msv.datatype.xsd.XSDatatype.isFacetApplicable.

returns if the specified facet is applicable to this datatype.

Returns:int

APPLICABLE
if the facet is applicable
FIXED
if the facet is already fixed (that is,not applicable)
NOT_ALLOWED
if the facet is not applicable to this datatype at all. this value is also returned for unknown facets.
removeOptionalPlusback to summary
protected static String removeOptionalPlus(String s)

removes leading optional '+' sign. Several Java conversion functions (e.g., Long.parseLong) do not accept leading '+' sign.