You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by "martin scharm (JIRA)" <ji...@apache.org> on 2015/07/13 14:58:05 UTC

[jira] [Created] (TAVERNA-842) RO library does not recognize the history

martin scharm created TAVERNA-842:
-------------------------------------

             Summary: RO library does not recognize the history
                 Key: TAVERNA-842
                 URL: https://issues.apache.org/jira/browse/TAVERNA-842
             Project: Apache Taverna
          Issue Type: Bug
          Components: Taverna Language
         Environment: using following version:

			<groupId>org.apache.taverna.language</groupId>
			<artifactId>taverna-robundle</artifactId>
			<version>0.15.1-incubating-SNAPSHOT</version>
            Reporter: martin scharm


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}}:

{code:title=Example.java|borderStyle=solid}
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 ());
}
{code}

results in:

{noformat}
{
  "@context" : [ "https://w3id.org/bundle/context" ],
  "id" : "/",
  "manifest" : [ "manifest.json" ],
    "history":   "evolution.ttl"
}
evolution exists: true
bundle knows about the evolution: 0: []
{noformat}

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 ()}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)