Custom KNIME DataType Problem

Hi Guys,

I’ve a little question about custom DataTypes (like Mol2\Smiles) in KNIME.

Story:
I’ve written an own DataType and it actually works very fine. My Nodes can detect and accept and of cause progress them too.

Problem:
If I look at my Results where my DataType is visible, there is no Icon from my DataType and its not a Multiline Renderer like I wanted.
Even if i set a BreakPoint somewhere in my Factory Class, it seems that it never reach the code.
I’ve also copied the code from the Mol2 reader and modified it a bit to try if it works. But it seems that he is ignoring my factory class where i define the icon and the renderer.

Question:
Does someone know what I am doing wrong? :slight_smile:

Thanks in advance!
imax.

Hi imax, I guess I’m not able to tell the solution here but instead only ask (hopefully) good questions.

  • By “factory class” you mean the UtilityFactory that is associated with your new DataType?
  • Does your cell class implement the DataValue interface that you defined?
  • Does your cell class implement multiple DataValue interfaces?
  • If so, have you tried to right-click the column header in order to see the list of available renderers? (It’s not shown, if there is only one renderer)
  • Did you define the getPreferredValueClass() method if your cell class implements more than DataValue interface (see the class description of DataCell for details)?
  • Is the java package that contains the icon image exported by the plugin (in the plugin.xml, the tab “runtime” – it’s called “Exported packages” or so)?
I hope that at least one questions helps you to solve your problem. If not, can I have the source code to see what’s missing? Thanks Bernd

Hi Wiswedel,

Thank you very much.
I forgot only one single line which fixed the problem.
In my TypeValue.java file, i forgot the following line:

public static final TestUtilityFactory UTILITY = new TestUtilityFactory();

It works now like a charm.
Thank you very much for your help!

Greetings,
imax.