Class DataSlice

java.lang.Object
ca.spatial.reportwriter.DataSlice
Direct Known Subclasses:
DataSlice.Category, DataSlice.Period, DataSlice.Proportion, DataSlice.Range

public abstract class DataSlice extends Object
Deprecated.
This abstract base class is the foundation for describing the axes of the cross tabulation.

Chain these slice operators together in order to form complex multi-dimensional cross tabulations of any given input table.

At the moment the CrosstabReport expects that any slices before a Period slice will have values computed as though they were in period 0.

This class will be removed in a future release of Patchworks. Instead of using DataSlice's directly, use a CrosstabStore.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated.
    Develops class breaks based upon the contents of a cell.
    static class 
    Deprecated.
    Develops class breaks based upon a series of periods.
    static class 
    Deprecated.
    Develops class breaks based upon the proportion of values in columns matching a common pattern.
    static class 
    Deprecated.
    Develops class breaks based up on a numeric range classification of a column.
    static class 
    Deprecated.
    Develops classes based on a set of expressions or a set of columns matching a similar pattern.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataSlice​(String name)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addRecord​(Object data, int row)
    Deprecated.
    Accumulate the data from a single record.
    void
    addSlice​(DataSlice slice)
    Deprecated.
     
    Deprecated.
    Allocate space for the data
    abstract int
    Deprecated.
    The number of categories in this slice
    abstract void
    Deprecated.
    Write out the field metadata for this slice
    int[]
    Deprecated.
    Obtain an array of the shape of the cross tabulation.
    Deprecated.
    Obtain a comma separated list of column names.
    void
    Deprecated.
    Private implementation of the getHeader method.
    abstract Object
    getLabel​(int i)
    Deprecated.
    The label of the specified category.
    Object[][]
    Deprecated.
     
    Deprecated.
    The name of the slice.
    getName​(int index)
    Deprecated.
     
    Deprecated.
     
    int
    Deprecated.
    Determine the position of the Period slice
    abstract SliceSpec
    Deprecated.
     
    abstract int
    Deprecated.
    Get the data type for the values returned by this slice
    int
    getType​(int index)
    Deprecated.
     
    void
    Deprecated.
    Mark that cached values are no longer valid.
    abstract boolean
    Deprecated.
    Test if this slice static or dynamic with respect to changes in period values.
    void
    output​(PrintStream out, Object data, NumberFormat nf)
    Deprecated.
    Output all of the accumulated data on to the output PrinStream.
    setNext​(DataSlice next)
    Deprecated.
    Connect another slice on to the end of this slice.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataSlice

      public DataSlice(String name)
      Deprecated.
  • Method Details

    • count

      public abstract int count()
      Deprecated.
      The number of categories in this slice
    • getLabel

      public abstract Object getLabel(int i)
      Deprecated.
      The label of the specified category. This label will be used in the output record.
    • getSpec

      public abstract SliceSpec getSpec()
      Deprecated.
    • getName

      public String getName()
      Deprecated.
      The name of the slice. This name is used in the column headings of the output file.
    • getName

      public final String getName(int index)
      Deprecated.
    • getType

      public final int getType(int index)
      Deprecated.
    • getType

      public abstract int getType()
      Deprecated.
      Get the data type for the values returned by this slice
    • doMetadata

      public abstract void doMetadata(PrintStream out)
      Deprecated.
      Write out the field metadata for this slice
    • setNext

      public DataSlice setNext(DataSlice next)
      Deprecated.
      Connect another slice on to the end of this slice. A pivot table specification is a singlely-linked linked list of slices.
    • getNext

      public DataSlice getNext()
      Deprecated.
    • invalidateCache

      public void invalidateCache()
      Deprecated.
      Mark that cached values are no longer valid.
    • allocate

      public Object allocate()
      Deprecated.
      Allocate space for the data
    • isDynamic

      public abstract boolean isDynamic()
      Deprecated.
      Test if this slice static or dynamic with respect to changes in period values. If true, then loadValues(int) will be called for every period in the analysis. If false, then the values will be computed once for the record, and will not change when the period changes.
    • getDimensions

      public int[] getDimensions()
      Deprecated.
      Obtain an array of the shape of the cross tabulation. Each element in the dimensions array described the number of categories in each slice.
    • getLabels

      public Object[][] getLabels()
      Deprecated.
    • getHeader

      public String getHeader()
      Deprecated.
      Obtain a comma separated list of column names.
    • getHeader

      public void getHeader(StringBuffer sb)
      Deprecated.
      Private implementation of the getHeader method. This method is called recursively.
    • addSlice

      public void addSlice(DataSlice slice)
      Deprecated.
    • getPeriodPosition

      public int getPeriodPosition()
      Deprecated.
      Determine the position of the Period slice
    • addRecord

      public Object addRecord(Object data, int row)
      Deprecated.
      Accumulate the data from a single record. This method must be called once for each record that is to be included in the report.
    • output

      public void output(PrintStream out, Object data, NumberFormat nf)
      Deprecated.
      Output all of the accumulated data on to the output PrinStream. This method only needs to be called once.