public class WisItUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE
the XML target namespace of this format
|
static String |
PACKAGE
the package, where generated JAXB classes are located
|
| Modifier and Type | Method and Description |
|---|---|
static WisItDocument |
createDocument(Document doc)
Creates a
WisItDocument from a Document. |
static WisItDocument |
createDocument(File xmlFile)
Creates a
WisItDocument from a File. |
static WisItDocument |
createDocument(InputStream input)
Creates a
WisItDocument from an InputStream. |
static WisItDocument |
createDocument(String xmlString)
Creates a
WisItDocument from a String. |
static Marshaller |
createMarshaller()
Creates a
Marshaller to write JAXB objects into XML. |
static Marshaller |
createMarshaller(String encoding,
boolean formatted)
Creates a
Marshaller to write JAXB objects into XML. |
static Unmarshaller |
createUnmarshaller()
Creates a
Unmarshaller to read JAXB objects from XML. |
static JAXBContext |
getContext()
Returns the
JAXBContext for this format. |
static DateFormat |
getDateTimeFormat()
Returns the preferred date-time format for this format.
|
static ObjectFactory |
getFactory()
Returns the
ObjectFactory for this format. |
static void |
initContext(ClassLoader classloader)
Intializes the
JAXBContext for this format. |
static Calendar |
parseDateTime(String value) |
static BigDecimal |
parseDecimal(String value) |
static BigInteger |
parseNonNegativeInteger(String value) |
static Boolean |
parseYesNo(String value) |
static String |
printDateTime(Calendar value) |
static String |
printDecimal(BigDecimal value) |
static String |
printNonNegativeInteger(BigInteger value) |
static String |
printYesNo(Boolean value) |
public static final String NAMESPACE
public static final String PACKAGE
public static WisItDocument createDocument(InputStream input) throws SAXException, IOException, ParserConfigurationException
WisItDocument from an InputStream.input - XML inputSAXException - if XML is invalidIOException - if reading failedParserConfigurationException - if the parser is not properly configuredpublic static WisItDocument createDocument(File xmlFile) throws SAXException, IOException, ParserConfigurationException
WisItDocument from a File.xmlFile - XML fileSAXException - if XML is invalidIOException - if reading failedParserConfigurationException - if the parser is not properly configuredpublic static WisItDocument createDocument(String xmlString) throws SAXException, IOException, ParserConfigurationException
WisItDocument from a String.xmlString - XML stringSAXException - if XML is invalidIOException - if reading failedParserConfigurationException - if the parser is not properly configuredpublic static WisItDocument createDocument(Document doc)
WisItDocument from a Document.doc - XML documentpublic static Marshaller createMarshaller() throws JAXBException
Marshaller to write JAXB objects into XML.JAXBException - if a problem with JAXB occuredpublic static Marshaller createMarshaller(String encoding, boolean formatted) throws JAXBException
Marshaller to write JAXB objects into XML.encoding - encoding of written XMLformatted - if written XML is pretty printedJAXBException - if a problem with JAXB occuredpublic static Unmarshaller createUnmarshaller() throws JAXBException
Unmarshaller to read JAXB objects from XML.JAXBException - if a problem with JAXB occuredpublic static JAXBContext getContext() throws JAXBException
JAXBContext for this format.JAXBException - if a problem with JAXB occuredpublic static DateFormat getDateTimeFormat()
public static ObjectFactory getFactory()
ObjectFactory for this format.public static void initContext(ClassLoader classloader) throws JAXBException
JAXBContext for this format.classloader - the classloader to load the generated JAXB classes withJAXBException - if a problem with JAXB occuredpublic static BigDecimal parseDecimal(String value)
public static BigInteger parseNonNegativeInteger(String value)
public static String printDecimal(BigDecimal value)
public static String printNonNegativeInteger(BigInteger value)
Copyright © 2016 OpenEstate. All rights reserved.