org.argouml.kernel
Class AbstractProjectMember

java.lang.Object
  extended byorg.argouml.kernel.AbstractProjectMember
All Implemented Interfaces:
ProjectMember
Direct Known Subclasses:
ProjectMemberDiagram, ProjectMemberModel, ProjectMemberTodoList

public abstract class AbstractProjectMember
extends Object
implements ProjectMember

A member of the project.


Constructor Summary
AbstractProjectMember(String theUniqueName, Project theProject)
          The constructor.
 
Method Summary
abstract  String getType()
           
 String getUniqueDiagramName()
          In contrast to getZipName() returns the member's name without the prepended name of the project.
 String getZipFileExtension()
           
 String getZipName()
          Returns a unique member's name for storage in a zipfile.
protected  void makeUniqueName(String s)
          Makes a unique name for this member.
protected  void remove()
          Remove this member from its project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.argouml.kernel.ProjectMember
repair
 

Constructor Detail

AbstractProjectMember

public AbstractProjectMember(String theUniqueName,
                             Project theProject)
The constructor.

Parameters:
theUniqueName - the name of the member, this must be different for all members. Note that for diagram members this is not the name of the diagram.
theProject - the owning project
Method Detail

getUniqueDiagramName

public String getUniqueDiagramName()
In contrast to getZipName() returns the member's name without the prepended name of the project.

Specified by:
getUniqueDiagramName in interface ProjectMember
Returns:
the member's name without any prefix or suffix

getZipName

public String getZipName()
Returns a unique member's name for storage in a zipfile. The project's base name is prepended followed by an underscore '_'.

Specified by:
getZipName in interface ProjectMember
Returns:
the name for zip file storage

makeUniqueName

protected void makeUniqueName(String s)
Makes a unique name for this member. Note this is not the diagram name and this appears to be flawed.

Parameters:
s - a string which will make up part of this unique name.

getType

public abstract String getType()
Specified by:
getType in interface ProjectMember
Returns:
a short string defining the member type. Usually equals the file extension.

getZipFileExtension

public String getZipFileExtension()
Specified by:
getZipFileExtension in interface ProjectMember
Returns:
the file extension string

remove

protected void remove()
Remove this member from its project.



ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook