org.argouml.kernel
Class AbstractProjectMember

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

public abstract class AbstractProjectMember
extends java.lang.Object
implements ProjectMember

A member of the project.


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

Constructor Detail

AbstractProjectMember

public AbstractProjectMember(java.lang.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 java.lang.String getUniqueDiagramName()
In contrast to getZipName() returns the member's name without the prepended name of the project (but with the extension).

TODO: This is not used anywhere - shall we remove it?

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

getZipName

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

Used by "argo.tee".

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

makeUniqueName

protected void makeUniqueName(java.lang.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 java.lang.String getType()
Used by "argo.tee".

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

getZipFileExtension

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

remove

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


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook