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
|
{
"description": "Test to create inverted annotation using a #ask/template combination (#711, `import-annotation=true`)",
"setup": [
{
"namespace": "SMW_NS_PROPERTY",
"page": "Located in",
"contents": "[[Has type::Page]]"
},
{
"namespace": "SMW_NS_PROPERTY",
"page": "Location of",
"contents": "[[Has type::Page]]"
},
{
"namespace": "NS_TEMPLATE",
"page": "Location",
"contents": "<includeonly>[[Located in::{{{Located in}}}]]</includeonly>"
},
{
"namespace": "NS_TEMPLATE",
"page": "InvertPropertySetter",
"contents": "<includeonly>{{#set:|{{{#userparam}}}={{{1}}} }}</includeonly>"
},
{
"namespace": "NS_TEMPLATE",
"page": "InvertPropertyDeclarator",
"contents": "<includeonly>{{#ask:[[{{{1}}}::{{PAGENAME}}]]|link=none|sep=|template=InvertPropertySetter|userparam={{{2}}}|format=template|import-annotation=true}}</includeonly>"
},
{
"page": "Belgium",
"contents": "{{Location|Located in=Europe}}"
},
{
"page": "Italy",
"contents": "{{Location|Located in=Europe}}"
},
{
"page": "Europe",
"contents": "{{InvertPropertyDeclarator|Located in|Location of}}"
}
],
"tests": [
{
"type": "parser",
"about": "#0 inverse annotation",
"subject": "Europe",
"assert-store": {
"semantic-data": {
"strictPropertyValueMatch": false,
"propertyCount": 4,
"propertyKeys": [
"_SKEY",
"_MDAT",
"Location_of",
"_ASK"
],
"propertyValues": [
"Italy",
"Belgium"
]
}
}
}
],
"settings": {
"wgCapitalLinks": true,
"smwgPageSpecialProperties": [
"_MDAT"
]
},
"meta": {
"version": "2",
"is-incomplete": false,
"debug": false
}
}
|