|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.util.XsdUtil
public final class XsdUtil
This class encapsulates util methods used for schema data type handling.
| Method Summary | |
|---|---|
static Date |
fromDateString(String date)
Parses the given String as schema date representation and returns a Date object holding the given time. |
static Date |
fromDateTimeString(String date)
Parses the given String as schema date time representation and returns a Date object holding the given time. |
static BigInteger |
integerFromString(String str)
Parses the given string into a BigInteger. |
static int |
intFromString(String str)
Parses the given string into a int. |
static boolean |
isValidToken(String token)
Checks if the given string complies to the XML schema token restrictions. |
static long |
longFromString(String str)
Parses the given string into a long. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BigInteger integerFromString(String str)
throws NumberFormatException,
NullPointerException
BigInteger.BigInteger(java.lang.String) to
parse the string, but allows a optional leading '+' for positive
values.
str - the string to be parsed.
NumberFormatException - if the string can not be parsed.
NullPointerException - if the string is null.
public static int intFromString(String str)
throws NumberFormatException,
NullPointerException
Integer.parseInt(java.lang.String) to
parse the string, but allows a optional leading '+' for positive
values.
str - the string to be parsed.
NumberFormatException - if the string can not be parsed.
NullPointerException - if the string is null.
public static long longFromString(String str)
throws NumberFormatException,
NullPointerException
Long.parseLong(java.lang.String) to
parse the string, but allows a optional leading '+' for positive
values.
str - the string to be parsed.
NumberFormatException - if the string can not be parsed.
NullPointerException - if the string is null.public static boolean isValidToken(String token)
XML Schema Definition: token represents tokenized strings.
The value space of token is the set of strings that do not
contain the carriage return (#xD), line feed (#xA) nor tab (#x9)
characters, that have no leading or trailing spaces (#x20) and
that have no internal sequences of two or more spaces.
For more information about the XML Schema datatype definition of
a token see
XML Schema datatype: token
token - the string to be checked
true if the given string complies to the
XML schema token restrictions; false otherwise.public static Date fromDateTimeString(String date)
date - the date time in schema dateTime
public static Date fromDateString(String date)
date - the date in schema date representation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||