com.ibm.websphere.fabric.da.types
Class TypedValue
java.lang.Object
com.ibm.websphere.fabric.types.TypedValue
com.ibm.websphere.fabric.da.types.TypedValue
- All Implemented Interfaces:
- java.io.Serializable
public final class TypedValue
- extends TypedValue
- implements java.io.Serializable
Representation for the string form of a typed value modelled similar to RDF's typed-literals.
Some examples of usage:
new TypedValue("a string", "http://www.w3.org/2001/XMLSchema#string")
a string
new TypedValue("a string")
shortcut for creating a string
new TypedValue("true", "http://www.w3.org/2001/XMLSchema#boolean")
the boolean value true
new TypedValue("[1 - 4, 6, 8]", "http://my.domain.com/custom#pages")
a string representation of a datatype that is not available in the standard java.*
libraries.
This type is used in property maps
.
Instances of this type are immutable, and therefore thread-safe.
Note about Unicode normalization -- this class does not perform any normalization,
and therefore may indicate two strings that would have been equal after normalization
as inequal. Users of this class are advised to establish a normalization standard.
They are further encouraged to use normalization form 'C' as it is the most compact
representation.
- Version:
- $Id: $
- Author:
- dranatunga
- See Also:
- RDF typed-literals,
Unicode normalization forms,
Serialized Form
Constructor Summary |
TypedValue(java.lang.String value)
/**
Shortcut for creating a string-typed value. |
TypedValue(java.lang.String value,
java.lang.String xsdType)
Creates a typed value. |
Methods inherited from class com.ibm.websphere.fabric.types.TypedValue |
coerceTo, createBooleanTyped, createDateTimeTyped, createDateTyped, createDecimalTyped, createDoubleTyped, createFloatTyped, createIntTyped, createLongTyped, createPlain, createStringTyped, createUriTyped, equals, getValue, getXsdType, hashCode, isBooleanType, isDateTimeType, isDateType, isDecimalType, isDoubleType, isFloatType, isIntType, isLongType, isPlain, isStringType, isUriType, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NULL_VALUE
public static final TypedValue NULL_VALUE
- Constant used to represent an explicit null value.
TypedValue
public TypedValue(java.lang.String value)
- /**
Shortcut for creating a string-typed value.
It is recommended that null-typed values be avoided, but they can be useful for differentiating
special objects from strings that have the same string value.
- Parameters:
value
- possibly null string representation of the the type being represented.
TypedValue
public TypedValue(java.lang.String value,
java.lang.String xsdType)
- Creates a typed value.
- Parameters:
value
- possibly null string representation of the the type being represented.xsdType
- possibly null URI identifying the type being represented.- See Also:
TypedValue.getXsdType()
promote
public static TypedValue promote(TypedValue instance)
promoteAll
public static TypedValueSet promoteAll(TypedValueSet original)
Copyright © 2002-2009 IBM. All Rights Reserved.