diff options
author | Munyoki Kilyungi | 2023-05-31 19:12:55 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-06-12 19:06:36 +0300 |
commit | fefdb26c67d89ff5dfb67b57cd9f29bf4257dffb (patch) | |
tree | b796ebf1a21730450deec92e995c5aac8e2ead85 /examples/dump-dataset-metadata.scm | |
parent | f5ad3e1b7c283d10f605221501cb234cb5933a68 (diff) | |
download | gn-transform-databases-fefdb26c67d89ff5dfb67b57cd9f29bf4257dffb.tar.gz |
Default to InfoFiles with the Dataset being a fallback for citations
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'examples/dump-dataset-metadata.scm')
-rwxr-xr-x | examples/dump-dataset-metadata.scm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/examples/dump-dataset-metadata.scm b/examples/dump-dataset-metadata.scm index 37e0f2a..042c16a 100755 --- a/examples/dump-dataset-metadata.scm +++ b/examples/dump-dataset-metadata.scm @@ -174,7 +174,20 @@ (set gn:experimentDesign (sanitize-rdf-string (field Datasets ExperimentDesign))) (set gn:contributors (sanitize-rdf-string (field Datasets Contributors))) - (set gn:citation (sanitize-rdf-string (field Datasets Citation))) + (set gn:citation + (sanitize-rdf-string + (regexp-substitute/global + #f "^[Nn]one$" + (field + ("CAST(CONVERT(BINARY CONVERT(IFNULL(IF(InfoFiles.Citation = 'None' OR InfoFiles.Citation = '' OR InfoFiles.Citation IS NULL, Datasets.Citation, InfoFiles.Citation), '') USING latin1) USING utf8) AS VARCHAR(1500))" + Citation)) + ""))) + (set gn:dataSourceAcknowledgment + (sanitize-rdf-string + (string-trim-both + (regexp-substitute/global #f "^[Nn]one$" + (field InfoFiles Data_Source_Acknowledge) + "")))) (set gn:acknowledgment (sanitize-rdf-string (field Datasets Acknowledgment))))) |