-
Notifications
You must be signed in to change notification settings - Fork 0
/
misc.rq
72 lines (63 loc) · 2.1 KB
/
misc.rq
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
64
65
66
67
68
69
70
71
72
PREFIX art: <http://www.xybermotive.com/news/Article/>
PREFIX sno: <http://www.xybermotive.com/newsOnt/>
PREFIX ann: <http://www.w3.org/2000/10/annotation-ns#>
PREFIX schema: <http://schema.org/>
PREFIX sc: <http://www.xybermotive.com/ontology/>
PREFIX suppl: <http://www.xybermotive.com/supplier/>
SELECT DISTINCT ?headline ?artUrl ?means ?body WHERE {
?search sno:subject <suppl:VW> .
?search sno:beginDate ?beginDate .
FILTER ( STRSTARTS( ?beginDate, "2014-01-01") ) .
?search schema:result ?article .
?article schema:headline ?headline .
?article sno:annotation ?ann .
?article schema:url ?artUrl .
?ann <http://ns.aksw.org/scms/means> ?means .
?ann <http://www.w3.org/2000/10/annotation-ns#body> ?body .
}
SELECT DISTINCT ?subject ?date ?artUrl ?means ?body WHERE {
#SELECT count(DISTINCT ?artUrl) WHERE {
?search sno:subject ?subject .
?search schema:result ?article .
?search sno:beginDate ?date .
?article sno:annotation ?ann .
?article schema:url ?artUrl .
?ann <http://ns.aksw.org/scms/means> ?means .
?ann <http://www.w3.org/2000/10/annotation-ns#body> ?body .
} ORDER BY DESC (?date)
SELECT ?article count(?ann) ?fetched ?error
WHERE {
?article a schema:NewsArticle .
?article schema:text ?text .
?article schema:headline ?headline .
OPTIONAL { ?article sno:isFetched ?fetched . }
OPTIONAL { ?article sno:fetchError ?error . }
OPTIONAL { ?article sno:annotation ?ann . }
}
WITH <http://www.xybermotive.com/news/>
DELETE {
?article schema:text ""@de .
} WHERE {
?article a schema:NewsArticle .
?article schema:text ""@de .
}
SELECT count(*)
WHERE {
?article a schema:NewsArticle .
FILTER NOT EXISTS { ?article sno:isFetched true . }
}
## remove connection settings (cleanup config)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sc: <http://www.xybermotive.com/ontology/>
WITH <http://www.xybermotive.com/geoknow/>
DELETE {
?conn a sc:Connection .
?conn sc:sender ?sender .
?conn sc:receiver ?receiver .
?conn sc:product ?product .
} WHERE {
?conn a sc:Connection .
?conn sc:sender ?sender .
?conn sc:receiver ?receiver .
?conn sc:product ?product .
}