public class OpenImmoTransferDocument extends OpenImmoDocument<Openimmo>
Constructor and Description |
---|
OpenImmoTransferDocument(Document document)
Create from a
Document . |
Modifier and Type | Method and Description |
---|---|
OpenImmoVersion |
getDocumentVersion()
Returns the current
XmlVersion of the contained Document . |
static boolean |
isReadable(Document doc)
Checks, if a
Document is readable as a
OpenImmoTransferDocument . |
static OpenImmoTransferDocument |
newDocument()
Creates an empty
OpenImmoTransferDocument . |
static OpenImmoTransferDocument |
newDocument(Openimmo openimmo)
Creates a
OpenImmoTransferDocument from a Openimmo object. |
void |
setDocumentVersion(OpenImmoVersion version)
Changes the
XmlVersion of the contained Document . |
Openimmo |
toObject()
|
getLatestVersion, isFeedback, isTransfer
downgrade, upgrade, upgradeToLatestVersion
getDocument, isTextWrittenAsCDATA, prepareDocumentBeforeWritingToXml, setTextWrittenAsCDATA, toXml, toXml, toXml, toXml, toXml, toXml, toXmlString, toXmlString
public OpenImmoVersion getDocumentVersion()
XmlConvertableDocument
XmlVersion
of the contained Document
.getDocumentVersion
in class OpenImmoDocument<Openimmo>
public static boolean isReadable(Document doc)
Document
is readable as a
OpenImmoTransferDocument
.doc
- document to checkpublic static OpenImmoTransferDocument newDocument() throws ParserConfigurationException, JAXBException
OpenImmoTransferDocument
.ParserConfigurationException
- if the parser is not properly configuredJAXBException
- if a problem with JAXB occuredpublic static OpenImmoTransferDocument newDocument(Openimmo openimmo) throws ParserConfigurationException, JAXBException
OpenImmoTransferDocument
from a Openimmo
object.openimmo
- Java object, that represents the <openimmo> root elementParserConfigurationException
- if the parser is not properly configuredJAXBException
- if a problem with JAXB occuredpublic void setDocumentVersion(OpenImmoVersion 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<Openimmo,OpenImmoVersion>
version
- new document versionpublic Openimmo toObject() throws JAXBException
toObject
in class XmlDocument<Openimmo>
JAXBException
- if a problem with JAXB occuredCopyright © 2015 OpenEstate. All rights reserved.