Class AbstractFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int columnIndex
      Transient column index number
      protected java.lang.String columnName
      The column name in which to find the date.
      protected boolean datasetInspected
      Transient flag for validation attempted
      protected PathIcon icon
      The icon for this node itself
      protected java.lang.String iconPath
      The path to the icon to be displayed.
      protected boolean isReverseSort  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractFilter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Comparable classify​(Dataset data, int row)
      Returns a classification key for the given row in the dataset.
      abstract java.lang.Comparable classifyObject​(java.lang.Object obj)  
      protected void copyProps​(AbstractFilter that)  
      java.lang.String getColumnName()
      Returns the name of the column that this filter looks at
      abstract int getDistributionEstimate()
      Given an evenly distributed dataset, how many different classification keys should be expected from this Filter? For instance, a Month filter would return 12, a Day-of-week filter would return 7, while a Year filter would simply return some guess.
      java.lang.String getIconPath()  
      void invalidateCache()
      Called when the dataset being passed to classify has changed.
      boolean isReverseSort()  
      void setColumnName​(java.lang.String columnName)
      Sets the column that the filter looks at
      void setIconPath​(java.lang.String iconPath)  
      void setIsReverseSort​(boolean isReverseSort)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.inductiveautomation.factorypmi.plugins.reporting.components.rowselector.Filter

        copyFilter
    • Field Detail

      • columnName

        protected java.lang.String columnName
        The column name in which to find the date.
      • iconPath

        protected java.lang.String iconPath
        The path to the icon to be displayed. Can be null.
      • icon

        protected PathIcon icon
        The icon for this node itself
      • datasetInspected

        protected boolean datasetInspected
        Transient flag for validation attempted
      • columnIndex

        protected int columnIndex
        Transient column index number
      • isReverseSort

        protected boolean isReverseSort
    • Constructor Detail

      • AbstractFilter

        public AbstractFilter()
    • Method Detail

      • getColumnName

        public java.lang.String getColumnName()
        Description copied from interface: Filter
        Returns the name of the column that this filter looks at
        Specified by:
        getColumnName in interface Filter
      • setColumnName

        public void setColumnName​(java.lang.String columnName)
        Description copied from interface: Filter
        Sets the column that the filter looks at
        Specified by:
        setColumnName in interface Filter
      • classify

        public java.lang.Comparable classify​(Dataset data,
                                             int row)
        Description copied from interface: Filter
        Returns a classification key for the given row in the dataset. If the row can't be classified for some reason, like the classification column not exsiting, null should be returned.
        Specified by:
        classify in interface Filter
      • invalidateCache

        public void invalidateCache()
        Description copied from interface: Filter
        Called when the dataset being passed to classify has changed. This is used for Filters who do some work up front on the DataSet the first time classify is called, such as calculating the column index that they are working on.
        Specified by:
        invalidateCache in interface Filter
      • classifyObject

        public abstract java.lang.Comparable classifyObject​(java.lang.Object obj)
      • getDistributionEstimate

        public abstract int getDistributionEstimate()
        Description copied from interface: Filter
        Given an evenly distributed dataset, how many different classification keys should be expected from this Filter? For instance, a Month filter would return 12, a Day-of-week filter would return 7, while a Year filter would simply return some guess. This isn't critical, it is used to try and give arrays reasonable initial sizes so they don't have to re-allocate frequently.
        Specified by:
        getDistributionEstimate in interface Filter
      • getIconPath

        public java.lang.String getIconPath()
        Specified by:
        getIconPath in interface Filter
      • setIconPath

        public void setIconPath​(java.lang.String iconPath)
        Specified by:
        setIconPath in interface Filter
      • isReverseSort

        public boolean isReverseSort()
        Specified by:
        isReverseSort in interface Filter
      • setIsReverseSort

        public void setIsReverseSort​(boolean isReverseSort)
        Specified by:
        setIsReverseSort in interface Filter