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

public Class Proxy

extends XSDatatypeImpl
Class Inheritance
Known Direct Subclasses
com.sun.msv.datatype.xsd.FinalComponent
Imports
com.sun.msv.datatype.SerializationContext, org.relaxng.datatype.DatatypeException, .ValidationContext

Delegates all methods to the base type.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
public final XSDatatypeImpl
baseType

immediate base type, which may be a concrete type or DataTypeWithFacet

private static final long
Inherited from com.sun.msv.datatype.xsd.XSDatatypeImpl:
ERR_DUPLICATE_FACETERR_EMPTY_UNIONERR_ENUMERATIONERR_ENUMERATION_WITH_ARGERR_FACET_MUST_BE_NON_NEGATIVE_INTEGERERR_FACET_MUST_BE_POSITIVE_INTEGERERR_INAPPROPRIATE_FOR_TYPEERR_INCONSISTENT_FACETS_1ERR_INCONSISTENT_FACETS_2ERR_INVALID_BASE_TYPEERR_INVALID_ITEMTYPEERR_INVALID_MEMBER_TYPEERR_INVALID_VALUE_FOR_THIS_TYPEERR_INVALID_WHITESPACE_VALUEERR_LENGTHERR_LOOSENED_FACETERR_MAXLENGTHERR_MINLENGTHERR_NOT_APPLICABLE_FACETERR_OUT_OF_RANGEERR_OVERRIDING_FIXED_FACETERR_PARSE_ERRORERR_PATTERN_1ERR_PATTERN_MANYERR_SCALE_IS_GREATER_THAN_PRECISIONERR_TOO_MUCH_PRECISIONERR_TOO_MUCH_SCALEERR_X_AND_Y_ARE_EXCLUSIVEserializedValueCheckerwhiteSpace

Constructor Summary

AccessConstructor and Description
public
Proxy(String nsUri, String newTypeName, XSDatatypeImpl baseType)

Method Summary

Modifier and TypeMethod and Description
public void
_checkValid(String content, ValidationContext context)

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

actual 'meat' of the checkValid method
public Object
public Object
_createValue(String content, ValidationContext context)

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

converts a whitespace-processed lexical value into the corresponding value object
public boolean
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.
public String
displayName()

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

gets the displayable name of this type.
public final XSDatatype
getBaseType()

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

gets the base type of this type.
public ConcreteType
getConcreteType()

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

gets the concrete type object of the restriction chain.
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 int
getIdType()

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

Implements org.relaxng.datatype.Datatype.getIdType.

A property for RELAX NG DTD compatibility datatypes.
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 int
getVariety()

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

gets the variety of this simple type.
public boolean
public int
isFacetApplicable(String facetName)

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

returns if the specified facet is applicable to this datatype.
public boolean
isFinal(int
one of pre-defined values (DERIVATION_BY_XXX).
derivationType
)

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

checks if this type is declared as final for the specified kind of derivation.
public 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
)

Implements com.sun.msv.datatype.DatabindableDatatype.serializeJavaObject.

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

Field Detail

baseTypeback to summary
public final XSDatatypeImpl baseType

immediate base type, which may be a concrete type or DataTypeWithFacet

serialVersionUIDback to summary
private static final long serialVersionUID

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

Constructor Detail

Proxyback to summary
public Proxy(String nsUri, String newTypeName, XSDatatypeImpl baseType)

Method Detail

_checkValidback to summary
public void _checkValid(String content, ValidationContext context) throws DatatypeException

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

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

actual 'meat' of the checkValid method

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

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

_createValueback to summary
public Object _createValue(String content, ValidationContext context)

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

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

converts a whitespace-processed lexical value into the corresponding value object

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

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

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.

displayNameback to summary
public String displayName()

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

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

gets the displayable name of this type. This method always return something. It is useful to provide a message to the user.

This method is an ad-hoc method and there is no corresponding property in the spec.

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.

getConcreteTypeback to summary
public ConcreteType getConcreteType()

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

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

gets the concrete type object of the restriction chain.

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.

getIdTypeback to summary
public int getIdType()

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

Implements org.relaxng.datatype.Datatype.getIdType.

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

A property for RELAX NG DTD compatibility datatypes. ID_TYPE_NULL is returned by default.

Returns:int

Doc from org.relaxng.datatype.Datatype.getIdType.

If this datatype doesn't have any ID/IDREF semantics, it returns ID_TYPE_NULL. If it has such a semantics (for example, XSD:ID, XSD:IDREF and comp:ID type), then it returns ID_TYPE_ID, ID_TYPE_IDREF or ID_TYPE_IDREFS.

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.

getVarietyback to summary
public int getVariety()

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

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

gets the variety of this simple type.

Returns:int

VARIETY_ATOMIC, VARIETY_LIST, or VARIETY_UNION.

isContextDependentback to summary
public boolean isContextDependent()

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

Implements org.relaxng.datatype.Datatype.isContextDependent.

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

A property for RELAX NG DTD compatibility datatypes. Context-independent by default.

Returns:boolean

Doc from org.relaxng.datatype.Datatype.isContextDependent.

true if this datatype is context-dependent (it needs a context object sometimes); false if this datatype is context-independent (it never needs a context object).

isFacetApplicableback to summary
public 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.
isFinalback to summary
public boolean isFinal(int derivationType)

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

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

checks if this type is declared as final for the specified kind of derivation.

In the terminology of the spec, this method can be used to examine the final property of this component.

Parameters
derivationType:int

one of pre-defined values (DERIVATION_BY_XXX).

serializeJavaObjectback to summary
public String serializeJavaObject(Object value, SerializationContext context)

Implements com.sun.msv.datatype.DatabindableDatatype.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.