|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
org.argouml.persistence.AbstractFilePersister
org.argouml.persistence.UmlFilePersister
public class UmlFilePersister
To persist to and from argo (xml file) storage.
| Field Summary | |
|---|---|
static int |
PERSISTENCE_VERSION
The PERSISTENCE_VERSION is increased every time the persistence format changes. |
protected static int |
UML_PHASES_LOAD
The TOTAL_PHASES_LOAD constant is the number of phases used by the load process. |
| Constructor Summary | |
|---|---|
UmlFilePersister()
The constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
checkVersion(int fileVersion,
java.lang.String releaseVersion)
|
Project |
doLoad(java.io.File file)
|
protected Project |
doLoad(java.io.File originalFile,
java.io.File file,
org.argouml.persistence.AbstractFilePersister.ProgressMgr progressMgr)
|
void |
doSave(Project project,
java.io.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 java.lang.String |
getDesc()
Just the description, not the extension between "()". |
java.lang.String |
getExtension()
The extension valid for this type of file. |
protected int |
getPersistenceVersion(java.io.InputStream inputStream)
Reads an XML file of uml format and extracts the persistence version number from the root tag. |
protected java.lang.String |
getReleaseVersion(java.io.InputStream inputStream)
Reads an XML file of uml format and extracts the persistence version number from the root tag. |
protected java.lang.String |
getVersion(java.lang.String rootLine)
Get the version attribute value from a string of XML. |
boolean |
hasAnIcon()
Returns true. |
boolean |
isSaveEnabled()
The .uml save format is no longer available to save. |
java.io.File |
transform(java.io.File file,
int version)
Transform a string of XML data according to the service required. |
| Methods inherited from class org.argouml.persistence.AbstractFilePersister |
|---|
accept, addProgressListener, copyFile, createTempFile, getDescription, getMemberFilePersister, getMemberFilePersister, isFileExtensionApplicable, isLoadEnabled, removeProgressListener, save |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PERSISTENCE_VERSION
protected static final int UML_PHASES_LOAD
| Constructor Detail |
|---|
public UmlFilePersister()
| Method Detail |
|---|
public java.lang.String getExtension()
AbstractFilePersister
getExtension in class AbstractFilePersisterprotected java.lang.String getDesc()
AbstractFilePersister
getDesc in class AbstractFilePersister
public void doSave(Project project,
java.io.File file)
throws SaveException,
java.lang.InterruptedException
doSave in class AbstractFilePersisterfile - The file to write.project - the project to save
SaveException - when anything goes wrong
java.lang.InterruptedException - if the thread is interruptedProjectFilePersister.save(org.argouml.kernel.Project,
java.io.File)public boolean isSaveEnabled()
isSaveEnabled in class AbstractFilePersister
public Project doLoad(java.io.File file)
throws OpenException,
java.lang.InterruptedException
doLoad in interface ProjectFilePersisterdoLoad in class AbstractFilePersisterfile - the file of the project to load.
OpenException - when we fail to open from this url
java.lang.InterruptedException - if the thread is interrupted
protected Project doLoad(java.io.File originalFile,
java.io.File file,
org.argouml.persistence.AbstractFilePersister.ProgressMgr progressMgr)
throws OpenException,
java.lang.InterruptedException
OpenException
java.lang.InterruptedException
protected boolean checkVersion(int fileVersion,
java.lang.String releaseVersion)
throws OpenException,
VersionException
OpenException
VersionException
public final java.io.File transform(java.io.File file,
int version)
throws OpenException
file - The XML file to be transformedversion - the version of the persistence format the XML is to be
transformed to.
OpenException - on XSLT transformation error or file read
protected int getPersistenceVersion(java.io.InputStream inputStream)
throws OpenException
inputStream - stream pointing to file to read.
OpenException - on any error
protected java.lang.String getReleaseVersion(java.io.InputStream inputStream)
throws OpenException
inputStream - the stream point to the XML file
OpenException - on any errorprotected java.lang.String getVersion(java.lang.String rootLine)
rootLine - the line
public boolean hasAnIcon()
hasAnIcon in class AbstractFilePersister
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |