Commit aab0afab4d9f54e130e5955ea11de0fa4655fed7

Authored by Barry Norton
1 parent 1eac259c98
Exists in master

Fixed for Autumn schema changes

Showing 4 changed files with 65 additions and 60 deletions

mappings/artist.ttl View file @ aab0afa
... ... @@ -31,29 +31,34 @@
31 31 rr:template "http://musicbrainz.org/artist/{gid}#_"] ;
32 32 rr:predicateObjectMap
33 33 [rr:predicate mo:musicbrainz_guid ;
34   - rr:objectMap [rr:column "gid" ; rr:datatype xsd:string]] .
  34 + rr:objectMap [rr:column "gid" ; rr:datatype xsd:string]] ,
  35 + [rr:predicate foaf:name ;
  36 + rr:objectMap [rr:column "name"]] ,
  37 + [rr:predicate ov:sortLabel ;
  38 + rr:objectMap [rr:column "sort_name"]] .
  39 +
35 40 # [rr:objectMap [rr:parentTriplesMap lb:ArtistActivity] ;
36 41 # rr:predicate mo:activity] ;
37 42  
38   -lb:artist_name a rr:TriplesMap ;
39   - rr:logicalTable [rr:sqlQuery
40   - """SELECT artist.gid, artist_name.name
41   - FROM artist
42   - INNER JOIN artist_name ON artist.name = artist_name.id"""] ;
43   - rr:subjectMap lb:sm_artist ;
44   - rr:predicateObjectMap
45   - [rr:predicate foaf:name ;
46   - rr:objectMap [rr:column "name"]] .
  43 +#lb:artist_name a rr:TriplesMap ;
  44 +# rr:logicalTable [rr:sqlQuery
  45 +# """SELECT artist.gid, artist_name.name
  46 +# FROM artist
  47 +# INNER JOIN artist_name ON artist.name = artist_name.id"""] ;
  48 +# rr:subjectMap lb:sm_artist ;
  49 +# rr:predicateObjectMap
  50 +# [rr:predicate foaf:name ;
  51 +# rr:objectMap [rr:column "name"]]
47 52  
48   -lb:artist_sort_name a rr:TriplesMap ;
49   - rr:logicalTable [rr:sqlQuery
50   - """SELECT artist.gid, artist_name.name
51   - FROM artist
52   - INNER JOIN artist_name ON artist.sort_name = artist_name.id"""] ;
53   - rr:subjectMap lb:sm_artist ;
54   - rr:predicateObjectMap
55   - [rr:predicate ov:sortLabel ;
56   - rr:objectMap [rr:column "name"]] .
  53 +#lb:artist_sort_name a rr:TriplesMap ;
  54 +# rr:logicalTable [rr:sqlQuery
  55 +# """SELECT artist.gid, artist_name.name
  56 +# FROM artist
  57 +# INNER JOIN artist_name ON artist.sort_name = artist_name.id"""] ;
  58 +# rr:subjectMap lb:sm_artist ;
  59 +# rr:predicateObjectMap
  60 +# [rr:predicate ov:sortLabel ;
  61 +# rr:objectMap [rr:column "name"]] .
57 62  
58 63 lb:artist_type_person a rr:TriplesMap ;
59 64 rr:logicalTable [rr:sqlQuery
... ... @@ -214,17 +219,17 @@
214 219 rr:predicate rdfs:seeAlso ;
215 220 rr:objectMap [rr:column "url" ; rr:termType rr:IRI]] .
216 221  
217   -lb:artist_altLabel a rr:TriplesMap ;
218   - rr:logicalTable [rr:sqlQuery
219   - """SELECT artist.gid, artist_name.name
220   - FROM artist
221   - INNER JOIN artist_alias ON artist.id = artist_alias.artist
222   - INNER JOIN musicbrainz.artist_name
223   - ON artist_alias.name = artist_name.id"""] ;
224   - rr:subjectMap [rr:template lb:sm_artist] ;
225   - rr:predicateObjectMap
226   - [rr:predicate skos:altLabel ;
227   - rr:objectMap [rr:column "name"]] .
  222 +#lb:artist_altLabel a rr:TriplesMap ;
  223 +# rr:logicalTable [rr:sqlQuery
  224 +# """SELECT artist.gid, artist_name.name
  225 +# FROM artist
  226 +# INNER JOIN artist_alias ON artist.id = artist_alias.artist
  227 +# INNER JOIN musicbrainz.artist_name
  228 +# ON artist_alias.name = artist_name.id"""] ;
  229 +# rr:subjectMap [rr:template lb:sm_artist] ;
  230 +# rr:predicateObjectMap
  231 +# [rr:predicate skos:altLabel ;
  232 +# rr:objectMap [rr:column "name"]] .
228 233  
229 234 lb:artist_recording a rr:TriplesMap ;
230 235 rr:logicalTable [rr:sqlQuery
mappings/release.ttl View file @ aab0afa
... ... @@ -33,15 +33,15 @@
33 33 rr:template "http://musicbrainz.org/release/{gid}#_"] ;
34 34 rr:predicateObjectMap
35 35 [rr:predicate mo:musicbrainz_guid ;
36   - rr:objectMap [rr:column "gid"; rr:datatype xsd:string]] .
37   -
38   -lb:release_name a rr:TriplesMap ;
39   - rr:logicalTable [rr:sqlQuery
40   - """SELECT release.gid, release_name.name
41   - FROM release
42   - INNER JOIN release_name ON release.name = release_name.id"""] ;
43   - rr:subjectMap lb:sm_release ;
44   - rr:predicateObjectMap
  36 + rr:objectMap [rr:column "gid"; rr:datatype xsd:string]] ,
  37 +#
  38 +#lb:release_name a rr:TriplesMap ;
  39 +# rr:logicalTable [rr:sqlQuery
  40 +# """SELECT release.gid, release_name.name
  41 +# FROM release
  42 +# INNER JOIN release_name ON release.name = release_name.id"""] ;
  43 +# rr:subjectMap lb:sm_release ;
  44 +# rr:predicateObjectMap
45 45 [rr:predicate dc:title ;
46 46 rr:objectMap [rr:column "name" ; rr:datatype xsd:string]] .
47 47  
mappings/release_group.ttl View file @ aab0afa
... ... @@ -31,16 +31,16 @@
31 31 rr:template "http://musicbrainz.org/signal-group/{gid}#_"] ;
32 32 rr:predicateObjectMap
33 33 [rr:predicate mo:musicbrainz_guid ;
34   - rr:objectMap [rr:column "gid" ; rr:datetype xsd:string]] .
35   -
36   -lb:release_group_name a rr:TriplesMap ;
37   - rr:logicalTable
38   - [rr:sqlQuery """SELECT release_group.gid, release_name.name
39   - FROM release_group
40   - INNER JOIN release_name
41   - ON release_group.name = release_name.id"""] ;
42   - rr:subjectMap lb:sm_release_group ;
43   - rr:predicateObjectMap
  34 + rr:objectMap [rr:column "gid" ; rr:datetype xsd:string]] ,
  35 +#
  36 +#lb:release_group_name a rr:TriplesMap ;
  37 +# rr:logicalTable
  38 +# [rr:sqlQuery """SELECT release_group.gid, release_name.name
  39 +# FROM release_group
  40 +# INNER JOIN release_name
  41 +# ON release_group.name = release_name.id"""] ;
  42 +# rr:subjectMap lb:sm_release_group ;
  43 +# rr:predicateObjectMap
44 44 [rr:predicate dc:title ;
45 45 rr:objectMap [rr:column "name" ; rr:datatype xsd:string]] .
46 46  
mappings/track.ttl View file @ aab0afa
... ... @@ -31,7 +31,16 @@
31 31 rr:predicateObjectMap
32 32 [rr:predicate mo:track_number;
33 33 rr:objectMap [rr:column "position" ;
34   - rr:datatype xsd:nonNegativeInteger]] .
  34 + rr:datatype xsd:nonNegativeInteger]] ,
  35 +#
  36 +#lb:track_name a rr:TriplesMap ;
  37 +# rr:logicalTable [rr:sqlQuery
  38 +# """SELECT track.id, track_name.name
  39 +# FROM track INNER JOIN track_name ON track.name = track_name.id"""] ;
  40 +# rr:subjectMap lb:sm_track ;
  41 +# rr:predicateObjectMap
  42 + [rr:predicate dc:title ;
  43 + rr:objectMap [rr:column "name" ; rr:datatype xsd:string]] .
35 44  
36 45 lb:track_length a rr:TriplesMap ;
37 46 rr:logicalTable [rr:sqlQuery
... ... @@ -42,15 +51,6 @@
42 51 rr:predicateObjectMap
43 52 [rr:predicate mo:duration ;
44 53 rr:objectMap [rr:column "length" ; rr:datatype xsd:int]] .
45   -
46   -lb:track_name a rr:TriplesMap ;
47   - rr:logicalTable [rr:sqlQuery
48   - """SELECT track.id, track_name.name
49   - FROM track INNER JOIN track_name ON track.name = track_name.id"""] ;
50   - rr:subjectMap lb:sm_track ;
51   - rr:predicateObjectMap
52   - [rr:predicate dc:title ;
53   - rr:objectMap [rr:column "name" ; rr:datatype xsd:string]] .
54 54  
55 55 lb:track_recording a rr:TriplesMap ;
56 56 rr:logicalTable [rr:sqlQuery