public final class SardineUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CUSTOM_NAMESPACE_PREFIX
Default namespace prefix
|
static String |
CUSTOM_NAMESPACE_URI
Default namespace URI
|
static String |
DEFAULT_NAMESPACE_PREFIX
Default namespace prefix
|
static String |
DEFAULT_NAMESPACE_URI
Default namespace URI
|
| Modifier and Type | Method and Description |
|---|---|
static Element |
createElement(Element parent,
QName key) |
static Element |
createElement(QName key) |
static QName |
createQNameWithCustomNamespace(String key) |
static QName |
createQNameWithDefaultNamespace(String key) |
static Date |
parseDate(String value)
Loops over all the possible date formats and tries to find the right one.
|
static QName |
toQName(Element element) |
static List<QName> |
toQName(List<String> removeProps) |
static Map<QName,String> |
toQName(Map<String,String> setProps) |
static String |
toXml(Object jaxbElement) |
static <T> T |
unmarshal(InputStream in) |
public static final String CUSTOM_NAMESPACE_PREFIX
public static final String CUSTOM_NAMESPACE_URI
public static final String DEFAULT_NAMESPACE_PREFIX
public static final String DEFAULT_NAMESPACE_URI
public static Date parseDate(String value)
value - ISO date stringpublic static <T> T unmarshal(InputStream in) throws IOException
IOExceptionpublic static String toXml(Object jaxbElement) throws IOException
jaxbElement - An object from the modelRuntimeException - When there is a JAXB errorIOExceptionpublic static QName createQNameWithCustomNamespace(String key)
key - Local element name.public static QName createQNameWithDefaultNamespace(String key)
key - Local element name.public static Element createElement(QName key)
key - Fully qualified element name.Copyright © 2019. All rights reserved.