diff options
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json')
-rw-r--r-- | www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json | 208 |
1 files changed, 208 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json new file mode 100644 index 00000000..903ceeb1 --- /dev/null +++ b/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Integration/JSONScript/TestCases/r-0003.json @@ -0,0 +1,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 + } +}
\ No newline at end of file |