[kepler-dev] getting links from a compositeEntity

Edward A. Lee eal at eecs.berkeley.edu
Fri Feb 17 21:05:00 PST 2006


Chad:

The object representing a connection is a Relation, not a link.
A link is simply the term used for the fact that a Relation and Port
must refer to one another to have any relationship at all.  If
we created a Link object to represent this relationship, then
the Link object and Port object would have to refer to each other,
and we would have another relationship that is not represented by
an object.  Of course, we could define a LinkPortLink and a
LinkRelationLink class to represent these links, but then these
objects would have to relationships that are not represented by
objects... etc.   You get the idea... At some point, a relationship
needs to be represented by cross references and not by objects...

Why are not using MoML to do the copy?  This is how cut and paste
works...

Edward

At 03:04 PM 2/17/2006, Chad Berkley wrote:
>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?
>
>thanks,
>chad
>
>
>
>Edward A. Lee wrote:
>>CompositeEntity.exportFilter(int, Collection) takes a filter
>>argument so that it will return only links involving in the filter...
>>Edward
>>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.
>>>
>>>thanks,
>>>chad
>>>
>>>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.
>>>>Edward
>>>>At 02:25 PM 2/15/2006, Chad Berkley wrote:
>>>>
>>>>>Hi,
>>>>>
>>>>>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?
>>>>>
>>>>>thanks,
>>>>>chad
>>>>>_______________________________________________
>>>>>Kepler-dev mailing list
>>>>>Kepler-dev at ecoinformatics.org
>>>>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>>>>
>>>>
>>>>------------
>>>>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
>
>----------------------------------------------------------------------------
>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 mailing list