|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.argouml.kernel.Project
The Project is a datastructure that represents the designer's current project. It manages the list of diagrams and UML models.
| Constructor Summary | |
Project()
Constructor. |
|
Project(URL theProjectUrl)
Constructor. |
|
| Method Summary | |
void |
addDiagram(ArgoDiagram d)
|
void |
addMember(Object m)
|
void |
addModel(Object model)
|
void |
addSearchPath(String searchPathElement)
|
Collection |
findAllPresentationsFor(Object obj)
Returns a list with all figs for some UML object on all diagrams. |
Collection |
findFigsForMember(Object member)
Finds all figs on the diagrams for some project member, including the figs containing the member (so for some operation, the containing figclass is returned). |
Object |
findType(String s)
Searches for a type/classifier with name s. |
Object |
findType(String s,
boolean defineNew)
Searches for a type/classifier with name s. |
Object |
findTypeInDefaultModel(String name)
Find a type by name in the default model. |
Object |
findTypeInModel(String s,
Object ns)
Finds a classifier with a certain name. |
ArgoDiagram |
getActiveDiagram()
Get the current viewed diagram. |
String |
getAuthoremail()
Get the author name. |
String |
getAuthorname()
Get the author name. |
String |
getBaseName()
Find the base name of this project. |
GenerationPreferences |
getCgPrefs()
Deprecated. use getGenerationPrefs() instead |
Object |
getCurrentNamespace()
|
Object |
getDefaultModel()
Get the default model. |
String |
getDescription()
Get the description. |
ArgoDiagram |
getDiagram(String name)
Finds a diagram with a specific name or UID. |
int |
getDiagramCount()
Get the number of diagrams in this project. |
Vector |
getDiagrams()
|
GenerationPreferences |
getGenerationPrefs()
|
String |
getHistoryFile()
Get the history file. |
Object |
getInitialTarget()
|
MemberList |
getMembers()
Get all members of the project. |
Object |
getModel()
Return the model. |
Collection |
getModels()
Returns all models, including the default model (default.xmi). |
String |
getName()
|
int |
getPersistenceVersion()
|
int |
getPresentationCountFor(Object me)
|
Profile |
getProfile()
|
ProjectSettings |
getProjectSettings()
|
Object |
getRoot()
Returns the root. |
Vector |
getSearchpath()
Returns the searchpath. |
Vector |
getSearchPath()
|
URL |
getUrl()
Returns the url. |
URL |
getURL()
Get the URL for this project. |
Vector |
getUserDefinedModels()
Returns all models defined by the user. |
HashMap |
getUUIDRefs()
Returns the uUIDRefs. |
String |
getVersion()
Get the version. |
VetoableChangeSupport |
getVetoSupport()
|
boolean |
isInTrash(Object obj)
|
boolean |
isValidDiagramName(String name)
Returns true if the given name is a valid name for a diagram. |
void |
moveToTrash(Object obj)
Moves some object to trash, i.e. |
void |
postLoad()
This is executed after a load. |
void |
postSave()
This is execcuted after a save. |
void |
preSave()
This is executed before a save. |
void |
remove()
Remove the project. |
protected void |
removeDiagram(ArgoDiagram d)
Removes a diagram from the list with diagrams. |
protected void |
removeProjectMemberDiagram(ArgoDiagram d)
Removes a project member diagram completely from the project. |
String |
repair()
Repair all parts of the project before a save takes place. |
void |
setActiveDiagram(ArgoDiagram theDiagram)
|
void |
setAuthoremail(String s)
Set the author name. |
void |
setAuthorname(String s)
Set the author name. |
void |
setCgPrefs(GenerationPreferences theCgPrefs)
Deprecated. use setGenerationPrefs() instead |
void |
setCurrentNamespace(Object m)
|
void |
setDefaultModel(Object theDefaultModel)
|
void |
setDescription(String s)
Set a new description. |
void |
setFile(File file)
Set the project file. |
void |
setGenerationPrefs(GenerationPreferences cgp)
|
void |
setHistoryFile(String s)
Set the history file. |
void |
setName(String n)
Set the project URL. |
void |
setPersistenceVersion(int pv)
|
void |
setRoot(Object root)
Sets the root. |
void |
setSearchpath(Vector theSearchpath)
Sets the searchpath. |
void |
setUrl(URL theUrl)
Sets the url. |
void |
setURL(URL theUrl)
Set the URL for this project. |
void |
setUUIDRefs(HashMap uUIDRefs)
Sets the uUIDRefs. |
void |
setVersion(String s)
Set the new version. |
void |
setVetoSupport(VetoableChangeSupport theVetoSupport)
Sets the vetoSupport. |
void |
targetAdded(TargetEvent e)
Fired when a target is added to the list of targets. |
void |
targetRemoved(TargetEvent e)
Fired when a target is removed from the list of targets |
void |
targetSet(TargetEvent e)
Fired when a total new set of targets is set |
protected void |
trashInternal(Object obj)
Removes some object from the project. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Project(URL theProjectUrl)
theProjectUrl - Url to read the project from.public Project()
| Method Detail |
public String getBaseName()
This is the name minus any valid file extension.
public String getName()
public void setName(String n)
throws MalformedURLException
n - The new URL (as a String).
MalformedURLException - if the argument cannot be converted to
an URL.public URL getURL()
public void setURL(URL theUrl)
theUrl - The URL to set.public void setFile(File file)
file - File to set the project to.public Vector getSearchPath()
public void addSearchPath(String searchPathElement)
searchPathElement - the element to be added to the searchpathpublic MemberList getMembers()
public void addMember(Object m)
m - the member to be addedpublic void addModel(Object model)
model - a namespaceprotected void removeProjectMemberDiagram(ArgoDiagram d)
d - the ArgoDiagrampublic String getAuthorname()
public void setAuthorname(String s)
s - The new author name.public String getAuthoremail()
public void setAuthoremail(String s)
s - The new author name.public String getVersion()
public void setVersion(String s)
s - The new version.public String getDescription()
public void setDescription(String s)
s - The new description.public String getHistoryFile()
public void setHistoryFile(String s)
s - The new history file.public Vector getUserDefinedModels()
public Collection getModels()
public Object getModel()
If there isn't exactly one model, null is returned.
public Object findType(String s)
s - the name of the type/classifier to be found
public Object findType(String s,
boolean defineNew)
s - the name of the type/classifier to be founddefineNew - if true, define a new one
public Collection findFigsForMember(Object member)
member - The member we are looking for.
This can be a model element object but also another object.
public Collection findAllPresentationsFor(Object obj)
obj - the given UML object
public Object findTypeInModel(String s,
Object ns)
Will only return first classifier with the matching name.
s - is short name.ns - Namespace where we do the search.
null if not found).public void setCurrentNamespace(Object m)
m - the namespacepublic Object getCurrentNamespace()
public Vector getDiagrams()
public int getDiagramCount()
public ArgoDiagram getDiagram(String name)
name - is the name to search for.
public void addDiagram(ArgoDiagram d)
d - the diagram to be addedprotected void removeDiagram(ArgoDiagram d)
d - the ArgoDiagrampublic int getPresentationCountFor(Object me)
me - the given modelelement
public Object getInitialTarget()
public void setGenerationPrefs(GenerationPreferences cgp)
cgp - the generation preferencespublic GenerationPreferences getGenerationPrefs()
public VetoableChangeSupport getVetoSupport()
public void preSave()
public void postSave()
public void postLoad()
public void moveToTrash(Object obj)
Deleting an object involves:
- Removing Target history - Deleting all Fig representations for the object - Deleting the UML element - Deleting all dependent UML modelelements - Deleting CommentEdges (which are not UML elements) - Move to trash for enclosed objects, i.e. graphically drawn on top of - Move to trash subdiagrams for the object - Saveguard that there is always at least 1 diagram left - If the current diagram has been deleted, select a new one to show - Trigger the explorer when a diagram is deleted - Set the needsSave (dirty) flag of the projectmanager
obj - The object to be deletedtrashInternal(Object)protected void trashInternal(Object obj)
obj - the object to be thrown awaypublic boolean isInTrash(Object obj)
obj - the object
public void setDefaultModel(Object theDefaultModel)
theDefaultModel - a uml modelpublic Object getDefaultModel()
public Object findTypeInDefaultModel(String name)
name - the name.
public Object getRoot()
public void setRoot(Object root)
root - The root to set, a uml modelpublic boolean isValidDiagramName(String name)
name - The name to test
public GenerationPreferences getCgPrefs()
public Vector getSearchpath()
public URL getUrl()
public HashMap getUUIDRefs()
public void setCgPrefs(GenerationPreferences theCgPrefs)
theCgPrefs - The cgPrefs to setpublic void setSearchpath(Vector theSearchpath)
theSearchpath - The searchpath to setpublic void setUrl(URL theUrl)
theUrl - The url to setpublic void setUUIDRefs(HashMap uUIDRefs)
uUIDRefs - The uUIDRefs to setpublic void setVetoSupport(VetoableChangeSupport theVetoSupport)
theVetoSupport - The vetoSupport to setpublic ArgoDiagram getActiveDiagram()
public void setActiveDiagram(ArgoDiagram theDiagram)
theDiagram - the ArgoDiagrampublic void targetAdded(TargetEvent e)
TargetListener
targetAdded in interface TargetListenere - The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(TargetEvent)public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved in interface TargetListenere - The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(TargetEvent)public void targetSet(TargetEvent e)
TargetListener
targetSet in interface TargetListenere - The targetevent, name will be TARGET_SETTargetListener.targetSet(TargetEvent)public void remove()
public int getPersistenceVersion()
public void setPersistenceVersion(int pv)
pv - The persistenceVersion to set.public Profile getProfile()
public String repair()
public ProjectSettings getProjectSettings()
|
|||||||||||
| 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 |