summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0402.json
blob: 311373787b62177511eff6fea7ade2d19a975751 (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
{
	"description": "Test `_SUBP` to map DC imported vocabulary with MARC 21 bibliographic terms (#1003, http://www.loc.gov/marc/bibliographic/bd20x24x.html)",
	"setup": [
		{
			"namespace": "NS_MEDIAWIKI",
			"page": "Smw import dc",
			"contents": "http://purl.org/dc/elements/1.1/|[http://purl.org/dc/elements/1.1/ dc]\n title|Type:Text\n type|Type:Text\n date|Type:Date\n description|Type:Text\n creator|Type:Page\n"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Dc:title",
			"contents": "[[Imported from::dc:title]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Dc:creator",
			"contents": "[[Imported from::dc:creator]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Marc:title",
			"contents": "[[Has type::Text]] [[Subproperty of::Dc:title]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Marc:main entry personal name",
			"contents": "[[Has type::Page]] [[Subproperty of::Dc:creator]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Marc:title statement",
			"contents": "[[Has type::Text]] [[Subproperty of::Marc:title]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Marc:varying form of title",
			"contents": "[[Has type::Text]] [[Subproperty of::Marc:title]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has author",
			"contents": "#REDIRECT [[Property:Marc:main entry personal name]]"
		},
		{
			"page": "Animal farm",
			"contents": "[[Marc:title statement::George Orwell's Animal farm]] [[Has author::George Orwell]]"
		},
		{
			"page": "War and Peace",
			"contents": "[[Marc:title statement::War and Peace]] [[Has author::Leo Tolstoy]]"
		},
		{
			"page": "King Lear",
			"contents": "#REDIRECT [[Shakespeare's King Lear]]"
		},
		{
			"page": "Shakespeare",
			"contents": "#REDIRECT [[William Shakespeare]]"
		},
		{
			"page": "Shakespeare's King Lear",
			"contents": "[[Marc:title::King Lear]] [[Has author::William Shakespeare]]"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 any value for Marc:title statement",
			"condition": "[[Marc:title statement::+]]",
			"printouts": [
				"Has author"
			],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Animal farm#0##",
					"War and Peace#0##"
				],
				"datavalues": [
					{
						"property": "Has author",
						"value": "Leo Tolstoy"
					},
					{
						"property": "Has author",
						"value": "George Orwell"
					}
				]
			},
			"store": {
				"clear-cache": true
			}
		},
		{
			"type": "query",
			"about": "#1 any value for Marc:title on level one of the subproperty hierarchy",
			"condition": "[[Marc:title::+]]",
			"printouts": [
				"Has author"
			],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 3,
				"results": [
					"Animal farm#0##",
					"War and Peace#0##",
					"Shakespeare's King Lear#0##"
				],
				"datavalues": [
					{
						"property": "Has author",
						"value": "Leo Tolstoy"
					},
					{
						"property": "Has author",
						"value": "George Orwell"
					},
					{
						"property": "Has author",
						"value": "William Shakespeare"
					}
				]
			},
			"store": {
				"clear-cache": true
			}
		},
		{
			"type": "query",
			"about": "#2 any value for Dc:title on level two of the subproperty hierarchy",
			"condition": "[[Dc:title::+]]",
			"printouts": [
				"Has author"
			],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 3,
				"results": [
					"Animal farm#0##",
					"War and Peace#0##",
					"Shakespeare's King Lear#0##"
				],
				"datavalues": [
					{
						"property": "Has author",
						"value": "Leo Tolstoy"
					},
					{
						"property": "Has author",
						"value": "George Orwell"
					},
					{
						"property": "Has author",
						"value": "William Shakespeare"
					}
				]
			},
			"store": {
				"clear-cache": true
			}
		},
		{
			"type": "query",
			"about": "#3 distinct value for Dc:title on level two of the subproperty hierarchy",
			"condition": "[[Dc:title::~*Animal*]]",
			"printouts": [
				"Has author"
			],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Animal farm#0##"
				],
				"datavalues": [
					{
						"property": "Has author",
						"value": "George Orwell"
					}
				]
			},
			"store": {
				"clear-cache": true
			}
		},
		{
			"type": "query",
			"about": "#4 distinct value for Has author / redirected value / subproperty level zero",
			"condition": "[[Has author::Shakespeare]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Shakespeare's King Lear#0##"
				]
			},
			"store": {
				"clear-cache": true
			}
		},
		{
			"type": "query",
			"about": "#5 distinct value for Dc:creator / redirected value / subproperty level one",
			"condition": "[[Dc:creator::Shakespeare]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 1,
				"results": [
					"Shakespeare's King Lear#0##"
				]
			},
			"store": {
				"clear-cache": true
			}
		}
	],
	"settings": {
		"smwgQSubpropertyDepth": 10,
		"smwgSparqlQFeatures": [
			"SMW_SPARQL_QF_REDI",
			"SMW_SPARQL_QF_SUBP",
			"SMW_SPARQL_QF_SUBC"
		]
	},
	"meta": {
		"skip-on": {
			"virtuoso": "Virtuoso 6.1 rdfs / subproperty/property hierarchies are currently not implemented"
		},
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}