[kepler-dev] getting links from a compositeEntity
berkley at nceas.ucsb.edu
Fri Feb 17 15:04:16 PST 2006
I'm still having no luck getting this to work. All I want to do is copy
the links and relations from one workflow to another. I don't see any
way to programatically access the links themselves. I'm cloning all of
the actors in the workflow, but they port link information does not seem
to get transfered. I don't understand why links aren't just another
member of the model hierarchy that I can manipulate independently from
the other objects. They seem to be a "special" element in moml that you
can never get direct control over. Am I doing something that I ought
not be doing by attempting to copy the links? Is there something
intrinsic to this process that I'm missing?
Edward A. Lee wrote:
> CompositeEntity.exportFilter(int, Collection) takes a filter
> argument so that it will return only links involving in the filter...
> At 11:16 AM 2/16/2006, Chad Berkley wrote:
>> I've got the relation objects, but what I'm trying to get at is the
>> <link> moml elements. When I call exportMoML() on a
>> ComponentRelation, I get something like this:
>> <relation name="relation" class="ptolemy.actor.TypedIORelation">
>> I want that but also the <link> elements that tell what the relation
>> is linked to. Do I have to go through the port list to get these?
>> How do I get the links to serialize.
>> Edward A. Lee wrote:
>>> Links are not objects in the Ptolemy II abstract syntax.
>>> Relations are objects...
>>> Relations contain a list of references to ports that they
>>> are linked to, and the ports contain a list of the relations
>>> that they are linked to.
>>> At 02:25 PM 2/15/2006, Chad Berkley wrote:
>>>> I'm trying to find a programatic way to access the links that are
>>>> contained in a composite. The only method I see that kind of does this
>>>> is CompositeEntity.exportLinks() which just returns a string moml
>>>> description of the links, but no objects. Is there a way to get an
>>>> object representation of links?
>>>> Kepler-dev mailing list
>>>> Kepler-dev at ecoinformatics.org
>>> Edward A. Lee
>>> Professor, Chair of the EE Division, Associate Chair of EECS
>>> 231 Cory Hall, UC Berkeley, Berkeley, CA 94720
>>> phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>>> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>>> Posted to the ptolemy-hackers mailing list. Please send administrative
>>> mail for this list to: ptolemy-hackers-request at ptolemy.eecs.berkeley.edu
> Edward A. Lee
> Professor, Chair of the EE Division, Associate Chair of EECS
> 231 Cory Hall, UC Berkeley, Berkeley, CA 94720
> phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
More information about the Kepler-dev