@@ -909,7 +929,7 @@
Type to Handle Fedora requests
Source
Edit
@@ -924,7 +944,7 @@
Type to handle messaging
Source
Edit
@@ -946,7 +966,7 @@
let fedora_connection = initFedoraRequest(pid_part="test")
Example with dc_values string:
let fedora_connection = initFedoraRequest(dc_values="title:Pencil;contributor:Wiley")
Source
Edit
@@ -968,7 +988,7 @@
let fedora_connection = initFedoraRequest(pid_part="test")
echo fedora_connection.populate_results()
Source
Edit
@@ -986,7 +1006,7 @@
fedora_connection.results = fedora_connection.populate_results()
discard fedora_connection.harvest_datastream("DC")
Source
Edit
@@ -1006,7 +1026,7 @@
fedora_connection.results = fedora_connection.populate_results()
discard fedora_connection.harvest_datastream_no_pages("DC")
Source
Edit
@@ -1026,7 +1046,7 @@
let fedora_connection = initFedoraRequest(pid_part="test")
discard fedora_connection.update_metadata("MODS", "/home/mark/nim_projects/moldybread/experiment")
Source
Edit
@@ -1045,7 +1065,7 @@
fedora_connection.results = fedora_connection.populate_results()
discard fedora_connection.download_foxml().successes
Source
Edit
@@ -1063,7 +1083,7 @@
fedora_connection.results = fedora_connection.populate_results()
doAssert(typeOf(fedora_connection.version_datastream("MODS", false)) == Message)
Source
Edit
@@ -1081,7 +1101,7 @@
fedora_connection.results = fedora_connection.populate_results()
doAssert(typeOf(fedora_connection.change_object_state("I")) == Message)
Source
Edit
@@ -1100,7 +1120,7 @@
fedora_connection.results = fedora_connection.populate_results()
doAssert(typeOf(fedora_connection.purge_old_versions_of_datastream("MODS")) == Message)
Source
Edit
@@ -1118,10 +1138,30 @@
fedora_connection.results = fedora_connection.populate_results()
echo fedora_connection.find_objects_missing_datastream("RELS-INT").errors
Source
Edit
+
+
+method get_datastreams(this: FedoraRequest; profiles = true; as_of_date = getTime()): seq[
+ (string, seq[TaintedString])] {...}{.base, raises: [ValueError, IOError,
+ HttpRequestError, SslError, OSError, TimeoutError, ProtocolError, KeyError,
+ Defect, Exception, XmlError, RegexError, InvalidPositionError], tags: [
+ ReadEnvEffect, WriteIOEffect, ReadIOEffect, TimeEffect, RootEffect].}
+-
+
+
Returns a sequence of tuples with the pid and a sequence of datastreams that belong to it.
+Optionally, you can specify whether you want an entire datastream profile returned (defaults to true) or just the datastream id and a date for which you want to base the query on (defaults to now). Use yyyy-MM-dd or yyyy-MM-ddTHH:mm:ssZ.
+Example:
+let let fedora_connection = initFedoraRequest(output_directory="/home/mark/nim_projects/moldybread/experiment", pid_part="test")
+fedora_connection.results = fedora_connection.populate_results()
+echo fedora_connection.get_datastreams(profiles=true)
+ Source
+Edit
+
method get_datastream_history(this: FedoraRequest; dsid: string): Message {...}{.base, raises: [
@@ -1136,9 +1176,9 @@
fedora_connection.results = fedora_connection.populate_results()
echo fedora_connection.get_datastream_history("MODS").successes
Source
-Edit
+Edit
@@ -1155,9 +1195,68 @@
fedora_connection.results = fedora_connection.populate_results()
discard fedora_connection.get_datastream_at_date("DC", "2019-12-25")
Source
+Edit
+
+
+
+method validate_checksums(this: FedoraRequest; dsid: string): Message {...}{.base, raises: [
+ ValueError, IOError, HttpRequestError, SslError, OSError, TimeoutError,
+ ProtocolError, KeyError, Defect, Exception, XmlError, RegexError,
+ InvalidPositionError],
+ tags: [ReadEnvEffect, WriteIOEffect, ReadIOEffect, TimeEffect, RootEffect].}
+-
+
+
Checks if the current checksum of datastreams in a result set matches the checksum of the same datastream on ingest.
+If so, the check is considered a success. If not, the check is an error. If a datastream is not found for an object, niether a success or error is registered.
+Example:
+let fedora_connection = initFedoraRequest(output_directory="/home/mark/nim_projects/moldybread/experiment", pid_part="test")
+fedora_connection.results = fedora_connection.populate_results()
+echo fedora_connection.validate_checksums("MODS").successes
+ Source
+Edit
+
+
+
+method validate_checksums(this: FedoraRequest): Message {...}{.base, raises: [ValueError,
+ IOError, HttpRequestError, SslError, OSError, TimeoutError, ProtocolError,
+ KeyError, Defect, Exception, XmlError, RegexError, InvalidPositionError],
+ tags: [ReadEnvEffect, WriteIOEffect, ReadIOEffect, TimeEffect, RootEffect].}
+-
+
+
Checks if the current checksum of all datastreams belonging to a particular object matches the checksum of the datastream when it was ingested.
+If the validation is confirmed, the pid and datastream are appended to the successes sequence of the result Message. If the validation fails, the pid and datastream are appended to the errors sequence of the result Message.
+NOTE: By design, this method only checks the current version of the datastream and ignores previous versions.
+Example:
+let fedora_connection = initFedoraRequest(output_directory="/home/mark/nim_projects/moldybread/experiment", pid_part="test")
+fedora_connection.results = fedora_connection.populate_results()
+echo fedora_connection.validate_checksums().errors
+ Source
+Edit
+
+
+
+method find_distinct_datastreams(this: FedoraRequest): seq[string] {...}{.base, raises: [
+ ValueError, IOError, HttpRequestError, SslError, OSError, TimeoutError,
+ ProtocolError, KeyError, Defect, Exception, XmlError, RegexError,
+ InvalidPositionError],
+ tags: [ReadEnvEffect, WriteIOEffect, ReadIOEffect, TimeEffect, RootEffect].}
+-
+
+
Filters distinct datastreams from all objects in a result set.
+Example:
+let fedora_connection = initFedoraRequest(output_directory="/home/mark/nim_projects/moldybread/experiment", pid_part="test")
+fedora_connection.results = fedora_connection.populate_results()
+echo fedora_connection.find_distinct_datastreams()
+ Source
-Edit
+Edit
@@ -1170,7 +1269,7 @@
- Made with Nim. Generated: 2020-01-02 02:19:25 UTC
+ Made with Nim. Generated: 2020-01-06 01:46:36 UTC