diff options
-rwxr-xr-x | examples/dump-dataset-metadata.scm | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/examples/dump-dataset-metadata.scm b/examples/dump-dataset-metadata.scm index 9dd7f44..8a93bc3 100755 --- a/examples/dump-dataset-metadata.scm +++ b/examples/dump-dataset-metadata.scm @@ -31,13 +31,7 @@ ;; find Evan Williams' email ID and insert it into the database. (string->identifier "investigator" (string-join - ;; Add special case for Yohan Bossé whose name - ;; has unprintable characters. - ;; TODO: Fix Yohan Bossé's name in the database. - (let ((last-name (if (string=? first-name "Yohan") - "Bosse" - last-name))) - (list first-name last-name (fix-email-id email))) + (list first-name last-name (fix-email-id email)) "_"))) (define-dump dump-investigators @@ -50,13 +44,11 @@ (field Investigators Email)) (set rdf:type 'foaf:Person) (set foaf:name (string-append (field Investigators FirstName) " " - (if (string=? (field Investigators FirstName) "Yohan") - "Bossé" - (field Investigators LastName)))) + (field Investigators LastName))) (set foaf:givenName - (field ("CAST(CONVERT(BINARY CONVERT(FirstName USING latin1) USING utf8) AS VARCHAR(100))" FirstName))) + (field Investigators FirstName)) (set foaf:familyName - (field ("CAST(CONVERT(BINARY CONVERT(LastName USING latin1) USING utf8) AS VARCHAR(100))" LastName))) + (field Investigators LastName)) (set foaf:homepage (field Investigators Url)) (set v:adr (field Investigators Address)) (set v:locality (field Investigators City)) @@ -161,7 +153,7 @@ (field Investigators LastName) (field Investigators Email))) (set gdmt:hasCreatorAffiliation - (field ("CAST(CONVERT(BINARY CONVERT(Organizations.OrganizationName USING latin1) USING utf8) AS VARCHAR(1500))" Organizations))) + (field Organizations OrganizationName)) (set gdmt:hasDatasetIdentifierSubType (format #f "GN~a" (field InfoFiles GN_AccesionId))) (set gdmt:hasRightsInfo (string-downcase (field DatasetStatus DatasetStatusName))) @@ -191,42 +183,34 @@ (set gnt:hasContentInfo (sanitize-rdf-string (field InfoFiles Specifics))) (set gnt:hasCaseInfo (sanitize-rdf-string - (field ("CAST(CONVERT(BINARY CONVERT(Datasets.AboutCases USING latin1) USING utf8) AS VARCHAR(10000))" AboutCases)))) + (field Datasets AboutCases))) (set gnt:hasPlatformInfo (sanitize-rdf-string - (field ("CAST(CONVERT(BINARY CONVERT(Datasets.AboutPlatform USING latin1) USING utf8) AS VARCHAR(1500))" - AboutPlatform)))) + (field Datasets AboutPlatform))) (set gnt:hasDataProcessingInfo (sanitize-rdf-string - (field ("CAST(CONVERT(BINARY CONVERT(Datasets.AboutDataProcessing USING latin1) USING utf8) AS VARCHAR(1500))" - AboutDataProcessing)))) + (field Datasets AboutDataProcessing))) (set gnt:hasNotes (sanitize-rdf-string - (field ("CAST(CONVERT(BINARY CONVERT(Datasets.Notes USING latin1) USING utf8) AS VARCHAR(1500))" - GNNotes)))) + (field Datasets Notes))) (set gnt:hasExperimentDesignInfo (sanitize-rdf-string - (field ("CAST(CONVERT(BINARY CONVERT(Datasets.ExperimentDesign USING latin1) USING utf8) AS VARCHAR(1500))" - ExperimentDesign)))) + (field Datasets ExperimentDesign))) (set gdmt:hasContributorInfo (sanitize-rdf-string - (field ("CAST(CONVERT(BINARY CONVERT(Datasets.Contributors USING latin1) USING utf8) AS VARCHAR(1500))" - Contributors)))) + (field Datasets Contributors))) (set gdmt:IsCitedBy (sanitize-rdf-string (regexp-substitute/global #f "^[Nn]one$" - (field - ("CAST(CONVERT(BINARY CONVERT(Datasets.Citation USING latin1) USING utf8) AS VARCHAR(1500))" - Citation)) + (field Datasets Citation) ""))) (set gnt:hasAcknowledgement (sanitize-rdf-string (string-trim-both (regexp-substitute/global #f "^[Nn]one$" - (field ("CAST(CONVERT(BINARY CONVERT(InfoFiles.Data_Source_Acknowledge USING latin1) USING utf8) AS VARCHAR(1500))" - Data_Source_Acknowledge)) + (field InfoFiles Data_Source_Acknowledge) "")))) (set gnt:hasAcknowledgement (sanitize-rdf-string (field Datasets Acknowledgment))))) |