org.argouml.persistence
Class ProfileConfigurationFilePersister

java.lang.Object
  extended by org.argouml.persistence.ProfileConfigurationFilePersister

public class ProfileConfigurationFilePersister
extends java.lang.Object

Persister for project's profile configuration.


Constructor Summary
ProfileConfigurationFilePersister()
           
 
Method Summary
protected  void addXmlFileToWriter(java.io.PrintWriter writer, java.io.File file)
          Send an existing file of XML to the PrintWriter.
 java.lang.String getMainTag()
          Gets the tag name which is the root tag for this member.
 void load(Project project, org.xml.sax.InputSource inputSource)
          Load a project member from a SAX InputSource.
 void load(Project project, java.io.InputStream inputStream)
          Load a project member from an InputStream.
 void load(Project project, java.net.URL url)
          Load a project member from a URL.
 void save(ProjectMember member, java.io.OutputStream stream)
          Save the project member as XML to the given output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileConfigurationFilePersister

public ProfileConfigurationFilePersister()
Method Detail

getMainTag

public java.lang.String getMainTag()
Gets the tag name which is the root tag for this member.

Returns:
tag name.

load

public void load(Project project,
                 java.io.InputStream inputStream)
          throws OpenException
Load a project member from an InputStream.

Parameters:
project - the project to persist
inputStream - the inputStream to parse to load the member.
Throws:
OpenException - on any parsing errors.

load

public void load(Project project,
                 org.xml.sax.InputSource inputSource)
          throws OpenException
Load a project member from a SAX InputSource.

Parameters:
project - the project to persist
inputSource - the InputSource to load from
Throws:
OpenException - on any parsing errors.

save

public void save(ProjectMember member,
                 java.io.OutputStream stream)
          throws SaveException
Save the project member as XML to the given output stream.

Parameters:
member - The project member to save.
stream - The OutputStream to write the contents to.
Throws:
SaveException - if the save fails

load

public void load(Project project,
                 java.net.URL url)
          throws OpenException
Load a project member from a URL.

Parameters:
project - the project to persist
url - the URL to open and parse to load the member.
Throws:
OpenException - on any parsing errors.

addXmlFileToWriter

protected void addXmlFileToWriter(java.io.PrintWriter writer,
                                  java.io.File file)
                           throws SaveException
Send an existing file of XML to the PrintWriter.

Parameters:
writer - the PrintWriter.
file - the File
Throws:
SaveException - on any errors.


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook