Skip to content

Commit ab5852c

Browse files
committed
use original image URLs
1 parent 86b2687 commit ab5852c

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

mapping/Images.xrm

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
output r2rml
22

3-
template cloudinaryUrl "https://res.cloudinary.com/dytcmwide/image/upload/t_default_downsize/v1599422851/{0}.jpg"
4-
template cloudinaryThumbUrl "https://res.cloudinary.com/dytcmwide/image/upload/t_media_lib_thumb/v1599422851/{0}.jpg"
53
template magazineIssueImageId "magazine/{0}/issue/{1}/image"
64

75
map Image from wikibus.images {
@@ -15,7 +13,7 @@ map Image from wikibus.images {
1513

1614
properties
1715
schema.identifier from ExternalId;
18-
schema.contentUrl template cloudinaryUrl with ExternalId;
16+
schema.contentUrl from OriginalUrl as IRI;
1917
schema.thumbnail template "cloudinary-image-{0}" with Id as BlankNode;
2018
dtype.orderIndex from OrderIndex with datatype xsd.int;
2119
}
@@ -27,7 +25,7 @@ map ImageThumbnail from wikibus.images {
2725
template imageId with SourceType ExternalId;
2826

2927
properties
30-
schema.contentUrl template cloudinaryThumbUrl with ExternalId;
28+
schema.contentUrl from ThumbnailUrl as IRI;
3129
}
3230

3331
map LegacyImage from wikibus.legacy_images {

mapping/sources.xrm

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ where SourceType = 'book'"
203203
ExternalId
204204
OrderIndex
205205
SourceType
206+
OriginalUrl
207+
ThumbnailUrl
206208
}
207209

208210
logical-source users {

shapes/Brochure-examples.ttl

+15
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@
7575
[
7676
sh:path schema:image ;
7777
sh:hasValue <https://wikibus.lndo.site/image/brochure-wikibus%20library%2Fbrochures%2Fifatzmg81pwm1dbnmj3l> ;
78+
sh:node
79+
[
80+
sh:property
81+
[
82+
sh:path schema:contentUrl ;
83+
sh:hasValue <https://res.cloudinary.com/dytcmwide/image/upload/t_default_downsize/v1632163731/wikibus%20library/brochures/ifatzmg81pwm1dbnmj3l.jpg> ;
84+
] , [
85+
sh:path schema:thumbnail ;
86+
sh:node
87+
[
88+
sh:path schema:contentUrl ;
89+
sh:hasValue <https://res.cloudinary.com/dytcmwide/image/upload/t_media_lib_thumb/v1632163731/wikibus%20library/brochures/ifatzmg81pwm1dbnmj3l.jpg> ;
90+
] ;
91+
] ;
92+
]
7893
]
7994
.
8095

shapes/Brochure.ttl

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
sh:datatype xsd:string ;
3232
sh:minLength 1 ;
3333
sh:maxCount 1 ;
34+
sh:pattern "^[^\\s]" ;
3435
],
3536
[
3637
sh:path dcterms:description ;

0 commit comments

Comments
 (0)