[
https://issues.apache.org/jira/browse/TAVERNA-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15472176#comment-15472176
]
Stian Soiland-Reyes commented on TAVERNA-1011:
----------------------------------------------
Thanks - I've then merged the pull request into master branch.
As DataBundles is a utils class with a collection of static methods (which you
may not agree with :) it would not benefit from inheritance - that is unless we
changed it to be an instance - like Scufl2Tool.
I am not sure about the method name "resolve" or "resolveAsStream". The earlier
method was called "convertPathToObject" which is a bit silly in that a Path is
also an Object.
There's however confusion as java.nio.file.Path also has a "resolve" method -
which is quite different in that it [resolves a relative
pathname|https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html#resolve-java.lang.String-].
So what could be a better name..?
> 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)