fadmaa/grefine-rdf-extension — Issue #45: List literal mapping with GREL
Author: michelemostarda
Created: 2012-01-17 09:36:35+00:00
State: open

Let's suppose I want to convert to RDF a CSV containing composite columns, something like:

C1,C2,C3
-------------
V1,V2,[V3,V4,V5]
V6,V7,[V8,V9]

I tried first, for such columns (in the example above C3), to specify a GREL script returning an array [1].
I expected that the RDF Mapper function would have produced a cartesian product of a triple which value
is a list ( as mocked up in [2]), but instead it returned a string containing the java signature of the array object [3].

The question is:
are you planning to add shortly a list support for literal mapping?
If not, could you mind to suggest us how to start patching the code to have this functionality?

[1]
==================
with(
value.substring(1, length(value)-1).split(","),
e,
forEach(e, v, v.trim().substring(1, length(v) - 1))
)
==================

[2]
==================
a ;
"Ristorante Rosa D'Oro" ;
"Yes" ;
"Italiana";
"Pizza";
"Vegetarian".
==================

[3]
==================
a ;
"Ristorante Rosa D'Oro" ;
"Yes" ;
"[Ljava.lang.Object;@a0ccc96" .
==================