0

Is it possible to set the output format of my custom node to any object i created inside my node? or are there restrictions?

Alex
  • 151
  • 12

1 Answers1

0

Your output should implement PortObject, and also have a PortObjectSerializer and PortObjectSpec (also with PortObjectSpecSerializer). You need to register that with an extension point, just like this. After that, you can use them.

I would recommend using existing port objects though. For example PMMLPortObject might be a good alternative if you need tree-like data structures, BufferedDataTable for tabular data, and the ImagePortObject for images. You might consider creating special cell types and store them in regular BufferedDataTables.

Gábor Bakos
  • 8,982
  • 52
  • 35
  • 52
  • Thank you for your helpful answer. Do you know if it´s possible to change the Input Format inside of a node from lets say a BufferedDataTable into a custom type of Output object? – Alex Oct 30 '17 at 10:35
  • Sure, it is possible if you are writing the node, just use the constructors with PortType arrays instead of int arguments in the constructor (in the Model) and use the appropriate overloads of the other methods (those are not present in the default generated code). – Gábor Bakos Nov 04 '17 at 09:07