com.davisor.data.stream
Class PivotDataStream

java.lang.Object
  extended bycom.davisor.data.VoidData
      extended bycom.davisor.data.stream.IteratorDataStream
          extended bycom.davisor.data.stream.PivotDataStream
All Implemented Interfaces:
Data, DataStream

public class PivotDataStream
extends IteratorDataStream

PivotDataStream represents a data stream that has the processed results of PivotDataSource. The elements in the stream are DataValues.

Since:
JDK1.2

Field Summary
static boolean DEBUG
           
protected  java.util.TreeSet M_allCategoryLabels
          All category labels (not including possible null one).
protected  java.util.TreeMap M_allSeriesNames
          All series names (not including possible null one).
protected  java.lang.Boolean M_nullCategoryLabel
          Has there been a null category label (defaults to false).
protected  java.util.HashMap M_nullSeriesName
          Values for null series name (may be null).
protected  java.lang.String M_seriesColumnId
          Base id for series.
protected  Type M_seriesValueType
          Type for series values.
protected  java.lang.String SERIES
          Default name for series.
 
Fields inherited from class com.davisor.data.stream.IteratorDataStream
M_hasNext, M_index, M_iterator, M_metaData, M_nextData
 
Fields inherited from class com.davisor.data.VoidData
M_type
 
Fields inherited from interface com.davisor.data.stream.DataStream
INITIAL_INDEX
 
Constructor Summary
PivotDataStream(java.util.TreeMap allSeriesNames, java.util.TreeSet allCategoryLabels, java.util.HashMap nullSeriesName, java.lang.Boolean nullCategoryLabel, Type seriesValueType, java.lang.String seriesColumnId)
          Creates a data stream from the given data structures.
 
Methods inherited from class com.davisor.data.stream.IteratorDataStream
close, getIndex, hasNext, init, next, toString
 
Methods inherited from class com.davisor.data.VoidData
equals, getDataValue, getType, hashCode, setType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.davisor.data.Data
getType
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

M_allSeriesNames

protected java.util.TreeMap M_allSeriesNames
All series names (not including possible null one).


M_allCategoryLabels

protected java.util.TreeSet M_allCategoryLabels
All category labels (not including possible null one).


M_nullSeriesName

protected java.util.HashMap M_nullSeriesName
Values for null series name (may be null).


M_nullCategoryLabel

protected java.lang.Boolean M_nullCategoryLabel
Has there been a null category label (defaults to false).


M_seriesValueType

protected Type M_seriesValueType
Type for series values.


M_seriesColumnId

protected java.lang.String M_seriesColumnId
Base id for series.


SERIES

protected java.lang.String SERIES
Default name for series.

Constructor Detail

PivotDataStream

public PivotDataStream(java.util.TreeMap allSeriesNames,
                       java.util.TreeSet allCategoryLabels,
                       java.util.HashMap nullSeriesName,
                       java.lang.Boolean nullCategoryLabel,
                       Type seriesValueType,
                       java.lang.String seriesColumnId)
                throws InvalidDataException
Creates a data stream from the given data structures. At least one series name must be given and at least one category label must be given. Null series name counts as a series name. The existence of null category label counts as a category label.

The type for series values is needed because all values might be null. In that case, determining correct type for values is not possible.

Keys in the allSeriesNames are assumed to be DataValues and values are assumed to be HashMaps. Values in this HashMap as in the HashMap of nullSeriesName are assumed to be DataValues. Keys in allCategoryLabels are assumed to be DataValues.

Parameters:
allSeriesNames - Series names (not including possible null one).
allCategoryLabels - Category labels(not including possible null one).
nullSeriesName - Values for null series name.
nullCategoryLabel - Has there been a null category label.
seriesValueType - Type for series values.
seriesColumnId - Base id for series (may be null).
Throws:
InvalidDataException - If the data does not fulfill expectations.


Copyright © 2001-2004 Davisor Oy. All Rights Reserved.