ca.sqlpower.wabit.dao
Class WorkspaceXMLDAO

java.lang.Object
  extended by ca.sqlpower.wabit.dao.WorkspaceXMLDAO

public class WorkspaceXMLDAO
extends java.lang.Object


Constructor Summary
WorkspaceXMLDAO(java.io.OutputStream out, WabitSessionContext context)
          This will construct a XML DAO to save the entire workspace or parts of the workspace to be loaded in later.
WorkspaceXMLDAO(java.io.Writer writer, WabitSessionContext context)
          Constructs an XML DAO to print the XML representation of this Workspace to the given Writer object.
 
Method Summary
 void close()
          Call this to flush and close the output stream if only part of the file is being saved.
 void printAttribute(java.lang.String name, boolean value)
           
 void printAttribute(java.lang.String name, double value)
           
 void printAttribute(java.lang.String name, int value)
           
 void printAttribute(java.lang.String name, java.lang.String value)
          Prints an attribute to the file.
 void save(java.util.List<? extends WabitObject> objectToSave)
          This method is used to export parts of Wabit as well as save the entire set of workspaces.
 void saveActiveWorkspace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceXMLDAO

public WorkspaceXMLDAO(java.io.OutputStream out,
                       WabitSessionContext context)
This will construct a XML DAO to save the entire workspace or parts of the workspace to be loaded in later.


WorkspaceXMLDAO

public WorkspaceXMLDAO(java.io.Writer writer,
                       WabitSessionContext context)
Constructs an XML DAO to print the XML representation of this Workspace to the given Writer object.

Parameters:
writer - The Writer object to output the Workspace to
context - The context that contains the Workspace to be saved
Method Detail

saveActiveWorkspace

public void saveActiveWorkspace()

save

public void save(java.util.List<? extends WabitObject> objectToSave)
This method is used to export parts of Wabit as well as save the entire set of workspaces.

Parameters:
objectToSave - The object that is to save. If this is an object in a workspace all of the necessary data sources and other WabitObjects will be saved with it.

printAttribute

public void printAttribute(java.lang.String name,
                           java.lang.String value)
Prints an attribute to the file. If the attribute value is null no attribute will be printed.


printAttribute

public void printAttribute(java.lang.String name,
                           double value)

printAttribute

public void printAttribute(java.lang.String name,
                           int value)

printAttribute

public void printAttribute(java.lang.String name,
                           boolean value)

close

public void close()
Call this to flush and close the output stream if only part of the file is being saved.



Copyright © 2009. All Rights Reserved.