Class RemovrSpec

java.lang.Object
com.bazaarvoice.jolt.removr.spec.RemovrSpec
Direct Known Subclasses:
RemovrCompositeSpec, RemovrLeafSpec

public abstract class RemovrSpec extends Object
  • Field Details

  • Constructor Details

    • RemovrSpec

      public RemovrSpec(String rawJsonKey)
  • Method Details

    • parse

      public static PathElement parse(String key)
    • getNonNegativeIntegerFromLiteralPathElement

      protected Integer getNonNegativeIntegerFromLiteralPathElement()
      Try to "interpret" the spec String value as a non-negative integer.
      Returns:
      non-negative integer, otherwise null
    • applyToList

      public abstract List<Integer> applyToList(List<Object> inputList)
      Build a list of indices to remove from the input list, using the pathElement from the Spec.
      Returns:
      the indicies to remove, otherwise empty List.
    • applyToMap

      public abstract List<String> applyToMap(Map<String,Object> inputMap)
      Build a list of keys to remove from the input map, using the pathElement from the Spec.
      Returns:
      the keys to remove, otherwise empty List.