org.argouml.persistence
Class ModelMemberFilePersister

java.lang.Object
  extended byorg.argouml.persistence.MemberFilePersister
      extended byorg.argouml.persistence.ModelMemberFilePersister

public class ModelMemberFilePersister
extends MemberFilePersister

The file persister for the UML model.


Field Summary
private static Logger LOG
          Logger.
 
Constructor Summary
ModelMemberFilePersister()
           
 
Method Summary
 String getMainTag()
          Gets the tag name which is the root tag for this member.
 void load(Project project, InputStream inputStream)
          Loads a model (XMI only) from an input source.
 void save(ProjectMember member, Writer w, Integer indent)
          Save the project model to XMI.
 
Methods inherited from class org.argouml.persistence.MemberFilePersister
addXmlFileToWriter
 
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.

Constructor Detail

ModelMemberFilePersister

public ModelMemberFilePersister()
Method Detail

load

public void load(Project project,
                 InputStream inputStream)
          throws OpenException
Loads a model (XMI only) from an input source. BE ADVISED this method has a side effect. It sets _UUIDREFS to the model.

If there is a problem with the xmi file, an error is set in the getLastLoadStatus() field. This needs to be examined by the calling function.

Specified by:
load in class MemberFilePersister
Parameters:
project - the project to persist
inputStream - the inputStream to parse to load the member.
Throws:
OpenException - on any parsing errors.
See Also:
MemberFilePersister.load(org.argouml.kernel.Project, java.io.InputStream)

getMainTag

public String getMainTag()
Description copied from class: MemberFilePersister
Gets the tag name which is the root tag for this member.

Specified by:
getMainTag in class MemberFilePersister
Returns:
tag name.
See Also:
org.argouml.persistence.MemberFilePersister#getTag()

save

public void save(ProjectMember member,
                 Writer w,
                 Integer indent)
          throws SaveException
Save the project model to XMI.

Specified by:
save in class MemberFilePersister
Parameters:
member - The project member to save.
w - The Writer to which appen the save.
indent - The offset to which to indent the XML
Throws:
SaveException - if the save fails
See Also:
MemberFilePersister.save( org.argouml.kernel.ProjectMember, java.io.Writer, java.lang.Integer)


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