[kepler-dev] creating new data type

Matthew Jones jones at nceas.ucsb.edu
Tue Nov 6 09:46:45 PST 2007


Hi Ufuk,

As a short term solution, you should be able to pass any data structure 
using the type 'object'.  The passing and receiving actors have to 
'know' that they will be able to process the right object ... in 
particular, the receiver will have to cast the Java Object that it 
receives to a class of the right type that it expects.

The longer term solution is indeed to add a new data type, which 
requires creating the proper token and type subclasses and extending the 
Lattice class to show the allowable conversions.

Your idea of passing metadata along with a data object is one that we 
are pursuing as well.  We would like to extend the EMLDataSource actor 
and other data source actors to pass along metadata with their data 
tokens, probably as a reference to another data structure (i.e., not 
stored directly within the Token).  We're hoping this will be something 
we can generalize across all of the tokens that are passed in the 
system.  It would be useful to know how you are architecting your 
solution.  Do you have a UML diagram or other design specs you could 
share with us?  Thanks.

Matt

[BE] Ufuk Utku Turuncoglu wrote:
> Hi,
> 
> I try to create some actor that will pass and get custom data type along 
> it's ports. The data type contains data and it's metadata. For example, 
> metadata could be include name, description, number of dimensions, 
> coordinate variables (latitude, longitude etc.) and other informations 
> that is related with data.
> 
> I create two level data type class, the first level holds metadata and 
> second one holds data. So, data extents the metadata and now, i could 
> create a variable which holds it's metadata. In this case, ithink, i 
> have to define this type in pyolemy/kepler as a known data type. When 
> using created data type in port definition section (setTypeEquals), it 
> gives me error messages.
> 
> Is it possible to use custom user defined data type in actors and it's 
> ports? What is the problem in my case? I you want to get detailed 
> information, please let me know.
> 
> Best wishes,
> 
> --ufuk
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu                       Ph: 1-907-523-1960
http://www.nceas.ucsb.edu/ecoinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Kepler-dev mailing list