com.waveset.session
Class Exporter

java.lang.Object
  extended bycom.waveset.session.Exporter

public class Exporter
extends java.lang.Object

A class that implements the export operation.


Nested Class Summary
static class Exporter.ExportQuery
          Container to pass around for type exporting.
 
Field Summary
static java.lang.String code_id
           
static Type[] ORDERED_TYPES
          Type dependencies.
 
Constructor Summary
Exporter(LocalSession session, com.waveset.server.Server server)
          Build an exporter.
 
Method Summary
 void exportObjects(Exporter.ExportQuery[] types, java.io.OutputStream stream, BulkMonitor monitor)
          Exports the objects of the specified types to a stream.
 void exportObjects(Exporter.ExportQuery[] types, java.lang.String filename, BulkMonitor monitor)
          Exports the objects of the specified types to a file.
 void exportObjects(Exporter.ExportQuery[] types, java.io.Writer out, BulkMonitor monitor)
          Inner export method that emits the XML to an writer.
 void exportObjects(java.lang.String typeSet, java.io.OutputStream stream, BulkMonitor monitor)
          Exports the objects whose types are within the specified type set to a stream.
 void exportObjects(java.lang.String typeSet, java.lang.String filename, BulkMonitor monitor)
          Exports the objects whose types are within the specified type set.
 void exportObjects(java.lang.String typeSet, java.io.Writer wrt, BulkMonitor monitor)
          Exports the objects whose types are within the specified type set to a stream.
 void exportObjects(Type[] types, java.io.OutputStream stream, BulkMonitor monitor)
          Exports the objects of the specified types to a stream.
 void exportObjects(Type[] types, java.lang.String filename, BulkMonitor monitor)
          Exports the objects of the specified types to a file.
 void exportObjects(Type[] types, java.io.Writer wrt, BulkMonitor monitor)
          Exports the objects of the specified types to a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

ORDERED_TYPES

public static final Type[] ORDERED_TYPES
Type dependencies. Some types may reference other types so they need to be emitted in dependency order. This array defines the known dependencies, anything not on this list will be emitted at random after these. NOTE: There is already at least one circularity between ObjectGroup and Configuration, and will probably be more. Within any type, especially ObjectGroup, Configuration, and Application there may be inter-object references as well. So, I'm not sure it is possible to do reliable reference checking on bulk imports without performing a complicated per-object dependency analysis during export. We're not actually using this array therefore, but keep it around for awhile.

Constructor Detail

Exporter

public Exporter(LocalSession session,
                com.waveset.server.Server server)
Build an exporter.

Method Detail

exportObjects

public void exportObjects(Exporter.ExportQuery[] types,
                          java.lang.String filename,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects of the specified types to a file.

Throws:
WavesetException

exportObjects

public void exportObjects(Type[] types,
                          java.lang.String filename,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects of the specified types to a file.

Throws:
WavesetException

exportObjects

public void exportObjects(Exporter.ExportQuery[] types,
                          java.io.OutputStream stream,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects of the specified types to a stream.

Throws:
WavesetException

exportObjects

public void exportObjects(Type[] types,
                          java.io.OutputStream stream,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects of the specified types to a stream.

Throws:
WavesetException

exportObjects

public void exportObjects(Type[] types,
                          java.io.Writer wrt,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects of the specified types to a stream.

Throws:
WavesetException

exportObjects

public void exportObjects(java.lang.String typeSet,
                          java.lang.String filename,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects whose types are within the specified type set.

We have hard wired support for a few common type sets, should make this extensible.

Throws:
WavesetException

exportObjects

public void exportObjects(java.lang.String typeSet,
                          java.io.OutputStream stream,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects whose types are within the specified type set to a stream.

Throws:
WavesetException

exportObjects

public void exportObjects(java.lang.String typeSet,
                          java.io.Writer wrt,
                          BulkMonitor monitor)
                   throws WavesetException
Exports the objects whose types are within the specified type set to a stream.

Throws:
WavesetException

exportObjects

public void exportObjects(Exporter.ExportQuery[] types,
                          java.io.Writer out,
                          BulkMonitor monitor)
                   throws WavesetException
Inner export method that emits the XML to an writer.

Throws:
WavesetException