Package com.inet.report.chart.dataset
Class StockForAllRecordsDataset
- java.lang.Object
-
- com.inet.report.chart.dataset.AbstractDataset
-
- com.inet.report.chart.dataset.StockForAllRecordsDataset
-
- All Implemented Interfaces:
BaseDataset
,StockDataset
,java.io.Serializable
- Direct Known Subclasses:
StockForEachRecordDataset
public class StockForAllRecordsDataset extends com.inet.report.chart.dataset.AbstractDataset implements StockDataset
This is a dataset used by stock charts. This evaluates data 'for all records' for four data fields (open, close, high, low).- Since:
- 8.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
FIELDS_COUNT
The count of data fields by this kind of dataset.-
Fields inherited from interface com.inet.report.chart.dataset.BaseDataset
TOKEN_DATASET
-
-
Constructor Summary
Constructors Constructor Description StockForAllRecordsDataset(Chart2 chart)
Creates a new empty dataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Group
getCategoryGroup()
Returns the category group.Chart2
getChart()
Returns the parent chart of this dataset.SummaryField
getCloseField()
Returns the data field which provides the close value.protected SummaryField
getDataField(int index)
Returns the summary field at the specified position in the list.SummaryField
getDataField(java.lang.String name)
Returns the summary field with the specified name ornull
if the summary field with this name not found in the list.java.util.List
getDataFields()
Returns the data fields of this dataset as list.SummaryField
getHighField()
Returns the data field which provides the high value.com.inet.report.chart.dataset.LabelProvider
getLabelProvider()
Returns the LabelProvider responsible for providing the title, footnote, and axis labelsSummaryField
getLowField()
Returns the data field which provides the low value.protected java.lang.String
getName()
FOR INTERNAL USE ONLYSummaryField
getOpenField()
Returns the data field which provides the open value.void
setCloseField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the close value.void
setHighField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the high value.void
setLowField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the low value.void
setOpenField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the open value.void
updateReferences()
FOR INTERNAL USE ONLYjava.lang.String
verify(ChartStyle style)
Verifies the group and sum properties of current dataset.-
Methods inherited from class com.inet.report.chart.dataset.AbstractDataset
getReferencedObject, saveGroups, saveProperties, saveSummaryFields
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inet.report.chart.dataset.BaseDataset
getReferencedObject
-
-
-
-
Field Detail
-
FIELDS_COUNT
protected static final int FIELDS_COUNT
The count of data fields by this kind of dataset.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StockForAllRecordsDataset
public StockForAllRecordsDataset(Chart2 chart)
Creates a new empty dataset.- Parameters:
chart
- the chart (null
not permitted)- Since:
- 8.0
-
-
Method Detail
-
getChart
public Chart2 getChart()
Returns the parent chart of this dataset.- Specified by:
getChart
in interfaceBaseDataset
- Returns:
- the chart.
-
getDataField
public SummaryField getDataField(java.lang.String name)
Returns the summary field with the specified name ornull
if the summary field with this name not found in the list. Testing for equality using the case sensitiveequals
method.- Specified by:
getDataField
in interfaceBaseDataset
- Parameters:
name
- the searched name of summary field (null
not permitted)- Returns:
- the summary field with the specified name or
null
. - See Also:
BaseDataset.getDataFields()
-
getDataFields
public java.util.List getDataFields()
Returns the data fields of this dataset as list.- Specified by:
getDataFields
in interfaceBaseDataset
- Returns:
- the list of data fields
- See Also:
BaseDataset.getDataField(String)
-
getCategoryGroup
protected Group getCategoryGroup()
Returns the category group. The category group is the first group of chart.- Returns:
- the group.
- Since:
- 8.0
-
getLowField
public SummaryField getLowField()
Returns the data field which provides the low value.- Specified by:
getLowField
in interfaceStockDataset
- Returns:
- the data field of type
SummaryField
ornull
if this field was not initialized. - See Also:
StockDataset.setLowField(int, Field, Field, int)
-
setLowField
public void setLowField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the low value. Creates a newSummaryField
with this field, operation and parameters.
For more information on the supported value types of fields and using parameters 'field2nd' and 'nth' seeSummaryField
.- Specified by:
setLowField
in interfaceStockDataset
- Parameters:
summaryOperation
- the summary operation. This only supports operations with number results.field
- the data fieldfield2nd
- the second data field, used for example for weights in weighted averageSummaryField.WEIGHTED_AVERAGE
.nth
- the nth parameter, used for example by summary operationSummaryField.NTH_LARGEST
- See Also:
StockDataset.getCloseField()
,SummaryField.setSummaryOperation(int)
,SummaryField.setField(Field)
,SummaryField.setField2nd(Field)
,SummaryField.setSummaryNth(int)
-
getHighField
public SummaryField getHighField()
Returns the data field which provides the high value.- Specified by:
getHighField
in interfaceStockDataset
- Returns:
- the data field of type
SummaryField
ornull
if this field was not initialized. - See Also:
StockDataset.setHighField(int, Field, Field, int)
-
setHighField
public void setHighField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the high value. Creates a newSummaryField
with this field, operation and parameters.
For more information on the supported value types of fields and using parameters 'field2nd' and 'nth' seeSummaryField
.- Specified by:
setHighField
in interfaceStockDataset
- Parameters:
summaryOperation
- the summary operation. This only supports operations with number results.field
- the data fieldfield2nd
- the second data field, used for example for weights in weighted averageSummaryField.WEIGHTED_AVERAGE
.nth
- the nth parameter, used for example by summary operationSummaryField.NTH_LARGEST
- See Also:
StockDataset.getCloseField()
,SummaryField.setSummaryOperation(int)
,SummaryField.setField(Field)
,SummaryField.setField2nd(Field)
,SummaryField.setSummaryNth(int)
-
getOpenField
public SummaryField getOpenField()
Returns the data field which provides the open value. This property is for chart styleStockStyle.STOCK_HIGH_LOW_OPEN_CLOSE
only.- Specified by:
getOpenField
in interfaceStockDataset
- Returns:
- the data field of type
SummaryField
ornull
if this field was not initialized. - See Also:
StockDataset.setOpenField(int, Field, Field, int)
-
setOpenField
public void setOpenField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the open value. This property is for chart styleStockStyle.STOCK_HIGH_LOW_OPEN_CLOSE
only. Creates a newSummaryField
with this field, operation and parameters.
For more information on the supported value types of fields and using parameters 'field2nd' and 'nth' seeSummaryField
.- Specified by:
setOpenField
in interfaceStockDataset
- Parameters:
summaryOperation
- the summary operation. This only supports operations with number results.field
- the data fieldfield2nd
- the second data field, used for example for weights in weighted averageSummaryField.WEIGHTED_AVERAGE
.nth
- the nth parameter, used for example by summary operationSummaryField.NTH_LARGEST
- See Also:
StockDataset.getCloseField()
,SummaryField.setSummaryOperation(int)
,SummaryField.setField(Field)
,SummaryField.setField2nd(Field)
,SummaryField.setSummaryNth(int)
-
getCloseField
public SummaryField getCloseField()
Returns the data field which provides the close value. This property is for chart styleStockStyle.STOCK_HIGH_LOW_OPEN_CLOSE
only.- Specified by:
getCloseField
in interfaceStockDataset
- Returns:
- the data field of type
SummaryField
ornull
if this field was not initialized. - See Also:
StockDataset.setCloseField(int, Field, Field, int)
-
setCloseField
public void setCloseField(int summaryOperation, Field field, Field field2nd, int nth)
Sets the data field which provides the close value. This property is for chart styleStockStyle.STOCK_HIGH_LOW_OPEN_CLOSE
only. Creates a newSummaryField
with this field, operation and parameters.
For more information on the supported value types of fields and using parameters 'field2nd' and 'nth' seeSummaryField
.- Specified by:
setCloseField
in interfaceStockDataset
- Parameters:
summaryOperation
- the summary operation. This only supports operations with number results.field
- the data fieldfield2nd
- the second data field, used for example for weights in weighted averageSummaryField.WEIGHTED_AVERAGE
.nth
- the nth parameter, used for example by summary operationSummaryField.NTH_LARGEST
- See Also:
StockDataset.getCloseField()
,SummaryField.setSummaryOperation(int)
,SummaryField.setField(Field)
,SummaryField.setField2nd(Field)
,SummaryField.setSummaryNth(int)
-
getDataField
protected SummaryField getDataField(int index)
Returns the summary field at the specified position in the list.- Parameters:
index
- index of summary field to return- Returns:
- the summary field at the specified position in the list.
- Throws:
java.lang.IndexOutOfBoundsException
- if index is out of range.- Since:
- 8.0
-
verify
public java.lang.String verify(ChartStyle style)
Verifies the group and sum properties of current dataset.- Specified by:
verify
in interfaceBaseDataset
- Parameters:
style
- the chart style- Returns:
- the error message or empty string if all properties are correct.
-
updateReferences
public void updateReferences()
FOR INTERNAL USE ONLY- Specified by:
updateReferences
in interfaceBaseDataset
-
getName
protected java.lang.String getName()
FOR INTERNAL USE ONLY- Returns:
- name name for this dataset
-
getLabelProvider
public com.inet.report.chart.dataset.LabelProvider getLabelProvider()
Returns the LabelProvider responsible for providing the title, footnote, and axis labels- Specified by:
getLabelProvider
in interfaceBaseDataset
- Returns:
- the LabelProvider responsible for providing the title, footnote, and axis labels
-
-