Oliver, merging data is something I've been interested in doing for
quite some time. The problem is that there are so many ways to do it.
You should take a look at the ex:converter attribute of the jsonp
importer (data/importers/jsonp-importer), which can be used to transform
the incoming json before it is delivered to exhibit's database. You
could use ex:converter to generate a canonical id based on the primary
key(s) of the data; since exhibit merges items with the same id (even if
different labels) that will solve your problem. The advantage is that
this can be done separate from exhibit. If you get inside the codebase,
you could introduce ex:primaryKeys as a way to specify that in the
<link> tag for the data; this would tell exhibit to generate the id by
concatenating the given keys.
I'm also not sure that a label equality test is sufficient, since for
example the properties used in different data sets might need to be
aligned as well. One approach I've considered in the past is "mapping":
consider a new set of attributes ex:fromProperties="a,b,c" and
ex:toProperties="x,y,z". This would instruct exhibit to rename the
properties a, b, and c to property names x, y, and z respectively as the
data was imported.
On 5/18/2011 8:53 PM, Oliver M. Batista wrote:
Hello friends, My name is Oliver and I´m a grad student here at UFPR,
Curitiba - Brazil. I am trying to write an addition to the exhibit, my
problem is when two "itens" have the same label they´re treated as one
(more like a union), if not they are considered as two itens. Okay if
we could insert some "rules" to the<script> tag that loads a json
file in a way that we can say wich itens should be treated as equal
and more if we could control wich properties of those "equal" items
should be choosen as the best or the more recent we can kind of make a
"ontology" over this data.
That´s the feature I wanna add, this could be great for creating
mashups, since that data from different sources probably have
differents values for the same "key->value" pair of data.
If I am wrong please say me why. I am also writting a paper for this.
If you think that´s a good feature and know how to help, like saying
where in the code exhibit treat the data and determine when a item is
the same as another (okay I still trying to figure out this).
I appreciate any help, tank you for your time.
Regards
--
You received this message because you are subscribed to the Google Groups "SIMILE
Widgets" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en.