Class TableNodeView

java.lang.Object
org.knime.core.webui.node.view.table.TableNodeView
All Implemented Interfaces:
DataServiceProvider, NodeTableView, NodeView, TableView, UIExtension

public final class TableNodeView extends Object implements NodeTableView
A NodeView implementation for displaying tables.
Author:
Marc Bux, KNIME GmbH, Berlin, Germany
  • Constructor Details

    • TableNodeView

      public TableNodeView(Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, Supplier<Set<org.knime.core.data.RowKey>> selectionSupplier, org.knime.core.node.workflow.NodeContainer nc, int inputPortIndex)
      Parameters:
      tableSupplier - supplier of the table which this view visualizes
      selectionSupplier - supplier of currently selected rowKeys
      nc - the node this node view belongs to; used to determine the table id (derived from the node id) and to a NodeCleanUpCallback to free resources (caches) in case the node is, e.g., deleted
      inputPortIndex - the index of the input port this table node view is created for; index starts at '0' ignoring the flow variable port
    • TableNodeView

      public TableNodeView(Supplier<org.knime.core.node.BufferedDataTable> tableSupplier, org.knime.core.node.workflow.NodeContainer nc, int inputPortIndex)
      Parameters:
      tableSupplier - supplier of the table which this view visualizes
      nc - the node this node view belongs to; used to determine the table id (derived from the node id) and to a NodeCleanUpCallback to free resources (caches) in case the node is, e.g., deleted
      inputPortIndex - the index of the input port this table node view is created for; index starts at '0' ignoring the flow variable port
  • Method Details

    • getPage

      public Page getPage()
      Description copied from interface: UIExtension
      Returns the (html) page which represents the UI.
      Specified by:
      getPage in interface UIExtension
      Returns:
      the page
    • canBeUsedInReport

      public boolean canBeUsedInReport()
      Description copied from interface: NodeView
      Whether this node view can be used within a report (if the node view is created to be rendered into a report). If not, a 'not supported' placeholder will be added instead. If a node view can be used in a report, its frontend implementation must actively inform the framework that it's either done rendering or directly supply the content (image, html, ...) to it. This is done via the ReportingService in the knime-ui-extension-service package.
      Specified by:
      canBeUsedInReport in interface NodeView
      Returns:
      true if this node view can be used in a report (and exhibits the necessary capabilities); otherwise false
    • createInitialDataService

      public Optional<InitialDataService<TableViewInitialData>> createInitialDataService()
      Description copied from interface: DataServiceProvider
      Creates the initial data service instance. A NodeContext is available when this method is called.
      Specified by:
      createInitialDataService in interface DataServiceProvider
      Returns:
      optional service that provides data for initialization of the node view, port view or node dialog.
    • createRpcDataService

      public Optional<RpcDataService> createRpcDataService()
      Description copied from interface: DataServiceProvider
      Creates the rpc data service instance. A NodeContext is available when this method is called.
      Specified by:
      createRpcDataService in interface DataServiceProvider
      Returns:
      optional service generally providing data to the node view, port view or node dialog;
    • createApplyDataService

      public Optional<ApplyDataService<?>> createApplyDataService()
      Description copied from interface: DataServiceProvider
      Creates the apply data service instance. A NodeContext is available when this method is called.
      Specified by:
      createApplyDataService in interface DataServiceProvider
      Returns:
      optional service to apply new data
    • validateSettings

      public void validateSettings(org.knime.core.node.NodeSettingsRO settings) throws org.knime.core.node.InvalidSettingsException
      Description copied from interface: NodeView
      Validates the given settings before loading it via NodeView.loadValidatedSettingsFrom(NodeSettingsRO). This is called as soon as new settings are applied via the node's dialog. Please also see NodeModel.validateViewSettings(org.knime.core.node.NodeSettingsRO) in order to validate view settings at configuration time.
      Specified by:
      validateSettings in interface NodeView
      Parameters:
      settings - settings to validate
      Throws:
      org.knime.core.node.InvalidSettingsException - if the validation failed
    • loadValidatedSettingsFrom

      public void loadValidatedSettingsFrom(org.knime.core.node.NodeSettingsRO settings)
      Description copied from interface: NodeView
      Loads validated settings.
      Specified by:
      loadValidatedSettingsFrom in interface NodeView
      Parameters:
      settings - settings to load
    • getPortIndex

      public int getPortIndex()
      Specified by:
      getPortIndex in interface TableView
      Returns:
      the index of the input (or output) port supplying the table to be viewed. Hereby the flow variable port is not counted, i.e. this defaults to the first input port after the flow variables port. This input port has to be a BufferedDataTable.