Read manifest test for retrieved fields
Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/commit/63f24690 Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/tree/63f24690 Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/diff/63f24690 Branch: refs/heads/master Commit: 63f246901b81480eca295809af3a2ba9f958a330 Parents: 4f0421a Author: Mark Robinson <[email protected]> Authored: Thu Feb 23 14:56:42 2017 +0000 Committer: Mark Robinson <[email protected]> Committed: Thu Feb 23 14:56:42 2017 +0000 ---------------------------------------------------------------------- .../taverna/robundle/manifest/TestManifest.java | 10 ++++++++++ .../src/test/resources/manifest.json | 20 ++++++++++++++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/63f24690/taverna-robundle/src/test/java/org/apache/taverna/robundle/manifest/TestManifest.java ---------------------------------------------------------------------- diff --git a/taverna-robundle/src/test/java/org/apache/taverna/robundle/manifest/TestManifest.java b/taverna-robundle/src/test/java/org/apache/taverna/robundle/manifest/TestManifest.java index 32d2048..2c1221c 100644 --- a/taverna-robundle/src/test/java/org/apache/taverna/robundle/manifest/TestManifest.java +++ b/taverna-robundle/src/test/java/org/apache/taverna/robundle/manifest/TestManifest.java @@ -214,6 +214,16 @@ public class TestManifest { manifest.getBaseURI().resolve("does/not/exist")); Path r = bundle.getRoot(); + + assertEquals("http://example.com/retrieved", manifest.getRetrievedFrom().toString()); + assertEquals("2013-03-05T17:29:03Z", manifest.getRetrievedOn().toString()); + assertEquals("http://example.com/foaf#john", manifest.getRetrievedBy().getUri().toString()); + + PathMetadata soupAggregation = manifest.getAggregation(r.resolve("/folder/soup.jpeg")); + assertEquals("http://example.com/retrieved/soup.jpeg", soupAggregation.getRetrievedFrom().toString()); + assertEquals("2013-03-05T17:29:04Z", soupAggregation.getRetrievedOn().toString()); + assertEquals("http://example.com/foaf#peter", soupAggregation.getRetrievedBy().getUri().toString()); + assertNotNull(manifest.getAggregation(r.resolve("/README.txt"))); PathMetadata readme = manifest.getAggregation(r.resolve("/README.txt")); assertEquals("http://example.com/foaf#bob", readme.getCreatedBy() http://git-wip-us.apache.org/repos/asf/incubator-taverna-language/blob/63f24690/taverna-robundle/src/test/resources/manifest.json ---------------------------------------------------------------------- diff --git a/taverna-robundle/src/test/resources/manifest.json b/taverna-robundle/src/test/resources/manifest.json index 65b57b0..e4a8526 100644 --- a/taverna-robundle/src/test/resources/manifest.json +++ b/taverna-robundle/src/test/resources/manifest.json @@ -4,6 +4,13 @@ ], "id": "/", "manifest": "manifest.json", + "retrievedFrom": "http://example.com/retrieved", + "retrievedOn": "2013-03-05T17:29:03Z", + "retrievedBy": { + "uri": "http://example.com/foaf#john", + "orcid": "http://orcid.org/0000-0002-1825-0100", + "name": "John P. Smith" + }, "createdOn": "2013-03-05T17:29:03Z", "createdBy": { "uri": "http://example.com/foaf#alice", @@ -11,7 +18,15 @@ "name": "Alice W. Land" }, "history": "evolution.ttl", "aggregates": [ - { "uri": "/folder/soup.jpeg" }, + { "uri": "/folder/soup.jpeg", + "retrievedFrom": "http://example.com/retrieved/soup.jpeg", + "retrievedOn": "2013-03-05T17:29:04Z", + "retrievedBy": { + "uri": "http://example.com/foaf#peter", + "orcid": "http://orcid.org/0000-0002-1825-0120", + "name": "Peter L. Jones" + } + }, { "uri": "http://example.com/blog/" }, { "uri": "/README.txt", "mediatype": "text/plain", @@ -29,7 +44,8 @@ "annotations": [ { "uri": "urn:uuid:d67466b4-3aeb-4855-8203-90febe71abdf", "about": "/folder/soup.jpeg", - "content": "annotations/soup-properties.ttl" }, + "content": "annotations/soup-properties.ttl" + }, { "about": "urn:uuid:a0cf8616-bee4-4a71-b21e-c60e6499a644", "content": "http://example.com/blog/they-aggregated-our-file" },
