Commit 780609eeeeb0bcd52cd89467104b12f381ce65aa

Authored by Barry Norton
1 parent d9b595487b
Exists in master

Added lyrics to work and missing area mappings

Showing 4 changed files with 19 additions and 2 deletions

  1 +#!/bin/sh
  2 +rm -f dump.out; (for mapping in mappings/*.ttl; do echo "$mapping"; done) | sed 's!mappings/!!g' | sed 's!.ttl!!g' | while read mapping; do /media/rdf/MusicBrainz-R2RML/dump.sh $mapping >> dump.out; done
1   -time java -Xmx10g -jar $ULTRAWRAP_HOME/ultrawrap-compile.jar r2rml -c musicbrainz_compile_config.properties -m mappings/$1.ttl -dump output/$1.nt
  1 +time java -Xmx4g -jar $ULTRAWRAP_HOME/ultrawrap-compile.jar r2rml -c musicbrainz_compile_config.properties -m mappings/$1.ttl -dump output/$1.nt
2 2 #> /dev/null
mappings/work.ttl View file @ 780609e
... ... @@ -86,4 +86,19 @@
86 86 rr:predicateObjectMap
87 87 [rr:predicate rdfs:comment ;
88 88 rr:objectMap [rr:column "text"]] .
  89 +
  90 +lb:work_lyrics a rr:TriplesMap ;
  91 + rr:logicalTable [rr:sqlQuery
  92 + """SELECT work.gid, url
  93 + FROM work
  94 + INNER JOIN l_url_work ON work.id = l_url_work.entity1
  95 + INNER JOIN link ON l_url_work.link = link.id
  96 + INNER JOIN link_type ON link_type = link_type.id
  97 + INNER JOIN url on l_url_work.entity0 = url.id
  98 + WHERE link_type.gid='e38e65aa-75e0-42ba-ace0-072aeb91a538'"""] ;
  99 + rr:subjectMap lb:sm_work ;
  100 + rr:predicateObjectMap
  101 + [rr:predicate mo:lyrics ;
  102 + rr:objectMap [rr:column "url" ;
  103 + rr:termType rr:IRI]] .
musicbrainz_compile_config.properties View file @ 780609e
1 1 NS =
2 2 outputFileName = musicbrainz.ttl
3 3 schema = musicbrainz
4   -connectionUrl = jdbc:postgresql://localhost:5432/musicbrainz?user=musicbrainz&password=musicbrainz
  4 +connectionUrl = jdbc:postgresql://127.0.0.1:5432/musicbrainz?user=musicbrainz&password=musicbrainz
5 5 driver = org.postgresql.Driver
6 6 maxSizeOfKey = 3