Since ArgoPrint is off in its own little corner of the world, I've
never gone to the trouble to download it, so perhaps I'm missing some
subtlety of integration required but the information that you're after
is all available from ArgoUML (obviously). What is it that you need?
On Wed, Oct 22, 2008 at 12:37 PM, Mark Fortner <[EMAIL PROTECTED]> wrote:
> I'm currently working on a templating system for ArgoPrint. I've been
> able to get some basic things working, but in the process I've had to
> create some utility classes to help fetch data out of the model.
> Before I create more utility methods for each diagram type I thought I
> would check first to see if this has been done already.
Can you give an example of the type of utility class that you had to
create? That might help make things more concrete.
> The following is some pseudo-templating code that demonstrates what
> I'm after. If anyone has some suggestions for making it easier to
> extract from the model, please let me know.
This will cover more than just the Model subsystem. The information
outline below is spread across three different sources, but they all
should be readily available. Projects contain information about
Diagrams. Diagrams contain Layers which contain Figs. Figs have
owners which are Model Elements. The Model.getFacade() interface
contains accessors for pretty much everything to do with Model
Elements, although some fancier stuff (get all elements of type foo)
might be off in some of the helper classes.
> foreach($diagram in $project.getDiagramByType($DiagramTypes.UseCaseDiagram)){
> <h2>$diagram.getName()</h2>
>
> foreach($usecase in $diagram.getUseCases()){
> <h3>$usecase.getName()</h4>
> <p>$usecase.getDescription()</p>
>
> foreach($ep in $usecase.getExtensionPoints()){
> <h4>$ep.getName()</h4
> <p> $ep.getDescription()</p>
> }
Most of this stuff should have direct analogs in ArgoUML's Java APIs.
Something like $usecase.getName() would become
Model.getFacade().getName(usecase). The exception would be something
like getDescription() which will need to deal with TagDefinitions,
TagValues, the dataValues in a TaggedValue, etc.
If you're going to do more than a handful of these things, I'd look
into using reflection or generating your code based on the UML 1.4
metamodel or something else which is at least semi-automated.
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]