public class SessionWriter.ExportSupport extends java.lang.Object
SessionLayerExporter
when doing the export.Modifier and Type | Field and Description |
---|---|
private org.w3c.dom.Document |
doc |
private int |
layerIndex |
Constructor and Description |
---|
ExportSupport(org.w3c.dom.Document doc,
int layerIndex)
Constructs a new
ExportSupport . |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Element |
createElement(java.lang.String name)
Creates an element of the type specified.
|
org.w3c.dom.Text |
createTextNode(java.lang.String text)
Creates a text node given the specified string.
|
int |
getLayerIndex()
Get the index of the layer that is currently exported.
|
java.io.OutputStream |
getOutputStreamZip(java.lang.String zipPath)
Create a file inside the zip archive.
|
boolean |
isZip()
Check, if the session is exported as a zip archive.
|
private final org.w3c.dom.Document doc
private final int layerIndex
public ExportSupport(org.w3c.dom.Document doc, int layerIndex)
ExportSupport
.doc
- XML documentlayerIndex
- layer indexpublic org.w3c.dom.Element createElement(java.lang.String name)
name
- The name of the element type to instantiateElement
objectDocument.createElement(java.lang.String)
public org.w3c.dom.Text createTextNode(java.lang.String text)
text
- The data for the node.Text
object.Document.createTextNode(java.lang.String)
public int getLayerIndex()
public java.io.OutputStream getOutputStreamZip(java.lang.String zipPath) throws java.io.IOException
zipPath
- the path inside the zip archive, e.g. "layers/03/data.xml"java.io.IOException
- if any I/O error occurspublic boolean isZip()
SessionLayerExporter
returns true for the
SessionLayerExporter.requiresZip()
method. Otherwise, the
user can decide in the file chooser dialog.