public class ImmoXmlDocument extends XmlConvertableDocument<Immoxml,ImmoXmlVersion>
Constructor and Description |
---|
ImmoXmlDocument(Document document)
Create from a
Document . |
Modifier and Type | Method and Description |
---|---|
ImmoXmlVersion |
getDocumentVersion()
Returns the current
XmlVersion of the contained Document . |
ImmoXmlVersion |
getLatestVersion()
Returns the newest supported
XmlVersion for the contained
Document . |
static boolean |
isReadable(Document doc)
Checks, if a
Document is readable as a ImmoXmlDocument . |
static ImmoXmlDocument |
newDocument()
Creates an empty
ImmoXmlDocument . |
static ImmoXmlDocument |
newDocument(Immoxml immoxml)
Creates a
ImmoXmlDocument from a Immoxml object. |
void |
setDocumentVersion(ImmoXmlVersion version)
Changes the
XmlVersion of the contained Document . |
Immoxml |
toObject()
|
downgrade, upgrade, upgradeToLatestVersion
getDocument, isTextWrittenAsCDATA, prepareDocumentBeforeWritingToXml, setTextWrittenAsCDATA, toXml, toXml, toXml, toXml, toXml, toXml, toXmlString, toXmlString
public ImmoXmlVersion getDocumentVersion()
XmlConvertableDocument
XmlVersion
of the contained Document
.getDocumentVersion
in class XmlConvertableDocument<Immoxml,ImmoXmlVersion>
public ImmoXmlVersion getLatestVersion()
XmlConvertableDocument
XmlVersion
for the contained
Document
.getLatestVersion
in class XmlConvertableDocument<Immoxml,ImmoXmlVersion>
public static boolean isReadable(Document doc)
Document
is readable as a ImmoXmlDocument
.doc
- document to checkpublic static ImmoXmlDocument newDocument() throws ParserConfigurationException, JAXBException
ImmoXmlDocument
.ParserConfigurationException
- if the parser is not properly configuredJAXBException
- if a problem with JAXB occuredpublic static ImmoXmlDocument newDocument(Immoxml immoxml) throws ParserConfigurationException, JAXBException
ImmoXmlDocument
from a Immoxml
object.immoxml
- Java object, that represents the <immoxml> root elementParserConfigurationException
- if the parser is not properly configuredJAXBException
- if a problem with JAXB occuredpublic void setDocumentVersion(ImmoXmlVersion version)
XmlConvertableDocument
XmlVersion
of the contained Document
.
Warning:
This function only changes the version information. It does not execute an
upgrade / downgrade. Use instead
XmlConvertableDocument.downgrade(org.openestate.io.core.XmlVersion)
,
XmlConvertableDocument.upgrade(org.openestate.io.core.XmlVersion)
,
XmlConvertableDocument.upgradeToLatestVersion()
in order to perform an upgrade / downgrade.
setDocumentVersion
in class XmlConvertableDocument<Immoxml,ImmoXmlVersion>
version
- new document versionpublic Immoxml toObject() throws JAXBException
toObject
in class XmlDocument<Immoxml>
JAXBException
- if a problem with JAXB occuredCopyright © 2015 OpenEstate. All rights reserved.