[kepler-dev] Dynamicalling adding properties (attributes) to the relation ......
jagan
Jagan.Kommineni at infotech.monash.edu.au
Thu Jun 2 17:43:23 PDT 2005
Hello Edward,
I have made the following changes for creating property to the relation
and I worked before, and it not working now,
Could you mind to advise please?.
1. I did subclass the TpedCompisiteActor and I have overridden
newRelation method which is as floows,
==========================================================================
package griddles;
//////////////////////////////////////////////////////////////////////////
//// JTypedCompositeActor
public class JTypedCompositeActor extends TypedCompositeActor{
public JTypedCompositeActor() {
super();
}
public JTypedCompositeActor(Workspace workspace) {
super(workspace);
}
public JTypedCompositeActor(CompositeEntity container, String name)
throws IllegalActionException, NameDuplicationException {
super(container, name);
}
public ComponentRelation newRelation(String name) throws
NameDuplicationException {
try {
workspace().getWriteAccess();
TypedIORelation relation = new TypedIORelation(this, name);
StringParameter param = new StringParameter(this, name);
param.setExpression("Enter "+name);
return relation;
}
catch (IllegalActionException ex) {
// This exception should not occur, so we throw a runtime
// exception.
throw new InternalErrorException(this, ex, null);
}
finally {
workspace().doneWriting();
}
}
}
==============================================================================
2. I made the following changes to the configuration file,
basicKeplerActorLibrary.xml
<entity name="Composite Actor" class="griddles.JTypedCompositeActor">
<property name="entityId"
class="org.ecoinformatics.seek.util.NamedObjId"
value="urn:lsid:ecoinformatics.org:kepler.118.1"/>
</entity>
3. I checked the new configuration file that was loaded while running
kepler has loaded the updated configuration file,
[java] *sys-package-mgr*: processing modified jar,
'C:\kepler\build\kepler-configs.jar'.
4. When I connect two actors with a relation, I am not able see any new
property that was created in the JTypedCompositeActor.
5. Whereas when I do same thing few months back I was able to see
property when ever I create new relation.
with regards,
Jagan Kommineni
Edward A. Lee wrote:
>
> The easiest way to do this, I think, would be to subclass
> TypedCompositeActor and override the newRelation() method to
> return a relation that contains the parameter you are interested in.
> You would then want to create a new configuration that uses
> your subclass rather than TypedCompositeActor.
>
> Edward
>
> At 12:12 PM 12/22/2004 +1100, jagan wrote:
>
>> References: <200412211640.iBLGeCRR028721 at maury.eecs.berkeley.edu>
>> <1103669339.6784.174.camel at kyoto>
>> In-Reply-To: <1103669339.6784.174.camel at kyoto>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> Content-Transfer-Encoding: 7bit
>>
>> Hi Ilkay, Christpher,
>>
>> Would you mind to give me some information for adding
>> properties (attributes) to the relation at the time when actrs
>> connecting graphically. I know it is possible to add properties
>> dynamically by right clicking during the design phase. In the GriddLeS
>> project I need to pass some information which is more integrated to
>> the relation rather than actor. I want this happen automatically when
>> user tries to connect actors. I will appreciate if you could give some
>> clues in this aspect.
>>
>> with regards,
>>
>> Jagan Kommineni
>>
>>
>> _______________________________________________
>> kepler-dev mailing list
>> kepler-dev at ecoinformatics.org
>> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
>
>
> ------------
> Edward A. Lee, Professor
> 518 Cory Hall, UC Berkeley, Berkeley, CA 94720
> phone: 510-642-0455, fax: 510-642-2718
> eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>
> _______________________________________________
> kepler-dev mailing list
> kepler-dev at ecoinformatics.org
> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
More information about the Kepler-dev
mailing list