|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrdf.parser.rdfxml.XmlDatatypeUtil
public class XmlDatatypeUtil
Provides methods for handling the standard XML Schema datatypes.
| Constructor Summary | |
|---|---|
XmlDatatypeUtil()
|
|
| Method Summary | |
|---|---|
static int |
compare(String value1,
String value2,
String datatype)
|
static int |
compareBytes(String int1,
String int2)
|
static int |
compareCanonicalDecimals(String dec1,
String dec2)
Compares two canonical decimals to eachother. |
static int |
compareCanonicalDoubles(String double1,
String double2)
Compares two canonical doubles to eachother. |
static int |
compareCanonicalFloats(String float1,
String float2)
Compares two canonical floats to eachother. |
static int |
compareCanonicalFPNumbers(String float1,
String float2)
Compares two canonical floating point numbers to eachother. |
static int |
compareCanonicalIntegers(String int1,
String int2)
Compares two canonical integers to eachother. |
static int |
compareDecimals(String dec1,
String dec2)
Compares two decimals to eachother. |
static int |
compareDoubles(String double1,
String double2)
Compares two doubles to eachother. |
static int |
compareFloats(String float1,
String float2)
Compares two floats to eachother. |
static int |
compareFPNumbers(String fp1,
String fp2)
Compares two floating point numbers to eachother. |
static int |
compareIntegers(String int1,
String int2)
Compares two integers to eachother. |
static int |
compareInts(String int1,
String int2)
|
static int |
compareLongs(String int1,
String int2)
|
static int |
compareNegativeIntegers(String int1,
String int2)
|
static int |
compareNonNegativeIntegers(String int1,
String int2)
|
static int |
compareNonPositiveIntegers(String int1,
String int2)
|
static int |
comparePositiveIntegers(String int1,
String int2)
|
static int |
compareShorts(String int1,
String int2)
|
static int |
compareUnsignedBytes(String int1,
String int2)
|
static int |
compareUnsignedInts(String int1,
String int2)
|
static int |
compareUnsignedLongs(String int1,
String int2)
|
static int |
compareUnsignedShorts(String int1,
String int2)
|
static boolean |
isBuiltInDatatype(String datatype)
Checks whether the supplied datatype is a built-in XML Schema datatype. |
static boolean |
isDecimalDatatype(String datatype)
Checks whether the supplied datatype is equal to xsd:decimal or one of the built-in datatypes that is derived from xsd:decimal. |
static boolean |
isDerivedDatatype(String datatype)
Checks whether the supplied datatype is a derived XML Schema datatype. |
static boolean |
isFloatingPointDatatype(String datatype)
Checks whether the supplied datatype is equal to xsd:float or xsd:double. |
static boolean |
isIntegerDatatype(String datatype)
Checks whether the supplied datatype is equal to xsd:integer or one of the built-in datatypes that is derived from xsd:integer. |
static boolean |
isOrderedDatatype(String datatype)
Checks whether the supplied datatype is ordered. |
static boolean |
isPrimitiveDatatype(String datatype)
Checks whether the supplied datatype is a primitive XML Schema datatype. |
static boolean |
isValidBoolean(String value)
|
static boolean |
isValidByte(String value)
|
static boolean |
isValidDecimal(String value)
|
static boolean |
isValidDouble(String value)
|
static boolean |
isValidFloat(String value)
|
static boolean |
isValidInt(String value)
|
static boolean |
isValidInteger(String value)
|
static boolean |
isValidLong(String value)
|
static boolean |
isValidNegativeInteger(String value)
|
static boolean |
isValidNonNegativeInteger(String value)
|
static boolean |
isValidNonPositiveInteger(String value)
|
static boolean |
isValidPositiveInteger(String value)
|
static boolean |
isValidShort(String value)
|
static boolean |
isValidUnsignedByte(String value)
|
static boolean |
isValidUnsignedInt(String value)
|
static boolean |
isValidUnsignedLong(String value)
|
static boolean |
isValidUnsignedShort(String value)
|
static boolean |
isValidValue(String value,
String datatype)
|
static String |
normalize(String value,
String datatype)
Normalizes the supplied value according to the normalization rules for the supplied datatype. |
static String |
normalizeBoolean(String value)
Normalizes a boolean value to its canonical representation. |
static String |
normalizeByte(String value)
Normalizes an xsd:byte. |
static String |
normalizeDecimal(String decimal)
Normalizes a decimal to its canonical representation. |
static String |
normalizeDouble(String value)
Normalizes a double to its canonical representation. |
static String |
normalizeFloat(String value)
Normalizes a float to its canonical representation. |
static String |
normalizeFPNumber(String value)
Normalizes a floating point number to its canonical representation. |
static String |
normalizeInt(String value)
Normalizes an xsd:int. |
static String |
normalizeInteger(String value)
Normalizes an integer to its canonical representation. |
static String |
normalizeLong(String value)
Normalizes an xsd:long. |
static String |
normalizeNegativeInteger(String value)
Normalizes an xsd:negativeInteger. |
static String |
normalizeNonNegativeInteger(String value)
Normalizes an xsd:nonNegativeInteger. |
static String |
normalizeNonPositiveInteger(String value)
Normalizes an xsd:nonPositiveInteger. |
static String |
normalizePositiveInteger(String value)
Normalizes an xsd:positiveInteger. |
static String |
normalizeShort(String value)
Normalizes an xsd:short. |
static String |
normalizeUnsignedByte(String value)
Normalizes an xsd:unsignedByte. |
static String |
normalizeUnsignedInt(String value)
Normalizes an xsd:unsignedInt. |
static String |
normalizeUnsignedLong(String value)
Normalizes an xsd:unsignedLong. |
static String |
normalizeUnsignedShort(String value)
Normalizes an xsd:unsignedShort. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlDatatypeUtil()
| Method Detail |
|---|
public static boolean isPrimitiveDatatype(String datatype)
public static boolean isDerivedDatatype(String datatype)
public static boolean isBuiltInDatatype(String datatype)
public static boolean isDecimalDatatype(String datatype)
public static boolean isIntegerDatatype(String datatype)
public static boolean isFloatingPointDatatype(String datatype)
public static boolean isOrderedDatatype(String datatype)
public static boolean isValidValue(String value,
String datatype)
public static boolean isValidDecimal(String value)
public static boolean isValidInteger(String value)
public static boolean isValidNegativeInteger(String value)
public static boolean isValidNonPositiveInteger(String value)
public static boolean isValidNonNegativeInteger(String value)
public static boolean isValidPositiveInteger(String value)
public static boolean isValidLong(String value)
public static boolean isValidInt(String value)
public static boolean isValidShort(String value)
public static boolean isValidByte(String value)
public static boolean isValidUnsignedLong(String value)
public static boolean isValidUnsignedInt(String value)
public static boolean isValidUnsignedShort(String value)
public static boolean isValidUnsignedByte(String value)
public static boolean isValidFloat(String value)
public static boolean isValidDouble(String value)
public static boolean isValidBoolean(String value)
public static String normalize(String value,
String datatype)
value - The value to normalize.datatype - The value's datatype.
IllegalArgumentException - If the supplied value is
illegal considering the supplied datatype.public static String normalizeBoolean(String value)
value - The boolean value to normalize.
IllegalArgumentException - If the supplied value is
not a legal boolean.public static String normalizeDecimal(String decimal)
decimal - The decimal to normalize.
IllegalArgumentException - If one of the supplied strings
is not a legal decimal.public static String normalizeInteger(String value)
value - The value to normalize.
IllegalArgumentException - If the supplied value
is not a legal integer.public static String normalizeNegativeInteger(String value)
public static String normalizeNonPositiveInteger(String value)
public static String normalizeNonNegativeInteger(String value)
public static String normalizePositiveInteger(String value)
public static String normalizeLong(String value)
public static String normalizeInt(String value)
public static String normalizeShort(String value)
public static String normalizeByte(String value)
public static String normalizeUnsignedLong(String value)
public static String normalizeUnsignedInt(String value)
public static String normalizeUnsignedShort(String value)
public static String normalizeUnsignedByte(String value)
public static String normalizeFloat(String value)
value - The value to normalize.
IllegalArgumentException - If the supplied value
is not a legal float.public static String normalizeDouble(String value)
value - The value to normalize.
IllegalArgumentException - If the supplied value
is not a legal double.public static String normalizeFPNumber(String value)
value - The value to normalize.
IllegalArgumentException - If the supplied value
is not a legal floating point number.
public static int compare(String value1,
String value2,
String datatype)
public static int compareDecimals(String dec1,
String dec2)
IllegalArgumentException - If one of the supplied strings is
not a legal decimal.
public static int compareCanonicalDecimals(String dec1,
String dec2)
IllegalArgumentException - If one of the supplied strings is
not a legal decimal.
public static int compareIntegers(String int1,
String int2)
IllegalArgumentException - If one of the supplied strings is
not a legal integer.
public static int compareCanonicalIntegers(String int1,
String int2)
IllegalArgumentException - If one of the supplied strings is
not a legal integer.
public static int compareNegativeIntegers(String int1,
String int2)
public static int compareNonPositiveIntegers(String int1,
String int2)
public static int compareNonNegativeIntegers(String int1,
String int2)
public static int comparePositiveIntegers(String int1,
String int2)
public static int compareLongs(String int1,
String int2)
public static int compareInts(String int1,
String int2)
public static int compareShorts(String int1,
String int2)
public static int compareBytes(String int1,
String int2)
public static int compareUnsignedLongs(String int1,
String int2)
public static int compareUnsignedInts(String int1,
String int2)
public static int compareUnsignedShorts(String int1,
String int2)
public static int compareUnsignedBytes(String int1,
String int2)
public static int compareFloats(String float1,
String float2)
IllegalArgumentException - If one of the supplied strings
is not a legal float or if NaN is compared to a float
other than NaN.
public static int compareCanonicalFloats(String float1,
String float2)
IllegalArgumentException - If one of the supplied strings
is not a legal float or if NaN is compared to a
float other than NaN.
public static int compareDoubles(String double1,
String double2)
IllegalArgumentException - If one of the supplied strings
is not a legal double or if NaN is compared to a
double other than NaN.
public static int compareCanonicalDoubles(String double1,
String double2)
IllegalArgumentException - If one of the supplied strings
is not a legal double or if NaN is compared to a
double other than NaN.
public static int compareFPNumbers(String fp1,
String fp2)
IllegalArgumentException - If one of the supplied strings
is not a legal floating point number or if NaN is
compared to a floating point number other than NaN.
public static int compareCanonicalFPNumbers(String float1,
String float2)
IllegalArgumentException - If one of the supplied strings
is not a legal floating point number or if NaN is
compared to a floating point number other than NaN.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||