Author: lgiessmann Date: Fri Dec 4 08:13:25 2009 New Revision: 158
Log: added a test file for the rdf-module with several reification-cases
Added: trunk/src/unit_tests/reification.rdf Modified: trunk/src/isidorus.asd trunk/src/xml/rdf/exporter.lisp
Modified: trunk/src/isidorus.asd ============================================================================== --- trunk/src/isidorus.asd (original) +++ trunk/src/isidorus.asd Fri Dec 4 08:13:25 2009 @@ -113,6 +113,7 @@ (:static-file "full_mapping.rdf") (:static-file "reification_xtm1.0.xtm") (:static-file "reification_xtm2.0.xtm") + (:static-file "reification.xtm") (:file "atom-conf") (:file "unittests-constants" :depends-on ("dangling_topicref.xtm"
Added: trunk/src/unit_tests/reification.rdf ============================================================================== --- (empty file) +++ trunk/src/unit_tests/reification.rdf Fri Dec 4 08:13:25 2009 @@ -0,0 +1,98 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:sim="http://simpsons.tv" + xmlns:arcs="http://simpsons.tv/arcs/" + xmlns:isi="http://isidorus/tm2rdf_mapping/%22%3E + + <!-- reification in RDF/XML --> + <rdf:Description rdf:about="http://simpsons.tv/homer%22%3E + <arcs:married rdf:ID="married-arc"> + <rdf:Description rdf:about="http://simpsons.tv/marge%22%3E + <arcs:has-child rdf:resource="http://simpsons.tv/bart%22/%3E + arcs:lastNameSimpson</arcs:lastName> + </rdf:Description> + </arcs:married> + arcs:has-child + <rdf:Description rdf:about="http://simpsons.tv/bart%22%3E + <arcs:lastName rdf:ID="lastName-arc">Simpson</arcs:lastName> + </rdf:Description> + </arcs:has-child> + arcs:lastNameSimpson</arcs:lastName> + </rdf:Description> + + <!-- reifiers --> + <rdf:Description rdf:about="#married-arc"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> + <rdf:Description rdf:about="#lastName-arc"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> + + + <!-- reification in Topic-Maps-mapped-RDF --> + <rdf:Description rdf:about="http://simpsons.tv/lisa%22%3E + <isi:name rdf:ID="lisa-name"> + rdf:Description + <rdf:type rdf:resource="http://isidorus/tm2rdf_mapping/types/Name%22/%3E + <isi:type rdf:resource="http://simpsons.tv/lastName%22/%3E + isi:valueSimpson</isi:value> + <isi:variant rdf:ID="lisa-name-variant"> + rdf:Description + <rdf:type rdf:resource="http://isidorus/tm2rdf_mapping/types/Variant%22/%3E + <isi:scope rdf:resource="http://simpsons.tv/sortName%22/%3E + isi:valueLisa Simpson</isi:value> + </rdf:Description> + </isi:variant> + </rdf:Description> + </isi:name> + <isi:occurrence rdf:ID="lisa-occurrence"> + rdf:Description + <rdf:type rdf:resource="http://isidorus/tm2rdf_mapping/Occurrence%22/%3E + <isi:type rdf:resource="http://simpsons.tv/profession%22/%3E + isi:valueStudent</isi:value> + </rdf:Description> + </isi:occurrence> + </rdf:Description> + + <!-- reifiers --> + <rdf:Description rdf:about="#lisa-name"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> + <rdf:Description rdf:about="#lisa-name-variant"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> + <rdf:Description rdf:about="#lisa-occurrence"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> + + + <!-- reification in Topic-Maps-mapped-RDF (TM-association) --> + rdf:Description + <rdf:type rdf:resource="http://isidorus/tm2rdf_mapping/types/Association%22/%3E + <isi:type rdf:resource="http://simpsons.tv/friendship%22/%3E + <isi:association-reifier rdf:resource="friendship-association"/> + <isi:role rdf:ID="friend-role"> + rdf:Description + <rdf:type rdf:resource="http://isidorus/tm2rdf_mapping/types/Role%22/%3E + <isi:type rdf:resource="http://simpsons.tv/friend%22/%3E + <isi:player rdf:resource="http://simpsons.tv/Lenny%22/%3E + </rdf:Description> + </isi:role> + isi:role + rdf:Description + <rdf:type rdf:resource="http://isidorus/tm2rdf_mapping/types/Role%22/%3E + <isi:type rdf:resource="http://simpsons.tv/friend%22/%3E + <isi:player rdf:resource="http://simpsons.tv/Carl%22/%3E + </rdf:Description> + </isi:role> + </rdf:Description> + + <!-- reifiers --> + <rdf:Description rdf:about="#friend-role"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> + <rdf:Description rdf:about="friendship-association"> + <arcs:author rdf:resource="http://some.where/me%22/%3E + </rdf:Description> +</rdf:RDF> \ No newline at end of file
Modified: trunk/src/xml/rdf/exporter.lisp ============================================================================== --- trunk/src/xml/rdf/exporter.lisp (original) +++ trunk/src/xml/rdf/exporter.lisp Fri Dec 4 08:13:25 2009 @@ -502,7 +502,7 @@ "Returns all associations that were mapped from RDF to TM and are still having two roles of the type isi:subject and isi:object." - (declare (TopicC subject-topic)) + (declare (Topic Csubject-topic)) (let ((isi-subject (get-item-by-psi *rdf2tm-subject*)) (isi-object (get-item-by-psi *rdf2tm-object*))) (let ((topic-roles