[ https://issues.apache.org/jira/browse/TAVERNA-842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626338#comment-14626338 ]
ASF GitHub Bot commented on TAVERNA-842: ---------------------------------------- GitHub user binfalse opened a pull request: https://github.com/apache/incubator-taverna-language/pull/16 implemented the check for a history in RO bundles that should fix https://issues.apache.org/jira/browse/TAVERNA-842 You can merge this pull request into a Git repository by running: $ git pull https://github.com/binfalse/incubator-taverna-language master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-taverna-language/pull/16.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16 ---- commit 74d9f2fecf9dbdb56f67416cf6d52f308760d6cd Author: Martin Scharm <mar...@binfalse.de> Date: 2015-07-14T11:41:17Z added a test for the ro history commit bcc31f8cecf4699a71943e3887893f49b41675d2 Author: Martin Scharm <mar...@binfalse.de> Date: 2015-07-14T13:25:07Z ro bundles now recognize their history the `RDFToManifest.readTo` method just didn't look for a potential history. implemented the missing part and extended the test fixes https://issues.apache.org/jira/browse/TAVERNA-842 commit 6663d270390b710a5923d717cc33c41e75af4020 Author: Martin Scharm <mar...@binfalse.de> Date: 2015-07-14T13:26:29Z Merge branch 'master' of https://github.com/apache/incubator-taverna-language ---- > 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)