[ 
https://issues.apache.org/jira/browse/TAVERNA-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446678#comment-15446678
 ] 

ASF GitHub Bot commented on TAVERNA-1011:
-----------------------------------------

GitHub user stain opened a pull request:

    https://github.com/apache/incubator-taverna-language/pull/35

    TAVERNA-1011 Add DataBundles.resolve() and DataBundles.resolveAsStream()

    As suggested in 
[TAVERNA-1011](https://issues.apache.org/jira/browse/TAVERNA-1011):
    
    Adds two methods: 
    * 
[DataBundles.resolve()](https://github.com/stain/incubator-taverna-language/blob/databundle-resolve/taverna-databundle/src/main/java/org/apache/taverna/databundle/DataBundles.java#L488)
    * 
[DataBundles.resolveAsStream()](https://github.com/stain/incubator-taverna-language/blob/databundle-resolve/taverna-databundle/src/main/java/org/apache/taverna/databundle/DataBundles.java#L656)
    
    See also the unit tests:
    
https://github.com/stain/incubator-taverna-language/blob/databundle-resolve/taverna-databundle/src/test/java/org/apache/taverna/databundle/TestDataBundles.java#L531
    
    
    Perhaps a companion method would be .register(List) ? 
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stain/incubator-taverna-language 
databundle-resolve

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-taverna-language/pull/35.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 #35
    
----
commit 74d014f6b15c894ba75c8fb16980d8044996e5a7
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-28T22:28:29Z

    Added resolve() 
    
    Adapted from
    org.apache.taverna.platform.execution.impl.local.T2ReferenceConverter

commit 2bd2cf952bb739a98791c222c0af85853dda7882
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-28T22:28:47Z

    added ErrorDocument.toString()

commit 94e01397f98307ef37921849eb7dd9ffd279ce72
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-28T22:45:42Z

    Verify resolve() don't break on binaries
    
    ... even if its strings are not very usable :)

commit 5d9cc7f6bdb99fb631f827b4db184ad7e28e1a7d
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-29T17:44:59Z

    test various resolve options

commit 135155e22eeed48e9c495faa007506599c046c54
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-29T17:50:39Z

    add resolveAsStream() - Stream version of resolve()

commit bc6f8a23a43181c23f269ca8997d8c1c9af5dbd2
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-29T18:05:33Z

    test resolveStream()
    
    .. and use correct path in flatMap() !

commit 8eb242fba322e81171ed675911ca328c0abd7b78
Author: Stian Soiland-Reyes <[email protected]>
Date:   2016-08-29T18:14:41Z

    TAVERNA-1011 Bump to 0.16.0
    
    added DataBundles.resolve() and DataBundles.resolveAsStream()

----


> Add DataBundles.resolve()
> -------------------------
>
>                 Key: TAVERNA-1011
>                 URL: https://issues.apache.org/jira/browse/TAVERNA-1011
>             Project: Apache Taverna
>          Issue Type: New Feature
>          Components: Taverna Language
>            Reporter: Stian Soiland-Reyes
>            Assignee: Stian Soiland-Reyes
>             Fix For: language 0.16.0
>
>
> taverna-engine has a static method 
> org.apache.taverna.platform.execution.impl.local.T2ReferenceConverter.convertPathToObject()
>  which converts a DataBundle Path to a classical List<String> or equivalent.
> It turns out that the Workbench also tries to use this method, but can't as 
> it is hidden inside .impl.
> Thus my suggestion is to promote this method to DataBundles.resolve().
> I think also the method could be improved to resolve byte[] and other types 
> than String, to avoid massive memory consumption.
> Perhaps also a typed .resolveAsStream() could be useful, e.g. 
> resolveAsStream(outputs, ErrorDocument.class) would find all the errors (in 
> any order).



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

Reply via email to