summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/q-0401.json
blob: 30096e72627bc36f1aecb28d76dd0b3e5ce9ded3 (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
{
	"description": "Test `_SUBP` on a simple 'family' subproperty hierarchy example query (#1003, skip virtuoso)",
	"setup": [
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Family (http://www.cs.man.ac.uk/~stevensr/ontology/family.rdf.owl)",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Spouse",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has wife",
			"contents": "[[Has type::Page]] [[Subproperty of::Spouse]] [[Subproperty of::Family]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has husband",
			"contents": "[[Has type::Page]] [[Subproperty of::Spouse]] [[Subproperty of::Family]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has child",
			"contents": "[[Has type::Page]] [[Subproperty of::Family]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has brother",
			"contents": "[[Has type::Page]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Has sister",
			"contents": "[[Has type::Page]]"
		},
		{
			"page": "John Doe",
			"contents": "[[Has wife::Jane Doe]] [[Has child::Jonnie Doe]] [[Has child::Janie Doe]]"
		},
		{
			"page": "Jane Doe",
			"contents": "[[Has husband::John Doe]]"
		},
		{
			"page": "Jonnie Doe",
			"contents": "[[Has sister::Janie Doe]]"
		},
		{
			"page": "Janie Doe",
			"contents": "[[Has brother::Jonnie Doe]]"
		}
	],
	"tests": [
		{
			"type": "query",
			"about": "#0 Spouse to search any value",
			"condition": "[[Spouse::+]]",
			"printouts": [
				"Has wife",
				"Has husband"
			],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"results": [
					"John Doe#0##",
					"Jane Doe#0##"
				],
				"count": "2",
				"datavalues": [
					{
						"property": "Has wife",
						"value": "Jane Doe"
					},
					{
						"property": "Has husband",
						"value": "John Doe"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#1 Disjunctive query for distinct spouse value",
			"condition": "[[Spouse::John Doe]] OR [[Spouse::Jane Doe]]",
			"printouts": [
				"Has wife",
				"Has husband"
			],
			"parameters": {
				"limit": "10"
			},
			"assert-queryresult": {
				"results": [
					"John Doe#0##",
					"Jane Doe#0##"
				],
				"count": "2",
				"datavalues": [
					{
						"property": "Has wife",
						"value": "Jane Doe"
					},
					{
						"property": "Has husband",
						"value": "John Doe"
					}
				]
			}
		},
		{
			"type": "query",
			"about": "#2 find members of a super property",
			"condition": "[[Subproperty of::Property:Spouse]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Has wife#102##",
					"Has husband#102##"
				]
			}
		},
		{
			"type": "query",
			"about": "#3 find the super properties (invert)",
			"condition": "[[-Subproperty of::Property:Has wife]]",
			"printouts": [],
			"parameters": {
				"limit": 10
			},
			"assert-queryresult": {
				"count": 2,
				"results": [
					"Spouse#102##",
					"Family#102##"
				]
			}
		}
	],
	"settings": {
		"smwgQSubpropertyDepth": 10,
		"smwgSparqlQFeatures": [
			"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
	}
}