[kepler-dev] Instatiating an Actor in Java

Ivens ivensportugal at gmail.com
Mon May 10 17:52:20 PDT 2010


Hi Christopher,

The XML file generated by Kepler to represent an workflow does not have all
information about the actors used in that workflow. For example: ports.
I would like to understand how kepler get this information.
Is there a document that I can read?

Thanks.

On Sun, May 9, 2010 at 12:15 AM, Christopher Brooks
<cxh at eecs.berkeley.edu>wrote:

> Hi Ivens,
> Have a look at how the Kepler build system invokes a model.
> See
>
> https://kepler-project.org/developers/reference/executing-kepler-from-the-command-line
>
> Ptolemy models can be invoked using
> ptolemy/moml/MoMLSimpleApplication.java
>
> Typically one does something like:
> MoMLParser parser = new MoMLParser();
> CompositeActor toplevel = (CompositeActor) parser.parseFile("Foo.xml");
>
> _Christopher
>
> On 5/8/10 5:20 PM, Ivens wrote:
>
>> Hello everybody,
>>
>> I have a Java method called "myMethod".
>> The objective of this method is to instantiate the class of every actor
>> presented in a kepler's workflow.
>>
>> anActor = new ?();
>>
>> My source of information about the workflow is the XML file that
>> representates it.
>> I can retrieve the class of the actors and give it to the method as a
>> parameter, but I don't know how I would write the code above.
>>
>> Can someone help me?
>>
>> Thanks,
>> Ivens
>>
>>
>>
>> _______________________________________________
>> Kepler-dev mailing list
>> Kepler-dev at kepler-project.org
>> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
>>
>
> --
> Christopher Brooks, PMP                       University of California
> CHESS Executive Director                      US Mail: 337 Cory Hall
> Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
> ph: 510.643.9841 fax:510.642.2718             (Office: 545Q Cory)
> home: (F-Tu) 707.665.0131 cell: 707.332.0670
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20100510/74c340e3/attachment.html>


More information about the Kepler-dev mailing list