-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
sparql-anything-it/src/test/resources/issues/a00002-1036.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<artwork> | ||
<acno>A00002</acno> | ||
<acquisitionYear>1922</acquisitionYear> | ||
<creator> | ||
<name>Robert Blake</name> | ||
<birthYear>1762</birthYear> | ||
<gender>Male</gender> | ||
<id>38</id> | ||
</creator> | ||
<creditLine>Presented by Mrs John Richmond 1992</creditLine> | ||
<height>213</height> | ||
<id>1036</id> | ||
<medium>Graphite on paper</medium> | ||
<topics> | ||
<children> | ||
<children> | ||
<children> | ||
<item> | ||
<id>273</id> | ||
<name>comforting</name> | ||
</item> | ||
<item> | ||
<id>544</id> | ||
<name>embracing</name> | ||
</item> | ||
<item> | ||
<id>2653</id> | ||
<name>recoiling</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>177</id> | ||
<name>actions: expressive</name> | ||
</item> | ||
</children> | ||
<children> | ||
<children> | ||
<item> | ||
<id>451</id> | ||
<name>figure</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>95</id> | ||
<name>adults</name> | ||
</item> | ||
</children> | ||
<children> | ||
<children> | ||
<item> | ||
<id>799</id> | ||
<name>group</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>97</id> | ||
<name>groups</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>91</id> | ||
<name>people</name> | ||
</item> | ||
</children> | ||
<children> | ||
<children> | ||
<children> | ||
<item> | ||
<id>2815</id> | ||
<name>fear</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>31</id> | ||
<name>emotions and human qualities</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>29</id> | ||
<name>emotions, concepts and ideas</name> | ||
</item> | ||
</children> | ||
<item> | ||
<id>1</id> | ||
<name>topicRoot</name> | ||
</item> | ||
</topics> | ||
<title>Two Drawings of Frightened Figures, Probably for 'The Approach of Doom'</title> | ||
<units>mm</units> | ||
<url>https://www.tate.org.uk/art/artworks/blake-two-drawings-of-frightened-figures-probably-for-the-approach-of-doom-a00002</url> | ||
<width>311</width> | ||
</artwork> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
PREFIX fx: <http://sparql.xyz/facade-x/ns/> | ||
PREFIX xyz: <http://sparql.xyz/facade-x/data/> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX tsub: <http://sparql.xyz/example/tate/topic/> | ||
PREFIX schema: <http://schema.org/> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
CONSTRUCT { | ||
?artwork schema:about ?topic . | ||
?topic schema:name ?name . | ||
} WHERE { | ||
SERVICE <x-sparql-anything:location=%%LOCATION%%> { | ||
# [ a xyz:children; fx:anySlot [a xyz:item; fx:anySlot [ a xyz:id; rdf:_1 ?topicId]; fx:anySlot [ a xyz:name; rdf:_1 ?name ] ] ] . | ||
# [ a xyz:children; ?li1 [a xyz:item; ?li2 [ a xyz:id; ?li3 ?topicId]; ?li4 [ a xyz:name; ?li5 ?name ] ] ] . | ||
[] a xyz:children; fx:anySlot [a xyz:item; fx:anySlot [ a xyz:id; fx:anySlot ?topicId]; fx:anySlot [ a xyz:name; fx:anySlot ?name ]] . | ||
# [] a xyz:children; ?li1 [a xyz:item; ?li2 [ a xyz:id; ?li3 ?topicId]; ?li4 [ a xyz:name; ?li5 ?name ]] . | ||
[] a xyz:url; fx:anySlot ?artworkUrl . | ||
BIND(IRI(?artworkUrl) as ?artwork) . | ||
BIND(IRI(CONCAT(STR(tsub:),STR(?topicId))) AS ?topic) . | ||
FILTER (?topicId != xyz:id) . | ||
FILTER (?name != xyz:name) . | ||
FILTER (?artworkUrl != xyz:url) . | ||
} | ||
} |