public class ImmobiliareItUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Locale |
DEFAULT_LOCALE
the default locale of this format
|
static ObjectFactory |
FACTORY
the factory for creation of JAXB objects
|
static String |
NAMESPACE
the XML target namespace of this format
|
static String |
PACKAGE
the package, where generated JAXB classes are located
|
static ImmobiliareItVersion |
VERSION
the latest implemented version of this format
|
public static final ImmobiliareItVersion VERSION
public static final String NAMESPACE
public static final Locale DEFAULT_LOCALE
public static final String PACKAGE
public static final ObjectFactory FACTORY
public static ImmobiliareItDocument createDocument(InputStream input) throws SAXException, IOException, ParserConfigurationException
ImmobiliareItDocument
from an InputStream
.input
- XML inputSAXException
- if XML is invalidIOException
- if reading failedParserConfigurationException
- if the parser is not properly configuredpublic static ImmobiliareItDocument createDocument(File xmlFile) throws SAXException, IOException, ParserConfigurationException
ImmobiliareItDocument
from a File
.xmlFile
- XML fileSAXException
- if XML is invalidIOException
- if reading failedParserConfigurationException
- if the parser is not properly configuredpublic static ImmobiliareItDocument createDocument(String xmlString) throws SAXException, IOException, ParserConfigurationException
ImmobiliareItDocument
from a String
.xmlString
- XML stringSAXException
- if XML is invalidIOException
- if reading failedParserConfigurationException
- if the parser is not properly configuredpublic static ImmobiliareItDocument createDocument(Document doc)
ImmobiliareItDocument
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 String getCountryCode(String country)
country
- country name to convertpublic 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 boolean isValidDateUpdatedType(Calendar value)
public static boolean isValidEmailType(String value)
public static boolean isValidLatitude(Double value)
public static boolean isValidLongitude(Double value)
public static boolean isValidRooms(Integer value)
public static boolean isValidYear(Integer value)
public static EnergyUnit parseEnergyUnit(String value)
public static LandSizeUnit parseLandSizeUnit(String value)
public static Transaction parseTransaction(String value)
public static String printEnergyUnit(EnergyUnit value)
public static String printLandSizeUnit(LandSizeUnit value)
public static String printTransaction(Transaction value)
Copyright © 2015 OpenEstate. All rights reserved.