Uploaded image for project: 'Apache Taverna'
  1. Apache Taverna
  2. TAVERNA-842

RO library does not recognize the history

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • language 0.15.0
    • Taverna Language
    • 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 ().

      Attachments

        Activity

          People

            stain Stian Soiland-Reyes
            binfalse martin scharm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: