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