Hi Mark,
>From your Project instantiation, you should be able to use the functions
you mention:
Project myProject = ....;
String author = myProject.getAuthorName();
If this does not work, then I fear you did not obtain the correct
project, or some other error.
The author gets set in ProjectSettingsTabProperties.handleSettingsTabSave().
It gets stored persistently by its inclusion in the
"src/org/argouml/persistence/argo.tee" file.

There is no single model name anymore in a project.
Please use
Collection c = myProject.getRoots();
and iterate over the returned Objects.
Use the model facade to check if each Object is a UML Model, then get
its name.

In principle, ArgoUML supports projects with multiple root elements, not
even necessarily of the type Model.

Regards,
Michiel




Mark Fortner wrote:
> I've been working on some templates recently in argoprint and realized
> that getting simple project properties wasn't as simple as I thought
> it would be.  I created a new project, clicked on the "untitledModel"
> folder and entered a new model name.  Then I tried Project.getName(),
> it returned the current filename.  And there isn't a Model.getName method.
>
> On the "Documentation" tab, I filled in the "author" and
> "documentation" fields.  I then tried Project.getAuthorname(), and
> Project.getDescription().  Again I got nothing.
> It turns out that if I get the projects current namespace, then I can
> get the author and documentation tagged values.
>
> I still haven't figured out a way to get the model name. 
>
> I looked at the XMI dump, and it shows the model name
>
>  <UML:Model xmi.id <http://xmi.id> =
> '127-0-1-1--4076835d:122ebf3dfd3:-8000:0000000000000E08'
>       name = 'My Project Model' isSpecification = 'false' isRoot =
> 'false' isLeaf = 'false'
>       isAbstract = 'false'>
>
> I looked through the XmiWriter hoping to find some clue about where
> the model name was being stored, but I didn't find anything useful.
>
> Any suggestions would be appreciated.
>
> Regards,
>
> Mark Fortner

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2380702

To unsubscribe from this discussion, e-mail: 
[[email protected]].
To be allowed to post to the list contact the mailing list moderator, email: 
[[email protected]]

Reply via email to