FileDocCategorySizeDatePackage
SeriesRecord.javaAPI DocApache Poi 3.0.110423Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record

SeriesRecord

public class SeriesRecord extends Record
The series record describes the overall data for a series. NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/records/definitions.
author
Glen Stampoultzis (glens at apache.org)

Fields Summary
public static final short
sid
private short
field_1_categoryDataType
public static final short
CATEGORY_DATA_TYPE_DATES
public static final short
CATEGORY_DATA_TYPE_NUMERIC
public static final short
CATEGORY_DATA_TYPE_SEQUENCE
public static final short
CATEGORY_DATA_TYPE_TEXT
private short
field_2_valuesDataType
public static final short
VALUES_DATA_TYPE_DATES
public static final short
VALUES_DATA_TYPE_NUMERIC
public static final short
VALUES_DATA_TYPE_SEQUENCE
public static final short
VALUES_DATA_TYPE_TEXT
private short
field_3_numCategories
private short
field_4_numValues
private short
field_5_bubbleSeriesType
public static final short
BUBBLE_SERIES_TYPE_DATES
public static final short
BUBBLE_SERIES_TYPE_NUMERIC
public static final short
BUBBLE_SERIES_TYPE_SEQUENCE
public static final short
BUBBLE_SERIES_TYPE_TEXT
private short
field_6_numBubbleValues
Constructors Summary
public SeriesRecord()



     
    

    
public SeriesRecord(RecordInputStream in)
Constructs a Series record and sets its fields appropriately.

param
id id must be 0x1003 or an exception will be throw upon validation
param
size size the size of the data area of the record
param
data data of the record (should not contain sid/len)

        super(in);
    
    
Methods Summary
public java.lang.Objectclone()

        SeriesRecord rec = new SeriesRecord();
    
        rec.field_1_categoryDataType = field_1_categoryDataType;
        rec.field_2_valuesDataType = field_2_valuesDataType;
        rec.field_3_numCategories = field_3_numCategories;
        rec.field_4_numValues = field_4_numValues;
        rec.field_5_bubbleSeriesType = field_5_bubbleSeriesType;
        rec.field_6_numBubbleValues = field_6_numBubbleValues;
        return rec;
    
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_categoryDataType       = in.readShort();
        field_2_valuesDataType         = in.readShort();
        field_3_numCategories          = in.readShort();
        field_4_numValues              = in.readShort();
        field_5_bubbleSeriesType       = in.readShort();
        field_6_numBubbleValues        = in.readShort();

    
public shortgetBubbleSeriesType()
Get the bubble series type field for the Series record.

return
One of BUBBLE_SERIES_TYPE_DATES BUBBLE_SERIES_TYPE_NUMERIC BUBBLE_SERIES_TYPE_SEQUENCE BUBBLE_SERIES_TYPE_TEXT

        return field_5_bubbleSeriesType;
    
public shortgetCategoryDataType()
Get the category data type field for the Series record.

return
One of CATEGORY_DATA_TYPE_DATES CATEGORY_DATA_TYPE_NUMERIC CATEGORY_DATA_TYPE_SEQUENCE CATEGORY_DATA_TYPE_TEXT

        return field_1_categoryDataType;
    
public shortgetNumBubbleValues()
Get the num bubble values field for the Series record.

        return field_6_numBubbleValues;
    
public shortgetNumCategories()
Get the num categories field for the Series record.

        return field_3_numCategories;
    
public shortgetNumValues()
Get the num values field for the Series record.

        return field_4_numValues;
    
public intgetRecordSize()
Size of record (exluding 4 byte header)

        return 4  + 2 + 2 + 2 + 2 + 2 + 2;
    
public shortgetSid()

        return sid;
    
public shortgetValuesDataType()
Get the values data type field for the Series record.

return
One of VALUES_DATA_TYPE_DATES VALUES_DATA_TYPE_NUMERIC VALUES_DATA_TYPE_SEQUENCE VALUES_DATA_TYPE_TEXT

        return field_2_valuesDataType;
    
public intserialize(int offset, byte[] data)

        int pos = 0;

        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));

        LittleEndian.putShort(data, 4 + offset + pos, field_1_categoryDataType);
        LittleEndian.putShort(data, 6 + offset + pos, field_2_valuesDataType);
        LittleEndian.putShort(data, 8 + offset + pos, field_3_numCategories);
        LittleEndian.putShort(data, 10 + offset + pos, field_4_numValues);
        LittleEndian.putShort(data, 12 + offset + pos, field_5_bubbleSeriesType);
        LittleEndian.putShort(data, 14 + offset + pos, field_6_numBubbleValues);

        return getRecordSize();
    
public voidsetBubbleSeriesType(short field_5_bubbleSeriesType)
Set the bubble series type field for the Series record.

param
field_5_bubbleSeriesType One of BUBBLE_SERIES_TYPE_DATES BUBBLE_SERIES_TYPE_NUMERIC BUBBLE_SERIES_TYPE_SEQUENCE BUBBLE_SERIES_TYPE_TEXT

        this.field_5_bubbleSeriesType = field_5_bubbleSeriesType;
    
public voidsetCategoryDataType(short field_1_categoryDataType)
Set the category data type field for the Series record.

param
field_1_categoryDataType One of CATEGORY_DATA_TYPE_DATES CATEGORY_DATA_TYPE_NUMERIC CATEGORY_DATA_TYPE_SEQUENCE CATEGORY_DATA_TYPE_TEXT

        this.field_1_categoryDataType = field_1_categoryDataType;
    
public voidsetNumBubbleValues(short field_6_numBubbleValues)
Set the num bubble values field for the Series record.

        this.field_6_numBubbleValues = field_6_numBubbleValues;
    
public voidsetNumCategories(short field_3_numCategories)
Set the num categories field for the Series record.

        this.field_3_numCategories = field_3_numCategories;
    
public voidsetNumValues(short field_4_numValues)
Set the num values field for the Series record.

        this.field_4_numValues = field_4_numValues;
    
public voidsetValuesDataType(short field_2_valuesDataType)
Set the values data type field for the Series record.

param
field_2_valuesDataType One of VALUES_DATA_TYPE_DATES VALUES_DATA_TYPE_NUMERIC VALUES_DATA_TYPE_SEQUENCE VALUES_DATA_TYPE_TEXT

        this.field_2_valuesDataType = field_2_valuesDataType;
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[SERIES]\n");
        buffer.append("    .categoryDataType     = ")
            .append("0x").append(HexDump.toHex(  getCategoryDataType ()))
            .append(" (").append( getCategoryDataType() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .valuesDataType       = ")
            .append("0x").append(HexDump.toHex(  getValuesDataType ()))
            .append(" (").append( getValuesDataType() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .numCategories        = ")
            .append("0x").append(HexDump.toHex(  getNumCategories ()))
            .append(" (").append( getNumCategories() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .numValues            = ")
            .append("0x").append(HexDump.toHex(  getNumValues ()))
            .append(" (").append( getNumValues() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .bubbleSeriesType     = ")
            .append("0x").append(HexDump.toHex(  getBubbleSeriesType ()))
            .append(" (").append( getBubbleSeriesType() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("    .numBubbleValues      = ")
            .append("0x").append(HexDump.toHex(  getNumBubbleValues ()))
            .append(" (").append( getNumBubbleValues() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 

        buffer.append("[/SERIES]\n");
        return buffer.toString();
    
protected voidvalidateSid(short id)
Checks the sid matches the expected side for this record

param
id the expected sid.

        if (id != sid)
        {
            throw new RecordFormatException("Not a Series record");
        }