---------- Forwarded message ----------
From: Jakub Káňa <jakubk...@gmail.com>
Date: 2014-11-20 21:13 GMT+01:00
Subject: R2RML strange output
To: virtuoso-users@lists.sourceforge.net


Hi all,

I am trying to generate some triples using R2RML, but when I say that
column with URL link should be rr:termType rr:IRI ... I get really weird
logic of generating my triples.

Same problem is when I use rr:template instead of rr:column



My mapping is here. Bold is change between mapping of outputs.

DB.DBA.TTLP ('
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix s: <http://schema.org/> .
@prefix pod: <http://linked.opendata.cz/ontology/product-open-data.com#>

<#TriplesMapBrand> a rr:TriplesMap;
rr:logicalTable [
      rr:tableSchema "POD";
      rr:tableOwner  "DBA";
      rr:tableName   "BRAND"
];

    rr:subjectMap
    [
      rr:template "
http://linked.opendata.cz/resource/product-open-data.com/brand/{BSIN}";;
      rr:class gr:Brand;
      rr:graph <
http://linked.opendata.cz/resource/dataset/product-open-data.com/2014-01-01/temp
>
    ];

   rr:predicateObjectMap [
        rr:predicate pod:bsin;
        rr:objectMap [rr:column "BSIN" ];
];

 rr:predicateObjectMap [
        rr:predicate gr:name;
        rr:objectMap [ rr:column "BRAND_NM" ];
];
 rr:predicateObjectMap [
        rr:predicate s:url;
        rr:objectMap [*rr:termType rr:IRI;* rr:column "BRAND_LINK";];

];.


', 'http://product-open-data.org/temp', 'http://product-open-data.org/temp'
);

exec ('sparql ' || DB.DBA.R2RML_MAKE_QM_FROM_G ('
http://product-open-data.org/temp'));

*OUTPUT DATA WITH IRI *

# Dump of graph <
http://linked.opendata.cz/resource/dataset/product-open-data.com/2014-01-01>,
as of 2014-11-20 20:20:28.000003
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix gr: <http://purl.org/goodrelations/v1#> .
<
http://linked.opendata.cz/resource/product-open-data.com/brand/http%3A%2F%2Fpurl.org%2Fgoodrelations%2Fv1%23Brand
> rdf:type gr:Brand .
<
http://linked.opendata.cz/resource/product-open-data.com/brand/%20Cardoso%20Pl\u00C3\u00A1stico
> gr:name " Cardoso Pl\u00E1stico" .
<
http://linked.opendata.cz/resource/product-open-data.com/brand/100%25%20pure
> gr:name "100% pure" .
<
http://linked.opendata.cz/resource/product-open-data.com/brand/101%20Do%20Brasil
> gr:name "101 Do Brasil" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/1664>
gr:name "1664" .
<
http://linked.opendata.cz/resource/product-open-data.com/brand/21st%20Century
> gr:name "21st Century" .
<
http://linked.opendata.cz/resource/product-open-data.com/brand/3%20Musketeers
> gr:name "3 Musketeers" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/33%20export>
gr:name "33 export" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/3M>
gr:name "3M"
.


*OUTPUT DATA WITHOUT IRI*

<http://linked.opendata.cz/resource/product-open-data.com/brand/9CHXFK>
gr:name "Bush furniture" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9CLVI6>
gr:name "Shark" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9D5PSL>
gr:name "Vicks" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9D8GAQ>
gr:name "El Mexicano" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9DB8TV>
gr:name "Orville Redenbacher's" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9DQEPV>
gr:name "bodycology" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9DTDTG>
gr:name "Merisant brands" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9EB4M6>
gr:name "Glucerna" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9ERH5M>
gr:name "Logona" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9F5HF7>
gr:name "Classic accessories" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9F98YC>
gr:name "Jean Martin" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9FGTEC>
gr:name "Great Value" .
<http://linked.opendata.cz/resource/product-open-data.com/brand/9FJSIX>
gr:name "Grand Jury" .
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to