Methods Summary |
---|
public java.lang.Object | clone()
LinkedDataRecord rec = new LinkedDataRecord();
rec.field_1_linkType = field_1_linkType;
rec.field_2_referenceType = field_2_referenceType;
rec.field_3_options = field_3_options;
rec.field_4_indexNumberFmtRecord = field_4_indexNumberFmtRecord;
rec.field_5_formulaOfLink = ((org.apache.poi.hssf.record.LinkedDataFormulaField)field_5_formulaOfLink.clone());;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_linkType = in.readByte();
field_2_referenceType = in.readByte();
field_3_options = in.readShort();
field_4_indexNumberFmtRecord = in.readShort();
field_5_formulaOfLink = new org.apache.poi.hssf.record.LinkedDataFormulaField();
field_5_formulaOfLink.fillField(in);
|
public LinkedDataFormulaField | getFormulaOfLink()Get the formula of link field for the LinkedData record.
return field_5_formulaOfLink;
|
public short | getIndexNumberFmtRecord()Get the index number fmt record field for the LinkedData record.
return field_4_indexNumberFmtRecord;
|
public byte | getLinkType()Get the link type field for the LinkedData record.
return field_1_linkType;
|
public short | getOptions()Get the options field for the LinkedData record.
return field_3_options;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 1 + 1 + 2 + 2 + field_5_formulaOfLink.getSize();
|
public byte | getReferenceType()Get the reference type field for the LinkedData record.
return field_2_referenceType;
|
public short | getSid()
return sid;
|
public boolean | isCustomNumberFormat()true if this object has a custom number format
return customNumberFormat.isSet(field_3_options);
|
public int | serialize(int offset, byte[] data)
int pos = 0;
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));
data[ 4 + offset + pos ] = field_1_linkType;
data[ 5 + offset + pos ] = field_2_referenceType;
LittleEndian.putShort(data, 6 + offset + pos, field_3_options);
LittleEndian.putShort(data, 8 + offset + pos, field_4_indexNumberFmtRecord);
pos += field_5_formulaOfLink.serializeField( pos + 10 + offset, data );
return getRecordSize();
|
public void | setCustomNumberFormat(boolean value)Sets the custom number format field value.
true if this object has a custom number format
field_3_options = customNumberFormat.setShortBoolean(field_3_options, value);
|
public void | setFormulaOfLink(LinkedDataFormulaField field_5_formulaOfLink)Set the formula of link field for the LinkedData record.
this.field_5_formulaOfLink = field_5_formulaOfLink;
|
public void | setIndexNumberFmtRecord(short field_4_indexNumberFmtRecord)Set the index number fmt record field for the LinkedData record.
this.field_4_indexNumberFmtRecord = field_4_indexNumberFmtRecord;
|
public void | setLinkType(byte field_1_linkType)Set the link type field for the LinkedData record.
this.field_1_linkType = field_1_linkType;
|
public void | setOptions(short field_3_options)Set the options field for the LinkedData record.
this.field_3_options = field_3_options;
|
public void | setReferenceType(byte field_2_referenceType)Set the reference type field for the LinkedData record.
this.field_2_referenceType = field_2_referenceType;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[AI]\n");
buffer.append(" .linkType = ")
.append("0x").append(HexDump.toHex( getLinkType ()))
.append(" (").append( getLinkType() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .referenceType = ")
.append("0x").append(HexDump.toHex( getReferenceType ()))
.append(" (").append( getReferenceType() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .options = ")
.append("0x").append(HexDump.toHex( getOptions ()))
.append(" (").append( getOptions() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .customNumberFormat = ").append(isCustomNumberFormat()).append('\n");
buffer.append(" .indexNumberFmtRecord = ")
.append("0x").append(HexDump.toHex( getIndexNumberFmtRecord ()))
.append(" (").append( getIndexNumberFmtRecord() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .formulaOfLink = ")
.append(" (").append( getFormulaOfLink() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/AI]\n");
return buffer.toString();
|
protected void | validateSid(short id)Checks the sid matches the expected side for this record
if (id != sid)
{
throw new RecordFormatException("Not a LinkedData record");
}
|