Package uk.co.real_logic.sbe.xml
Class Field
java.lang.Object
uk.co.real_logic.sbe.xml.Field
Representation for a field (or group or data) member from the SBE schema.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intValue to indicate aFieldis invalid or not yet set. -
Method Summary
Modifier and TypeMethodDescriptionintThe block length of the field.intThe computed block length of the field.voidcomputedBlockLength(int length) The computed block length of the field.intThe computed offset at which the field begins.voidcomputedOffset(int offset) Set the computed offset at which the field begins.intDeprecated version attribute for the field.Description attribute for the field.Dimension type for the field when group or var data.epoch()Epoch attribute for the field.Get the list of group fields.voidgroupFields(List<Field> fields) Set the group fields when a group.intid()ID attribute for the field.booleanIs the field variable length when encoded?name()Name value for the field.intoffset()The offset at which the field begins.presence()Presence attribute for the field.Semantic type attribute for the field.intSince version attribute for the field.timeUnit()Time unit attribute for the field.toString()type()Type attribute for the field.voidValidate the node is correct for the type.valueRef()Ref attribute for the field.
-
Field Details
-
INVALID_ID
public static final int INVALID_IDValue to indicate aFieldis invalid or not yet set.- See Also:
-
-
Method Details
-
validate
Validate the node is correct for the type.- Parameters:
node- in the XML.typeByNameMap- for validating refs.
-
groupFields
Set the group fields when a group.- Parameters:
fields- for the group.
-
groupFields
Get the list of group fields.- Returns:
- the list of group fields.
-
computedOffset
public void computedOffset(int offset) Set the computed offset at which the field begins.- Parameters:
offset- at which the field begins.
-
computedOffset
public int computedOffset()The computed offset at which the field begins.- Returns:
- the computed offset at which the field begins.
-
name
Name value for the field.- Returns:
- name value for the field.
-
description
Description attribute for the field.- Returns:
- the description attribute for the field.
-
id
public int id()ID attribute for the field.- Returns:
- the ID attribute for the field.
-
type
Type attribute for the field.- Returns:
- the Type attribute for the field.
-
offset
public int offset()The offset at which the field begins.- Returns:
- the offset at which the field begins.
-
blockLength
public int blockLength()The block length of the field.- Returns:
- the block length the field.
-
computedBlockLength
public void computedBlockLength(int length) The computed block length of the field.- Parameters:
length- computed for the block length,
-
computedBlockLength
public int computedBlockLength()The computed block length of the field.- Returns:
- the computed block length the field.
-
presence
Presence attribute for the field.- Returns:
- the Presence attribute for the field.
-
valueRef
Ref attribute for the field.- Returns:
- the Ref attribute for the field.
-
semanticType
Semantic type attribute for the field.- Returns:
- the Semantic type attribute for the field.
-
dimensionType
Dimension type for the field when group or var data.- Returns:
- the Dimension type for the field when group or var data.
-
isVariableLength
public boolean isVariableLength()Is the field variable length when encoded?- Returns:
- true if the field is variable length when encoded.
-
sinceVersion
public int sinceVersion()Since version attribute for the field.- Returns:
- the Since version attribute for the field.
-
deprecated
public int deprecated()Deprecated version attribute for the field.- Returns:
- the Deprecated version attribute for the field.
-
epoch
Epoch attribute for the field.- Returns:
- the Epoch attribute for the field.
-
timeUnit
Time unit attribute for the field.- Returns:
- the time unit attribute for the field.
-
toString
-