Class DataSetsFieldsTree


  • public class DataSetsFieldsTree
    extends Object
    Object containing information about fake fields tree
    • Constructor Detail

      • DataSetsFieldsTree

        public DataSetsFieldsTree​(Collection<IDataSetFieldsWrapper> fieldsWrappers)
        Constructor
        Parameters:
        fieldsWrappers - fields wrappers, can't be null
    • Method Detail

      • getAncestor

        public IDataSetFieldsWrapper getAncestor​(IDataSetFieldsWrapper fieldWrapper)
        Get ancestor of field (nearest existing folder ot table)
        Parameters:
        fieldWrapper - field wrapper, can't be null
        Returns:
        ancestor field wrapper or null for root field (or if ancestor does not exist)
      • getChildren

        public List<IDataSetFieldsWrapper> getChildren​(IDataSetFieldsWrapper fieldWrapper)
        Get first level children of field
        Parameters:
        fieldWrapper - field wrapper, can be null (when method returns root fields)
        Returns:
        list of fields, never null
      • getFieldWrapper

        public IDataSetFieldsWrapper getFieldWrapper​(String path)
        Get field wrapper by path
        Parameters:
        path - field path, can't be null
        Returns:
        wrapper or null if field was not found
      • getParentPath

        public String getParentPath​(IDataSetFieldsWrapper fieldWrapper)
        Get path of parent field (parent field may does not exist)
        Parameters:
        fieldWrapper - field wrapper, can't be null
        Returns:
        path of parent field, never null
      • addFieldWrapper

        public void addFieldWrapper​(IDataSetFieldsWrapper fieldWrapper)
        Add filed wrapper
        Parameters:
        fieldWrapper - field wrapper, can't be null
      • removeFieldWrapper

        public void removeFieldWrapper​(String path)
        Remove field wrapper by path
        Parameters:
        path - field path, can't be null