Class MultiValuedCellSplitOperation

  • All Implemented Interfaces:

    public class MultiValuedCellSplitOperation
    extends Object
    implements Operation
    Splits the value of a cell and spreads the splits on the following rows, while respecting the record structure. The keyColumnName can be used to specify which column should be treated as record key (although this parameter has never been exposed in the UI as of 2020-05).
    • Field Detail

      • _columnName

        protected final String _columnName
      • _keyColumnName

        protected final String _keyColumnName
      • _separator

        protected final String _separator
      • _regex

        protected final Boolean _regex
      • _fieldLengths

        protected final int[] _fieldLengths
    • Constructor Detail

      • MultiValuedCellSplitOperation

        public MultiValuedCellSplitOperation​(String columnName,
                                             String keyColumnName,
                                             String separator,
                                             boolean regex)
      • MultiValuedCellSplitOperation

        public MultiValuedCellSplitOperation​(String columnName,
                                             String keyColumnName,
                                             int[] fieldLengths)
    • Method Detail

      • apply

        public ChangeResult apply​(Grid projectState,
                                  ChangeContext context)
                           throws OperationException
        Description copied from interface: Operation
        Derives the new grid state from the current grid state. Executing this method should be quick (even on large datasets) since it is expected to just derive the new grid from the existing one without actually executing any expensive computation. Long-running computations should rather go in the derivation of a ChangeData which will be fetched asynchronously.
        Specified by:
        apply in interface Operation
        projectState - the state of the grid before the change
        an object which bundles up various pieces of information produced by the operation: primarily, the new grid after applying the operation. This object can be subclassed to expose more information, which should be serializable with Jackson so that it reaches the frontend.
        OperationException - when the change cannot be applied to the given grid
      • getColumnName

        public String getColumnName()
      • getKeyColumnName

        public String getKeyColumnName()
      • getSeparator

        public String getSeparator()
      • getRegex

        public Boolean getRegex()
      • getFieldLengths

        public int[] getFieldLengths()
      • getDescription

        public String getDescription()
        Description copied from interface: Operation
        A short human-readable description of what this operation does.
        Specified by:
        getDescription in interface Operation