[kepler-dev] {Filename?} Additing an attribute to the relation ....... in kepler by making subcalss to TypedCompositeActor.

jagan Jagan.Kommineni at infotech.monash.edu.au
Tue Jul 26 17:19:12 PDT 2005


Warning: This message has had one or more attachments removed
Warning: (snapshot.bmp).
Warning: Please read the "NCEAS-Attachment-Warning.txt" attachment(s) for more information.

Hi All,

     I would like to add a new attribute to the relation at the creating 
time by making subclass to TypedCompositeActor.java.
     I have made the following changes to the original ptolemy 
TypedCompositeActor.java for the function newRelation,

StringParameter param = new StringParameter(relation, name);
param.addChoice("Default");
param.addChoice("Progressive");
param.addChoice("Entire");

=============================================================================================== 

  /** Create a new TypedIORelation with the specified name, add it
   *  to the relation list, and return it. Derived classes can override
   *  this to create domain-specific subclasses of TypedIORelation.
   *  This method is write-synchronized on the workspace.
   *
   *  @param name The name for the new TypedIORelation.
   *  @return A new TypedIORelation.
   *  @exception NameDuplicationException If name collides with a name
   *   already on the container's contents list.
   */
  public ComponentRelation newRelation(String name)
          throws NameDuplicationException {
      try {
          workspace().getWriteAccess();

          TypedIORelation relation = new TypedIORelation(this, name);

StringParameter param = new StringParameter(relation, name);
param.addChoice("Default");
param.addChoice("Progressive");
param.addChoice("Entire");
                    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();
      }
  }
========================================================================================= 


I am able to see the listed property to the relation, I am here with 
attaching the snapshot .
Now, I make same changes to the subclass JTypedCompositActor.java and 
modified the configuration file read
my subclass instead of ptolemy's original TypedCompositeActor.java. 
(with out any modifications to TypedCompositeActor.java file)

The changes I made to the configuration file 
basicKeplerActorLibrary.xml  is as follows

===================================================================
     <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>
===================================================================

I am not able to see any property created for the relation. I am here 
with enclosing all the necessary file for you to look at it.

with regards,

Jagan Kommineni
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TypedCompositeActor.java
Url: http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20050727/e96e2349/TypedCompositeActor-0001.bat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basicKeplerActorLibrary.xml
Type: text/xml
Size: 107723 bytes
Desc: not available
Url : http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20050727/e96e2349/basicKeplerActorLibrary-0001.xml
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: JTypedCompositeActor.java
Url: http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20050727/e96e2349/JTypedCompositeActor-0001.bat
-------------- next part --------------
This is a message from the MailScanner E-Mail Virus Protection Service
----------------------------------------------------------------------
The original e-mail attachment "snapshot.bmp"
is on the list of unacceptable attachments for this site and has been
replaced by this warning message.

If you wish to receive a copy of the original attachment, please
e-mail helpdesk and include the whole of this message
in your request. Alternatively, you can call them, with
the contents of this message to hand when you call.

At Tue Jul 26 17:31:35 2005 the virus scanner said:
   MailScanner: Possible buffer overflow in Windows (snapshot.bmp)

Note to Help Desk: Look on Mercury in /var/spool/MailScanner/quarantine/20050726 (message 988263580A4.61E2D).
-- 
Postmaster
NCEAS
www.nceas.uscb.edu

MailScanner thanks transtec Computers for their support


More information about the Kepler-dev mailing list