This class should be considered as the implementation-detail, and applications should not access this class.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private final String | |
| protected static final ValidationContext | |
| private static final long | |
| private final String | |
| public final WhiteSpaceProcessor | whiteSpace
this field characterizes how this datatype treats white space. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| protected abstract Object | |
| protected abstract Object | _createValue(String content, ValidationContext context)
converts a whitespace-processed lexical value into the corresponding value object |
| protected abstract boolean | |
| public final void | checkValid(String content, ValidationContext context)
Implements org. |
| public final Object | createJavaObject(String literal, ValidationContext context)
Implements com. |
| public DatatypeStreamingValidator | createStreamingValidator(ValidationContext
If this datatype is context-dependent
(i.e. the context)isContextDependent method returns true),
then the caller must provide a non-null valid context object.
Otherwise, the caller can pass null.
The callee may keep a reference to this context object
only while the returned streaming validator is being used.Implements org. |
| public final Object | createValue(String lexicalValue, ValidationContext
If this datatype is context-dependent
(when the context)isContextDependent method returns true),
then the caller must provide a non-null valid context object.
Otherwise, the caller can pass null.Implements org. |
| public XSDatatype | getAncestorBuiltinType()
Implements com. |
| public String[] | getApplicableFacetNames()
Implements com. |
| public abstract ConcreteType | |
| public DataTypeWithFacet | Returns: null if no such facet object exists.Implements com. |
| public int | getIdType()
Implements org. |
| public String | |
| public String | getNamespaceUri()
Implements com. |
| public boolean | isAlwaysValid()
Implements com. |
| public boolean | isContextDependent()
Implements org. |
| public final boolean | isDerivedTypeOf(XSDatatype baseType, boolean
This test needs "a subset of {extension,restriction,list,union}
(of which only restriction is actually relevant). If this flag is
set to true, this method behaves as if the empty set is passed as the set.
This is usually what you want if you're simply trying to check the
derivation relationship.
restrictionAllowed)If this flag is set to false, this method behaves as if {restriction} is passed as the set. Implements com. |
| public static boolean | isDerivedTypeOf(XSDatatype base, XSDatatype derived, boolean restrictionAllowed)
an implementation of "Type Derivation OK (Simple)" of the spec. |
| public final boolean | isValid(String
the lexical representation to be checked. literal, ValidationContext If this datatype is context-dependent
(i.e. the context)isContextDependent method returns true),
then the caller must provide a non-null valid context object.
Otherwise, the caller can pass null.Implements org. |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| protected boolean | |
| public final boolean | sameValue(Object o1, Object o2)
Implements org. |
| public final int | valueHashCode(Object o)
Implements org. |
| ERR_DUPLICATE_FACET | back to summary |
|---|---|
| public static final String ERR_DUPLICATE_FACET | |
| ERR_EMPTY_UNION | back to summary |
|---|---|
| public static final String ERR_EMPTY_UNION | |
| ERR_ENUMERATION | back to summary |
|---|---|
| public static final String ERR_ENUMERATION | |
| ERR_ENUMERATION_WITH_ARG | back to summary |
|---|---|
| public static final String ERR_ENUMERATION_WITH_ARG | |
| ERR_FACET_MUST_BE_NON_NEGATIVE_INTEGER | back to summary |
|---|---|
| public static final String ERR_FACET_MUST_BE_NON_NEGATIVE_INTEGER | |
| ERR_FACET_MUST_BE_POSITIVE_INTEGER | back to summary |
|---|---|
| public static final String ERR_FACET_MUST_BE_POSITIVE_INTEGER | |
| ERR_INAPPROPRIATE_FOR_TYPE | back to summary |
|---|---|
| public static final String ERR_INAPPROPRIATE_FOR_TYPE | |
| ERR_INCONSISTENT_FACETS_1 | back to summary |
|---|---|
| public static final String ERR_INCONSISTENT_FACETS_1 | |
| ERR_INCONSISTENT_FACETS_2 | back to summary |
|---|---|
| public static final String ERR_INCONSISTENT_FACETS_2 | |
| ERR_INVALID_BASE_TYPE | back to summary |
|---|---|
| public static final String ERR_INVALID_BASE_TYPE | |
| ERR_INVALID_ITEMTYPE | back to summary |
|---|---|
| public static final String ERR_INVALID_ITEMTYPE | |
| ERR_INVALID_MEMBER_TYPE | back to summary |
|---|---|
| public static final String ERR_INVALID_MEMBER_TYPE | |
| ERR_INVALID_VALUE_FOR_THIS_TYPE | back to summary |
|---|---|
| public static final String ERR_INVALID_VALUE_FOR_THIS_TYPE | |
| ERR_INVALID_WHITESPACE_VALUE | back to summary |
|---|---|
| public static final String ERR_INVALID_WHITESPACE_VALUE | |
| ERR_LENGTH | back to summary |
|---|---|
| public static final String ERR_LENGTH | |
| ERR_LOOSENED_FACET | back to summary |
|---|---|
| public static final String ERR_LOOSENED_FACET | |
| ERR_MAXLENGTH | back to summary |
|---|---|
| public static final String ERR_MAXLENGTH | |
| ERR_MINLENGTH | back to summary |
|---|---|
| public static final String ERR_MINLENGTH | |
| ERR_NOT_APPLICABLE_FACET | back to summary |
|---|---|
| public static final String ERR_NOT_APPLICABLE_FACET | |
| ERR_OUT_OF_RANGE | back to summary |
|---|---|
| public static final String ERR_OUT_OF_RANGE | |
| ERR_OVERRIDING_FIXED_FACET | back to summary |
|---|---|
| public static final String ERR_OVERRIDING_FIXED_FACET | |
| ERR_PARSE_ERROR | back to summary |
|---|---|
| public static final String ERR_PARSE_ERROR | |
| ERR_PATTERN_1 | back to summary |
|---|---|
| public static final String ERR_PATTERN_1 | |
| ERR_PATTERN_MANY | back to summary |
|---|---|
| public static final String ERR_PATTERN_MANY | |
| ERR_SCALE_IS_GREATER_THAN_PRECISION | back to summary |
|---|---|
| public static final String ERR_SCALE_IS_GREATER_THAN_PRECISION | |
| ERR_TOO_MUCH_PRECISION | back to summary |
|---|---|
| public static final String ERR_TOO_MUCH_PRECISION | |
| ERR_TOO_MUCH_SCALE | back to summary |
|---|---|
| public static final String ERR_TOO_MUCH_SCALE | |
| ERR_X_AND_Y_ARE_EXCLUSIVE | back to summary |
|---|---|
| public static final String ERR_X_AND_Y_ARE_EXCLUSIVE | |
| namespaceUri | back to summary |
|---|---|
| private final String namespaceUri | |
| serializedValueChecker | back to summary |
|---|---|
| protected static final ValidationContext serializedValueChecker | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| typeName | back to summary |
|---|---|
| private final String typeName | |
| whiteSpace | back to summary |
|---|---|
| public final WhiteSpaceProcessor whiteSpace this field characterizes how this datatype treats white space. | |
| XSDatatypeImpl | back to summary |
|---|---|
| protected XSDatatypeImpl(String uri, String typeName, WhiteSpaceProcessor whiteSpace) | |
| _checkValid | back to summary |
|---|---|
| protected abstract void _checkValid(String content, ValidationContext context) throws DatatypeException actual 'meat' of the checkValid method | |
| _createJavaObject | back to summary |
|---|---|
| protected abstract Object _createJavaObject(String literal, ValidationContext context) | |
| _createValue | back to summary |
|---|---|
| protected abstract Object _createValue(String content, ValidationContext context) converts a whitespace-processed lexical value into the corresponding value object | |
| checkFormat | back to summary |
|---|---|
| protected abstract boolean checkFormat(String literal, ValidationContext context) | |
| checkValid | back to summary |
|---|---|
| public final void checkValid(String content, ValidationContext context) throws DatatypeException Implements org. Doc from org. Similar to the isValid method but throws an exception with diagnosis in case of errors. If the specified 'literal' is a valid lexical representation for this datatype, then this method must return without throwing any exception. If not, the callee must throw an exception (with diagnosis message, if possible.) The application can use this method to provide detailed error message to users. This method is kept separate from the isValid method to achieve higher performance during normal validation.
| |
| createJavaObject | back to summary |
|---|---|
| public final Object createJavaObject(String literal, ValidationContext context) Implements com. Doc from com. converts lexcial value to a corresponding Java-friendly object by using the given context information. For the actual types returned by each type, see here.
Note that due to the difference between those Java friendly types
and actual XML Schema specification, the returned object sometimes
loses accuracy. For example, the "time" type allows "0.0000000000001 sec"
which cannot be represented in
| |
| createStreamingValidator | back to summary |
|---|---|
| public DatatypeStreamingValidator createStreamingValidator(ValidationContext context) Implements org. Doc from org. Creates an instance of a streaming validator for this type. By using streaming validators instead of the isValid method, the caller can avoid keeping the entire string, which is sometimes quite big, in memory.
| |
| createValue | back to summary |
|---|---|
| public final Object createValue(String lexicalValue, ValidationContext context) Implements org. Doc from org. Converts lexcial value and the current context to the corresponding value object.
The caller cannot generally assume that the value object is
a meaningful Java object. For example, the caller cannot expect
this method to return
Also, the caller cannot assume that the equals method and
the hashCode method of the value object are consistent with
the semantics of the datatype. For that purpose, the sameValue
method and the valueHashCode method have to be used. Note that
this means you cannot use classes like
The returned value object should be used solely for the sameValue and valueHashCode methods.
| |
| getAncestorBuiltinType | back to summary |
|---|---|
| public XSDatatype getAncestorBuiltinType() Implements com. Doc from com. Gets the nearest ancestor built-in type. This method traverses the inheritance chain from this datatype to the root type (anySimpleType) and return the first built-in type it finds. For example, if you derive a type Foo from NCName and Bar from Foo, then this method returns NCName.
| |
| getApplicableFacetNames | back to summary |
|---|---|
| public String[] getApplicableFacetNames() Implements com. Doc from com. Gets the names of all applicable facets. | |
| getConcreteType | back to summary |
|---|---|
| public abstract ConcreteType getConcreteType() gets the concrete type object of the restriction chain. | |
| getFacetObject | back to summary |
|---|---|
| public DataTypeWithFacet getFacetObject(String facetName) Implements com. gets the facet object that restricts the specified facet
| |
| getIdType | back to summary |
|---|---|
| public int getIdType() Implements org. A property for RELAX NG DTD compatibility datatypes.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements com. Doc from com. gets the local name of the type. If this type is an anonymous type, then this method returns null. In the terminology of the spec, this method returns the name property of this simple type component. If the name property is absent, this method returns null. | |
| getNamespaceUri | back to summary |
|---|---|
| public String getNamespaceUri() Implements com. Doc from com. Gets the namespace URI of this simple type definition. | |
| isAlwaysValid | back to summary |
|---|---|
| public boolean isAlwaysValid() Implements com. Doc from com. Returns true if this datatype is known to accept any string. This is just a hint that allows the client code to do certain optimization. This method can return false even if the datatype actually accepts any string. That is, it's perfectly OK for any datatype to return false from this method. | |
| isContextDependent | back to summary |
|---|---|
| public boolean isContextDependent() Implements org. A property for RELAX NG DTD compatibility datatypes. Context-independent by default.
| |
| isDerivedTypeOf | back to summary |
|---|---|
| public final boolean isDerivedTypeOf(XSDatatype baseType, boolean restrictionAllowed) Implements com. Doc from com. tests if this type is a derived type of the specified type. This method is an implementation of "Type Derivation OK (Simple)" of the spec. Therefore use caution if what you want is a casual method because this method may cause a lot of unintuitive result. Note to implementors Use the static version of this method defined in the XSDatatypeImpl class. You don't need to implement this method from scratch.
| |
| isDerivedTypeOf | back to summary |
|---|---|
| public static boolean isDerivedTypeOf(XSDatatype base, XSDatatype derived, boolean restrictionAllowed) an implementation of "Type Derivation OK (Simple)" of the spec.
| |
| isValid | back to summary |
|---|---|
| public final boolean isValid(String literal, ValidationContext context) Implements org. Doc from org. Checks if the specified 'literal' matches this Datatype with respect to the current context.
| |
| localize | back to summary |
|---|---|
| public static String localize(String prop, Object[] args) | |
| localize | back to summary |
|---|---|
| public static String localize(String prop) | |
| localize | back to summary |
|---|---|
| public static String localize(String prop, Object arg1) | |
| localize | back to summary |
|---|---|
| public static String localize(String prop, Object arg1, Object arg2) | |
| localize | back to summary |
|---|---|
| public static String localize(String prop, Object arg1, Object arg2, Object arg3) | |
| needValueCheck | back to summary |
|---|---|
| protected boolean needValueCheck() | |
| sameValue | back to summary |
|---|---|
| public final boolean sameValue(Object o1, Object o2) Implements org. Doc from org. Tests the equality of two value objects which were originally created by the createValue method of this object. The behavior is undefined if objects not created by this type are passed. It is the caller's responsibility to ensure that value objects belong to this type.
| |
| valueHashCode | back to summary |
|---|---|
| public final int valueHashCode(Object o) Implements org. Doc from org. Computes the hash code for a value object, which is consistent with the sameValue method.
| |