public class KyeroWritingExample extends Object
This example illustrates the programatic creation of Kyero documents, how they are written into XML and how they are downgraded to earlier versions.
Type | Property and Description |
---|---|
protected static PropertyType |
create
Create a
PropertyType object with some example data. |
Constructor and Description |
---|
KyeroWritingExample() |
Modifier and Type | Method and Description |
---|---|
protected static Root.Agent |
createAgent()
Create an
Root.Agent object with some example data. |
protected static KyeroType |
createKyero()
Create a
KyeroType object with some example data. |
protected static PropertyType |
createProperty()
Create a
PropertyType object with some example data. |
protected static ImagesType.Image |
createPropertyImage(String id,
int pos)
Create an
ImagesType.Image object with some example data. |
static void |
main(String[] args)
Start the example application.
|
protected static void |
write(KyeroDocument doc,
File file)
Write a
KyeroDocument into a File . |
protected static void |
write(KyeroDocument doc,
OutputStream output)
Write a
KyeroDocument into an OutputStream . |
protected static void |
write(KyeroDocument doc,
Writer output)
Write a
KyeroDocument into a Writer . |
protected static void |
writeToConsole(KyeroDocument doc)
Write a
KyeroDocument into a String and print the
results to the console. |
PropertyType
object with some example data.public static void main(String[] args)
args
- command line argumentsprotected static Root.Agent createAgent()
Root.Agent
object with some example data.protected static KyeroType createKyero()
KyeroType
object with some example data.protected static PropertyType createProperty()
PropertyType
object with some example data.protected static ImagesType.Image createPropertyImage(String id, int pos)
ImagesType.Image
object with some example data.protected static void write(KyeroDocument doc, File file)
KyeroDocument
into a File
.doc
- the document to writefile
- the file, where the document is written toprotected static void write(KyeroDocument doc, OutputStream output)
KyeroDocument
into an OutputStream
.doc
- the document to writeoutput
- the stream, where the document is written toprotected static void write(KyeroDocument doc, Writer output)
KyeroDocument
into a Writer
.doc
- the document to writeoutput
- the writer, where the document is written toprotected static void writeToConsole(KyeroDocument doc)
KyeroDocument
into a String
and print the
results to the console.doc
- the document to writeCopyright © 2015 OpenEstate. All rights reserved.