[isidorus-cvs] r321 - in branches/new-datamodel/src: unit_tests xml/rdf
Lukas Giessmann
lgiessmann at common-lisp.net
Thu Oct 7 21:01:09 UTC 2010
Author: lgiessmann
Date: Thu Oct 7 17:01:08 2010
New Revision: 321
Log:
new-datamodel: adapted the rdf-exporter to the new datamodel; adapted the rdf-exporter-unit-tests to the new datamodel
Modified:
branches/new-datamodel/src/unit_tests/fixtures.lisp
branches/new-datamodel/src/unit_tests/rdf_exporter_test.lisp
branches/new-datamodel/src/xml/rdf/exporter.lisp
Modified: branches/new-datamodel/src/unit_tests/fixtures.lisp
==============================================================================
--- branches/new-datamodel/src/unit_tests/fixtures.lisp (original)
+++ branches/new-datamodel/src/unit_tests/fixtures.lisp Thu Oct 7 17:01:08 2010
@@ -207,7 +207,7 @@
(setf d:*current-xtm* document-id)
(setup-repository *poems_light.xtm* db-dir :tm-id tm-id
:xtm-id document-id)
- (elephant:open-store (xml-importer:get-store-spec db-dir))
+ ;(elephant:open-store (xml-importer:get-store-spec db-dir))
(rdf-exporter:export-rdf exported-file-path :tm-id tm-id)
(&body)
(handler-case (delete-file exported-file-path)
Modified: branches/new-datamodel/src/unit_tests/rdf_exporter_test.lisp
==============================================================================
--- branches/new-datamodel/src/unit_tests/rdf_exporter_test.lisp (original)
+++ branches/new-datamodel/src/unit_tests/rdf_exporter_test.lisp Thu Oct 7 17:01:08 2010
@@ -349,14 +349,14 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue "28.08.1749"))))))
(died-id (concatenate
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue "22.03.1832")))))))
(is-true (property-p me *sw-arc* "born" :nodeID born-id))
@@ -395,7 +395,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue "31.12.1782")))))))
(is-true (property-p me *sw-arc* "dateRange"
@@ -423,7 +423,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue "01.01.1772")))))))
(is-true (property-p me *sw-arc* "dateRange"
@@ -431,7 +431,7 @@
(test test-zauberlehrling
- "Tests the resoruce zauberlehrling."
+ "Tests the resource zauberlehrling."
(with-fixture rdf-exporter-test-db ()
(let ((zauberlehrlings (get-resources-by-uri
"http://some.where/poem/Der_Zauberlehrling")))
@@ -465,7 +465,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue "01.01.1797")))))))
(is-true (property-p me *sw-arc* "dateRange"
@@ -600,7 +600,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value 'd:OccurrenceC
'd:charvalue
"28.08.1749")))))))
@@ -627,7 +627,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value 'd:OccurrenceC
'd:charvalue
"22.03.1832")))))))
@@ -654,7 +654,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value 'd:OccurrenceC
'd:charvalue
"01.01.1797")))))))
@@ -675,7 +675,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value 'd:OccurrenceC
'd:charvalue
"01.01.1782")))))))
@@ -696,7 +696,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value 'd:OccurrenceC
'd:charvalue
"01.01.1772")))))))
@@ -717,7 +717,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue
"http://de.wikipedia.org/wiki/Schiller")))))))
@@ -872,7 +872,7 @@
'string "id_"
(write-to-string
(elephant::oid
- (d:topic
+ (d:parent
(elephant:get-instance-by-value
'd:OccurrenceC 'd:charvalue
"http://de.wikipedia.org/wiki/Schiller")))))))
Modified: branches/new-datamodel/src/xml/rdf/exporter.lisp
==============================================================================
--- branches/new-datamodel/src/xml/rdf/exporter.lisp (original)
+++ branches/new-datamodel/src/xml/rdf/exporter.lisp Thu Oct 7 17:01:08 2010
@@ -75,8 +75,8 @@
(defmacro with-property (construct &body body)
"Generates a property element with a corresponding namespace
- and tag name before executing the body. This macro is for usin
- in occurrences and association that are mapped to RDF properties."
+ and tag name before executing the body. This macro is for using
+ in occurrences and associations that are mapped to RDF properties."
`(let ((ns-list
(separate-uri (rdf-li-or-uri
(uri (first (psis (instance-of ,construct))))))))
@@ -306,7 +306,7 @@
(make-isi-type *tm2rdf-name-type-uri*)
(export-reifier-as-mapping construct)
(map 'list #'to-rdf-elem (item-identifiers construct))
- (when (slot-boundp construct 'instance-of)
+ (when (instance-of construct)
(cxml:with-element "isi:nametype"
(make-topic-reference (instance-of construct))))
(scopes-to-rdf-elems construct)
More information about the Isidorus-cvs
mailing list