[kepler-dev] Instatiating an Actor in Java
Christopher Brooks
cxh at eecs.berkeley.edu
Sat May 8 20:15:47 PDT 2010
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
More information about the Kepler-dev
mailing list