Details
-
Bug
-
Status: Done
-
Major
-
Resolution: Done
-
None
-
None
-
using following version:
<groupId>org.apache.taverna.language</groupId>
<artifactId>taverna-robundle</artifactId>
<version>0.15.1-incubating-SNAPSHOT</version>
Description
The bundle.getManifest ().getHistory () method seems to always return an empty list, even if there is a history defined in the file.
Small example that just dumps out the manifest's content and checks if there is a file .ro/evolution.ttl:
Example.java
try (Bundle bundle = Bundles.openBundleReadOnly (file.toPath ())) { Manifest mf = bundle.getManifest (); Path manifest = bundle.getRoot ().resolve (".ro/manifest.json"); for (String line : Files.readAllLines(manifest, Charset.forName("UTF-8"))) System.out.println(line); Path evolution = bundle.getRoot ().resolve (".ro/evolution.ttl"); System.out.println ("evolution exists: " + Files.exists (evolution)); System.out.println ("bundle knows about the evolution: " + mf.getHistory ().size () + ": " + mf.getHistory ()); }
results in:
{ "@context" : [ "https://w3id.org/bundle/context" ], "id" : "/", "manifest" : [ "manifest.json" ], "history": "evolution.ttl" } evolution exists: true bundle knows about the evolution: 0: []
So the manifest defines the history being stored in evolution.ttl, the file .ro/evolution.ttl exists, but I'm not able to retrieve it via mf.getHistory ().