|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mulgara.mrg.XSDMapper
public class XSDMapper
A utility class for mapping datatypes in Java to XSD datatypes and back.
| Constructor Summary | |
|---|---|
XSDMapper()
|
|
| Method Summary | |
|---|---|
static Literal |
literal(boolean n)
|
static Literal |
literal(byte n)
|
static Literal |
literal(byte[] data)
|
static Literal |
literal(Date d)
|
static Literal |
literal(double n)
|
static Literal |
literal(float n)
|
static Literal |
literal(int n)
|
static Literal |
literal(long n)
|
static Literal |
literal(Number n)
|
static Literal |
literal(Object o)
Create a literal based on a Java object. |
static Literal |
literal(short n)
|
static void |
setLocale(int dateStyle,
int timeStyle,
Locale aLocale)
Sets the locale for date parsing. |
static void |
setLocale(int style,
Locale aLocale)
Sets the static locale for date parsing. |
static Object |
toData(URI type,
String text)
Uses the type URI to select a parser for the text and returns the appropriate kinds of Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XSDMapper()
| Method Detail |
|---|
public static Object toData(URI type,
String text)
type - The URI of the data type.text - The text of the data.
IllegalArgumentException - If the type is unkonwn, or the type cannot be parsed.
NumberFormatException - If the type is numeric and the text cannot be parsed.
public static void setLocale(int style,
Locale aLocale)
style - The formatting style for dates.aLocale - The locale to use for date parsing.DateFormat.getDateInstance(int,Locale)
public static void setLocale(int dateStyle,
int timeStyle,
Locale aLocale)
dateStyle - The formatting style for dates.timeStyle - The formatting style for dates.aLocale - The locale to use for date parsing.DateFormat.getDateTimeInstance(int, int, Locale)public static Literal literal(Object o)
o - The object to convert to a literal.
public static Literal literal(Date d)
public static Literal literal(float n)
public static Literal literal(double n)
public static Literal literal(byte n)
public static Literal literal(short n)
public static Literal literal(int n)
public static Literal literal(long n)
public static Literal literal(boolean n)
public static Literal literal(byte[] data)
public static Literal literal(Number n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||