Interface CqnTopLevelsTransformation

All Superinterfaces:
CqnHierarchyTransformation, CqnTransformation, JSONizable

@Beta public interface CqnTopLevelsTransformation extends CqnHierarchyTransformation
Transformation that determines top level instances that belong to a recursive hierarchy. The hierarchy is defined by the hierarchy reference and the hierarchy qualifier. The transformation takes an input set consisting of instances that belong to the hierarchy. The output retains nodes of the top n levels(), i.e. nodes with less then n ancestors.
  • Method Details

    • levels

      long levels()
      Returns the number of levels, which the output set should contain
      Returns:
      the number of levels or -1 if unlimited
    • expandLevels

      Map<Object,Long> expandLevels()
      Returns nodes to be expanded The expand levels are represented as a map. Identifier of a node to be expanded mapped to number of levels to be expanded. null means all levels, 0 means collapsed.
      Returns:
      a map that relates the node ID to the required expand level
    • kind

      default CqnTransformation.Kind kind()
      Description copied from interface: CqnTransformation
      Returns the kind of this transformation
      Specified by:
      kind in interface CqnTransformation
      Returns:
      the kind of this transformation
    • accept

      default void accept(CqnTransformationVisitor visitor)
      Specified by:
      accept in interface CqnTransformation