|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.CoreProject
ca.sqlpower.architect.swingui.SwingUIProject
public class SwingUIProject
The SwingUIProject class is responsible for saving and loading projects. It is capable of writing itself to an output stream, and reading in a previously-written stream to re-create a previous instance of a project at a later date. Such "project files" are meant to be highly portable, and should remain backward compatible now that the product has been released.
Anyone who makes a change to the file reading code which causes a failure to read older (release 1.0.19 or later) project files will get Airzooka'ed.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,OLAPPane<?,?>> |
olapPaneLoadIdMap
This map maps String ID codes to OLAPPane instances used in loading. |
| Fields inherited from class ca.sqlpower.architect.CoreProject |
|---|
dbcsLoadIdMap, dbcsSaveIdMap, file, modified, olapObjectLoadIdMap, olapObjectSaveIdMap, out, progress, saveInProgress, session, sqlObjectLoadIdMap, sqlObjectSaveIdMap |
| Constructor Summary | |
|---|---|
SwingUIProject(ArchitectSwingSession session)
Sets up a new project file load/save object for the given session. |
|
| Method Summary | |
|---|---|
protected ArchitectSwingSession |
getSession()
|
boolean |
isModified()
Override that also considers whether each OLAP edit session has modifications. |
void |
load(java.io.InputStream in,
ca.sqlpower.sql.DataSourceCollection dataSources)
Loads the project data from the given input stream. |
void |
save(java.io.OutputStream out,
java.lang.String encoding)
|
void |
save(java.io.PrintWriter out,
java.lang.String encoding)
Do just the writing part of save, given a PrintWriter |
void |
save(javax.swing.ProgressMonitor pm)
Saves this project by writing an XML description of it to a temp file, then renaming. |
protected org.apache.commons.digester.Digester |
setupDigester()
|
| Methods inherited from class ca.sqlpower.architect.CoreProject |
|---|
addAllTablesFrom, getFile, isSaveInProgress, setFile, setModified, setSaveInProgress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,OLAPPane<?,?>> olapPaneLoadIdMap
| Constructor Detail |
|---|
public SwingUIProject(ArchitectSwingSession session)
throws ArchitectException
session - the session that this instance will be responsible for
loading into and saving out from.
java.lang.NullPointerException - if the given session is null
ArchitectException| Method Detail |
|---|
public boolean isModified()
isModified in class CoreProject
public void load(java.io.InputStream in,
ca.sqlpower.sql.DataSourceCollection dataSources)
throws java.io.IOException,
ArchitectException
CoreProjectNote: the input stream is always closed afterwards.
load in class CoreProjectin - Used to load in the project data, must support mark.dataSources - Collection of the data sources used in the project
java.io.IOException
ArchitectException
protected org.apache.commons.digester.Digester setupDigester()
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
setupDigester in class CoreProjectjavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public void save(javax.swing.ProgressMonitor pm)
throws java.io.IOException,
ArchitectException
file property.
pm - An optional progress monitor which will be initialised then updated
periodically during the save operation. If you use a progress monitor, don't
invoke this method on the AWT event dispatch thread!
java.io.IOException
ArchitectException
public void save(java.io.PrintWriter out,
java.lang.String encoding)
throws java.io.IOException,
ArchitectException
out - - the file to write to
java.io.IOException
ArchitectException
public void save(java.io.OutputStream out,
java.lang.String encoding)
throws java.io.IOException,
ArchitectException
java.io.IOException
ArchitectExceptionprotected ArchitectSwingSession getSession()
getSession in class CoreProject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||