org.argouml.persistence
Class ZargoFilePersister

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended byorg.argouml.persistence.AbstractFilePersister
          extended byorg.argouml.persistence.UmlFilePersister
              extended byorg.argouml.persistence.ZargoFilePersister
All Implemented Interfaces:
EventListener, ProgressListener, ProjectFilePersister

public class ZargoFilePersister
extends UmlFilePersister

To persist to and from zargo (zipped file) storage.


Nested Class Summary
private  class ZargoFilePersister.SubInputStream
          A stream of input streams for reading the Zipped file.
 
Field Summary
private static String ARGO_MINI_TEE
          This is the old version of the ArgoUML tee file which does not contain the detail of member elements.
private static Logger LOG
          Logger.
 
Fields inherited from class org.argouml.persistence.UmlFilePersister
PERSISTENCE_VERSION
 
Fields inherited from class org.argouml.persistence.AbstractFilePersister
 
Constructor Summary
ZargoFilePersister()
          The constructor.
 
Method Summary
 Project doLoad(File file)
           
 void doSave(Project project, File file)
          It is being considered to save out individual xmi's from individuals diagrams to make it easier to modularize the output of Argo.
protected  String getDesc()
          (Just the description, not the extension between "()".)
 String getExtension()
          The extension valid for this type of file.
private  ZipInputStream openZipStreamAt(URL url, String ext)
          Open a ZipInputStream to the first file found with a given extension.
private  void readerToWriter(Reader reader, Writer writer)
           
 
Methods inherited from class org.argouml.persistence.UmlFilePersister
doLoad, getMemberFilePersister, getVersion, progress, transform, writeProject
 
Methods inherited from class org.argouml.persistence.AbstractFilePersister
accept, addProgressListener, copyFile, createTempFile, fireProgressEvent, getDescription, getEncoding, removeProgressListener, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Logger LOG
Logger.


ARGO_MINI_TEE

private static final String ARGO_MINI_TEE
This is the old version of the ArgoUML tee file which does not contain the detail of member elements.

See Also:
Constant Field Values
Constructor Detail

ZargoFilePersister

public ZargoFilePersister()
The constructor.

Method Detail

getExtension

public String getExtension()
Description copied from class: AbstractFilePersister
The extension valid for this type of file. (Just the chars, not the dot: e.g. "zargo".)

Overrides:
getExtension in class UmlFilePersister
See Also:
AbstractFilePersister.getExtension()

getDesc

protected String getDesc()
Description copied from class: AbstractFilePersister
(Just the description, not the extension between "()".)

Overrides:
getDesc in class UmlFilePersister
See Also:
AbstractFilePersister.getDesc()

doSave

public void doSave(Project project,
                   File file)
            throws SaveException
It is being considered to save out individual xmi's from individuals diagrams to make it easier to modularize the output of Argo.

Overrides:
doSave in class UmlFilePersister
Parameters:
file - The file to write.
project - the project to save
Throws:
SaveException - when anything goes wrong
See Also:
ProjectFilePersister.save( org.argouml.kernel.Project, java.io.File)

doLoad

public Project doLoad(File file)
               throws OpenException
Specified by:
doLoad in interface ProjectFilePersister
Overrides:
doLoad in class UmlFilePersister
Throws:
OpenException
See Also:
org.argouml.persistence.ProjectFilePersister#doLoad(java.io.File, org.argouml.persistence.ProgressListener)

readerToWriter

private void readerToWriter(Reader reader,
                            Writer writer)
                     throws IOException
Throws:
IOException

openZipStreamAt

private ZipInputStream openZipStreamAt(URL url,
                                       String ext)
                                throws IOException
Open a ZipInputStream to the first file found with a given extension.

Parameters:
url - The URL of the zip file.
ext - The required extension.
Returns:
the zip stream positioned at the required location.
Throws:
IOException - if there is a problem opening the file.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook