summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json
blob: 903ceeb1367d6ecf2a9c4b3bb552ee1c88ea49f2 (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
{
	"description": "Test RDF output for imported foaf vocabulary (#884, en)",
	"setup": [
		{
			"namespace": "NS_MEDIAWIKI",
			"page": "Smw import foaf",
			"contents": "http://xmlns.com/foaf/0.1/|[http://www.foaf-project.org/ Friend Of A Friend]\n name|Type:Text\n homepage|Type:URL\n mbox|Type:Email\n mbox_sha1sum|Type:Text\n depiction|Type:URL\n phone|Type:Text\n Person|Category\n Organization|Category\n knows|Type:Page\n member|Type:Page\n"
		},
		{
			"namespace": "NS_CATEGORY",
			"page": "Organization",
			"contents": "[[Imported from::foaf:Organization]] [[Category:Social entity]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Foaf:homepage",
			"contents": "[[Imported from::foaf:homepage]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Foaf:mbox",
			"contents": "[[Has type::Text]] [[Imported from::foaf:mbox]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Foaf:name",
			"contents": "[[Has type::Text]] [[Imported from::foaf:name]]"
		},
		{
			"namespace": "SMW_NS_PROPERTY",
			"page": "Foaf:knows",
			"contents": "[[Has type::Page]] [[Imported from::foaf:knows]]"
		},
		{
			"page": "John Doe",
			"contents": "[[Foaf:name::John Doe]], [[Foaf:homepage::http://example.org/JohnDoe]] [[Foaf:knows::Jane Doe]]"
		},
		{
			"page": "Jane Doe",
			"contents": "[[Foaf:name::Jane Doe]], [[Foaf:homepage::http://example.org/JaneDoe]] [[Foaf:knows::John Doe]]"
		}
	],
	"tests": [
		{
			"type": "rdf",
			"about": "#0",
			"exportcontroller": {
				"print-pages": [
					"John Doe"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<swivt:Subject rdf:about=\"http://example.org/id/John_Doe\">",
					"xmlns:foaf=\"http://xmlns.com/foaf/0.1/",
					"<foaf:homepage rdf:resource=\"http://example.org/JohnDoe\"/>",
					"<foaf:knows rdf:resource=\"&wiki;Jane_Doe\"/>",
					"<foaf:name rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">John Doe</foaf:name>",
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/homepage\" />",
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/knows\" />",
					"<owl:DatatypeProperty rdf:about=\"http://xmlns.com/foaf/0.1/name\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#1 export with backlinks",
			"exportcontroller": {
				"print-pages": [
					"John Doe",
					"Jane Doe"
				],
				"parameters": {
					"backlinks": true,
					"recursion": "2",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<swivt:Subject rdf:about=\"http://example.org/id/John_Doe\">",
					"<swivt:Subject rdf:about=\"http://example.org/id/Jane_Doe\">",
					"<foaf:homepage rdf:resource=\"http://example.org/JaneDoe\"/>",
					"<foaf:knows rdf:resource=\"&wiki;John_Doe\"/>",
					"<foaf:name rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Jane Doe</foaf:name>",
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/knows\">",
					"<rdfs:label>Foaf:knows</rdfs:label>",
					"<swivt:specialImportedFrom rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">foaf:knows|http://xmlns.com/foaf/0.1/</swivt:specialImportedFrom>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_wpg\"/>",
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/homepage\" />",
					"<owl:DatatypeProperty rdf:about=\"http://xmlns.com/foaf/0.1/name\" />",
					"<owl:DatatypeProperty rdf:about=\"http://semantic-mediawiki.org/swivt/1.0#specialImportedFrom\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#2",
			"exportcontroller": {
				"print-pages": [
					"Property:Foaf:knows"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/knows\">",
					"<rdfs:label>Foaf:knows</rdfs:label>",
					"<swivt:specialImportedFrom rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">foaf:knows|http://xmlns.com/foaf/0.1/</swivt:specialImportedFrom>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_wpg\"/>",
					"<owl:ObjectProperty rdf:about=\"http://semantic-mediawiki.org/swivt/1.0#type\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#3 type definition fetched from import reference",
			"exportcontroller": {
				"print-pages": [
					"Property:Foaf:homepage"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/homepage\">",
					"<swivt:specialImportedFrom rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">foaf:homepage|http://xmlns.com/foaf/0.1/</swivt:specialImportedFrom>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_uri\"/>",
					"<owl:DatatypeProperty rdf:about=\"http://semantic-mediawiki.org/swivt/1.0#specialImportedFrom\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#4 user declared type definition being replaced by import type reference",
			"exportcontroller": {
				"print-pages": [
					"Property:Foaf:mbox"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<owl:ObjectProperty rdf:about=\"http://xmlns.com/foaf/0.1/mbox\">",
					"<swivt:specialImportedFrom rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">foaf:mbox|http://xmlns.com/foaf/0.1/</swivt:specialImportedFrom>",
					"<swivt:type rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0#_ema\"/>",
					"<owl:DatatypeProperty rdf:about=\"http://semantic-mediawiki.org/swivt/1.0#specialImportedFrom\" />"
				]
			}
		},
		{
			"type": "rdf",
			"about": "#5 owl:Class / Category encoding, see #1081",
			"exportcontroller": {
				"print-pages": [
					"Category:Organization"
				],
				"parameters": {
					"backlinks": false,
					"recursion": "1",
					"revisiondate": false
				}
			},
			"assert-output": {
				"to-contain": [
					"<owl:Class rdf:about=\"http://xmlns.com/foaf/0.1/Organization\">",
					"<rdfs:label>Organization</rdfs:label>",
					"<swivt:specialImportedFrom rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">foaf:Organization|http://xmlns.com/foaf/0.1/</swivt:specialImportedFrom>",
					"<rdfs:subClassOf rdf:resource=\"http://example.org/id/Category-3ASocial_entity\"/>",
					"<owl:DatatypeProperty rdf:about=\"http://semantic-mediawiki.org/swivt/1.0#specialImportedFrom\" />",
					"<owl:Class rdf:about=\"http://example.org/id/Category-3ASocial_entity\" />"
				]
			}
		}
	],
	"settings": {
		"wgContLang": "en",
		"smwgExportBCNonCanonicalFormUse": false,
		"smwgNamespace": "http://example.org/id/",
		"smwgNamespacesWithSemanticLinks": {
			"NS_MAIN": true,
			"SMW_NS_PROPERTY": true,
			"NS_CATEGORY": true
		}
	},
	"meta": {
		"version": "2",
		"is-incomplete": false,
		"debug": false
	}
}