public class TrovitWritingExample extends Object
This example illustrates the programatic creation of Trovit documents and how they are written into XML.
| Constructor and Description |
|---|
TrovitWritingExample() |
| Modifier and Type | Method and Description |
|---|---|
protected static Ad |
createAd()
Create an
Ad with some example data. |
protected static Picture |
createPicture()
Create an
Picture with some example data. |
static void |
main(String[] args)
Start the example application.
|
protected static void |
write(TrovitDocument doc,
File file)
Write a
TrovitDocument into a File. |
protected static void |
write(TrovitDocument doc,
OutputStream output)
Write a
TrovitDocument into an OutputStream. |
protected static void |
write(TrovitDocument doc,
Writer output)
Write a
TrovitDocument into a Writer. |
protected static void |
writeToConsole(TrovitDocument doc)
Write a
TrovitDocument into a String and print the
results to the console. |
public static void main(String[] args)
args - command line argumentsprotected static Ad createAd()
Ad with some example data.protected static Picture createPicture()
Picture with some example data.protected static void write(TrovitDocument doc, File file)
TrovitDocument into a File.doc - the document to writefile - the file, where the document is written toprotected static void write(TrovitDocument doc, OutputStream output)
TrovitDocument into an OutputStream.doc - the document to writeoutput - the stream, where the document is written toprotected static void write(TrovitDocument doc, Writer output)
TrovitDocument into a Writer.doc - the document to writeoutput - the writer, where the document is written toprotected static void writeToConsole(TrovitDocument doc)
TrovitDocument into a String and print the
results to the console.doc - the document to writeCopyright © 2015 OpenEstate. All rights reserved.