Closed AlexanderFillbrunn closed 5 years ago
See https://github.com/genericworkflownodes/GenericKnimeNodes/pull/141
@AlexanderFillbrunn: Do we NEED to use an OutputStream? In which case should we use one? As you know, we will return URIPortObjects that will be passed to our nodes. Maybe you can have a look at my PR and see if it suffices.
Hi, I think you don't need an OutputStream as long as you resolve and handle the URI properly. As far as I know KNIME input and output nodes also support URIs that point to FTP or HTTP resources. I guess this would not work with SeqAn and OpenMS. You should probably check what kind of URI you are dealing with. I will have a look at the FileUtils next week and report back to you.
Ah I see, yes it seems like you can use remote resources with e.g. the FileReader. With GKN we need local files only. The only thing we could think about, is a quicker way to download remote files for GKN. Currently you need Remote Connection-> List Files -> Download from list -> String to URI -> URI to Port.
After I updated #141 this works for both In and Output nodes. We discussed an improvement, though. Currently the user has to explicitly write e.g. knime://knime.workflow/... to make use of the feature. Therefore browsing a selection is not possible (the FileChoosers automatically give you the absolute name). It would be nice, if we automatically detect if a file was chosen that contains a knime relative prefix. Also improve Exception handling and abstract things like the OutputFolderView and the conversion of the paths.
Sorry to ask, but is #141 already in 3.6? It does not seem to work for Input File Nodes.
Yes, it is not in 3.6 yet. But can you check the nightly update site?
Yes at least I can confirm that it works on nightly.
@rrahn Please reopen if this does not work for you.
@jpfeuffer @AlexanderFillbrunn thanks. I'll let you know if I stumble over it.
KNIME input and output nodes allow files to be specified like this:
This saves the file in the workflow directory. This is especially useful for sharing workflows with data files. To use this feature, java.nio.file.Files and the KNIME org.knime.core.util.FileUtil class have to be used to get an output stream: