|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.xml.DomTypeSupport
public final class DomTypeSupport
Set of helper methods for working with DOM data types.
| Field Summary | |
|---|---|
private static DatatypeFactory |
dataTypeFactory
JAXP DatatypeFactory. |
| Constructor Summary | |
|---|---|
private |
DomTypeSupport()
Constructor. |
| Method Summary | |
|---|---|
static long |
dateTimeToLong(String dateTime)
Converts a lexical dateTime, as defined by XML Schema 1.0, into milliseconds since the epoch. |
static long |
durationToLong(String duration)
Converts a lexical duration, as defined by XML Schema 1.0, into milliseconds. |
static DatatypeFactory |
getDataTypeFactory()
Gets a static instance of a JAXP DatatypeFactory. |
static QName |
getXSIType(Element e)
Gets the XSI type for a given element if it has one. |
static boolean |
hasXSIType(Element e)
Checks if the given element has an xsi:type defined for it. |
static String |
longToDateTime(long dateTime)
Converts a numerical date/time, given in milliseconds since the epoch, to a lexical dateTime defined by XML Schema 1.0. |
static String |
longToDuration(long duration)
Converts a duration in milliseconds to a lexical duration, as defined by XML Schema 1.0. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static DatatypeFactory dataTypeFactory
| Constructor Detail |
|---|
private DomTypeSupport()
| Method Detail |
|---|
public static long dateTimeToLong(@Nonnull
String dateTime)
dateTime - lexical date/time, may not be null
public static long durationToLong(String duration)
duration - lexical duration representation
public static DatatypeFactory getDataTypeFactory()
@Nullable
public static QName getXSIType(@Nullable
Element e)
e - the element
public static boolean hasXSIType(@Nullable
Element e)
e - the DOM element
@Nonnull public static String longToDateTime(long dateTime)
dateTime - the date time to be converted
@Nonnull public static String longToDuration(long duration)
duration - the duration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||