-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfilms.shexml
63 lines (60 loc) · 1.84 KB
/
films.shexml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
PREFIX : <http://example.com/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX schema: <http://schema.org/>
SOURCE films_xml_file <http://shexml.herminiogarcia.com/files/films.xml>
SOURCE films_json_file <http://shexml.herminiogarcia.com/files/films.json>
ITERATOR film_xml <xpath: //film> {
FIELD id <@id>
FIELD name <name>
FIELD year <year>
FIELD country <country>
FIELD directors <crew/directors/director>
FIELD screenwritters <crew//screenwritter>
FIELD music <crew/music>
FIELD photography <crew/photography>
ITERATOR actors <cast/actor> {
FIELD name <name>
FIELD role <role>
FIELD film <../../@id>
}
ITERATOR actresses <cast/actress> {
FIELD name <name>
FIELD role <role>
FIELD film <../../@id>
}
}
ITERATOR film_json <jsonpath: $.films[*]> {
PUSHED_FIELD id <id>
FIELD name <name>
FIELD year <year>
FIELD country <country>
FIELD directors <crew.director>
FIELD screenwritters <crew.screenwritter>
FIELD music <crew.music>
FIELD photography <crew.cinematography>
ITERATOR actors <cast[*]> {
FIELD name <name>
FIELD role <role>
POPPED_FIELD film <id>
}
}
EXPRESSION films <films_xml_file.film_xml UNION films_json_file.film_json>
:Films :[films.id] {
schema:name [films.name] ;
:year dbr:[films.year] ;
schema:countryOfOrigin dbr:[films.country] ;
schema:director dbr:[films.directors] ;
:screenwritter dbr:[films.screenwritters] ;
schema:musicBy dbr:[films.music] ;
:cinematographer dbr:[films.photography] ;
schema:actor @:Actor ;
schema:actor @:Actress ;
}
:Actor dbr:[films.actors.name] {
:name [films.actors.name] ;
:appear_on :[films.actors.film] ;
}
:Actress dbr:[films.actresses.name] {
:name [films.actresses.name] ;
:appear_on :[films.actresses.film] ;
}