248 lines
5.4 KiB
JSON
248 lines
5.4 KiB
JSON
{
|
|
"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
|
|
}
|
|
} |