Class AbstractFilter
- java.lang.Object
-
- com.inductiveautomation.factorypmi.plugins.reporting.components.rowselector.AbstractFilter
-
- All Implemented Interfaces:
Filter
- Direct Known Subclasses:
CustomDateFilter
,DayFilter
,DiscreteFilter
,MonthFilter
,ShiftFilter
,StringFilter
,YearFilter
public abstract class AbstractFilter extends java.lang.Object implements Filter
-
-
Field Summary
Fields Modifier and Type Field Description protected int
columnIndex
Transient column index numberprotected java.lang.String
columnName
The column name in which to find the date.protected boolean
datasetInspected
Transient flag for validation attemptedprotected PathIcon
icon
The icon for this node itselfprotected 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 atabstract 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 atvoid
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
-
-
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 interfaceFilter
-
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 interfaceFilter
-
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.
-
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 interfaceFilter
-
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 interfaceFilter
-
getIconPath
public java.lang.String getIconPath()
- Specified by:
getIconPath
in interfaceFilter
-
setIconPath
public void setIconPath(java.lang.String iconPath)
- Specified by:
setIconPath
in interfaceFilter
-
isReverseSort
public boolean isReverseSort()
- Specified by:
isReverseSort
in interfaceFilter
-
setIsReverseSort
public void setIsReverseSort(boolean isReverseSort)
- Specified by:
setIsReverseSort
in interfaceFilter
-
copyProps
protected void copyProps(AbstractFilter that)
-
-