Skip navigation links

Package org.knime.core.data.convert.java

Java to DataCell Converters

See: Description

Package org.knime.core.data.convert.java Description

Java to DataCell Converters

Introduction

This package contains classes to box Java types into KNIME types. An extension point is provided to allow implementors of custom KNIME data types to provide compatibility with nodes like the Java Snippet node, which use the KNIME Converter Framework.

Extending

Annotations

In many cases conversion merely requires a call to a create(Foo value) method in your FooCellFactory class. For this case, you just need to add the DataCellFactoryMethod annotation to this method and the framework will automatically create a converter from it.

Example:

 public class FooClassFactory extends ... {

      // ...

      @DataCellFactoryMethod(name = "Foo")
      public static DataCell create(final Foo value) {
          return new FooCell(value);
      }

      // ...
 }
 

Extension Point

To enable conversion from your custom data type, you can also implement the Extension Point with the id defined in org.knime.core.data.convert.java.JavaToDataCellConverterRegistry#EXTENSION_POINT_ID.

This usually involves implementing either SimpleDataCellToJavaConverterFactory or DataCellToJavaConverterFactory directly.

See Also:
org.knime.core.data.convert
Skip navigation links

Copyright, 2003 - 2016. All rights reserved.
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.