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

pack-priv abstract Class BinaryBaseType

extends BuiltinAtomicType
implements Discrete
Class Inheritance
All Implemented Interfaces
com.sun.msv.datatype.xsd.Discrete
Known Direct Subclasses
com.sun.msv.datatype.xsd.HexBinaryType, com.sun.msv.datatype.xsd.Base64BinaryType
Imports
com.sun.msv.datatype.SerializationContext, org.relaxng.datatype.ValidationContext

base implementation for "hexBinary" and "base64Binary" types.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
public final int
countLength(Object value)

Implements com.sun.msv.datatype.xsd.Discrete.countLength.

count the number of item in value type.
public final XSDatatype
getBaseType()

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

gets the base type of this type.
public Class<T>
getJavaObjectType()

Implements com.sun.msv.datatype.DatabindableDatatype.getJavaObjectType.

gets the type of the objects that are created by the createJavaObject method.
public final int
isFacetApplicable(String facetName)

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

returns if the specified facet is applicable to this datatype.
public abstract String
serializeJavaObject(Object value, SerializationContext
The context object is used to obtain information necessary to serialize the value object. For example, QName type uses the context to encode the URI into a prefix.
context
)

Redeclares com.sun.msv.datatype.DatabindableDatatype.serializeJavaObject.

Overrides com.sun.msv.datatype.xsd.ConcreteType.serializeJavaObject.

converts a value object back to the lexical representation.
Inherited from com.sun.msv.datatype.xsd.BuiltinAtomicType:
displayNamegetVarietyreadResolve

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

BinaryBaseTypeback to summary
pack-priv BinaryBaseType(String typeName)

Method Detail

_createJavaObjectback to summary
public Object _createJavaObject(String literal, ValidationContext context)

Overrides com.sun.msv.datatype.xsd.ConcreteType._createJavaObject.

countLengthback to summary
public final int countLength(Object value)

Implements com.sun.msv.datatype.xsd.Discrete.countLength.

Doc from com.sun.msv.datatype.xsd.Discrete.countLength.

count the number of item in value type. Actual semantics of this method varies.

getBaseTypeback to summary
public final XSDatatype getBaseType()

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

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

gets the base type of this type. This method returns null if this object represents the simple ur-type.

This method is intended to capture the semantics of the base type definition property of the simple type component, but there is an important difference.

Specifically, if you derive a type D from another type B, then calling D.getBaseType() does not necessarily return B. Instead, it may return an intermediate object (that represents a facet). Calling the getBaseType method recursively will eventually return B.

getJavaObjectTypeback to summary
public Class<T> getJavaObjectType()

Implements com.sun.msv.datatype.DatabindableDatatype.getJavaObjectType.

Doc from com.sun.msv.datatype.DatabindableDatatype.getJavaObjectType.

gets the type of the objects that are created by the createJavaObject method.

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.
serializeJavaObjectback to summary
public abstract String serializeJavaObject(Object value, SerializationContext context)

Redeclares com.sun.msv.datatype.DatabindableDatatype.serializeJavaObject.

Overrides com.sun.msv.datatype.xsd.ConcreteType.serializeJavaObject.

Doc from com.sun.msv.datatype.DatabindableDatatype.serializeJavaObject.

converts a value object back to the lexical representation.

This method is a kind of the "reverse" function of the createJavaObject method.

Parameters
context:SerializationContext

The context object is used to obtain information necessary to serialize the value object. For example, QName type uses the context to encode the URI into a prefix.

Returns:String

null if the given object is invalid with respect to this datatype.