Package uk.co.real_logic.sbe.xml
Class EncodedDataType
java.lang.Object
uk.co.real_logic.sbe.xml.Type
uk.co.real_logic.sbe.xml.EncodedDataType
SBE simple encoded data type.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEncodedDataType(String name, String packageName, Presence presence, String description, String semanticType, PrimitiveType primitiveType, int length, boolean varLen) Construct a new EncodedDataType with direct values.EncodedDataType(String name, Presence presence, String description, String semanticType, PrimitiveType primitiveType, int length, boolean varLen) Construct a new EncodedDataType with direct values.EncodedDataType(Node node) Construct a new encodedDataType from XML Schema.EncodedDataType(Node node, String givenName, String referencedName) Construct a new encodedDataType from XML Schema. -
Method Summary
Modifier and TypeMethodDescriptionThe character encoding of the typeconstVal()The constant value of the type if specifiedintThe encodedLength (in octets) of the encoding as length of the primitiveType times its count.booleanReturn the variableLength attribute of the typeintlength()Return the length attribute of the typemaxValue()The maxValue of the typeminValue()The minValue of the typeThe nullValue of the typeReturn the primitiveType attribute of the typetoString()valueRef()Get the value of the valueRef attribute.voidvariableLength(boolean variableLength) Set if the type is variable length or not.Methods inherited from class uk.co.real_logic.sbe.xml.Type
deprecated, description, name, offsetAttribute, offsetAttribute, packageName, presence, referencedName, semanticType, sinceVersion, sinceVersion
-
Field Details
-
ENCODED_DATA_TYPE
SBE schema type.- See Also:
-
-
Constructor Details
-
EncodedDataType
Construct a new encodedDataType from XML Schema.- Parameters:
node- from the XML Schema Parsing
-
EncodedDataType
Construct a new encodedDataType from XML Schema.- Parameters:
node- from the XML Schema Parsing.givenName- for this node.referencedName- of the type when created from a ref in a composite.
-
EncodedDataType
public EncodedDataType(String name, Presence presence, String description, String semanticType, PrimitiveType primitiveType, int length, boolean varLen) Construct a new EncodedDataType with direct values. Does not handle constant values.- Parameters:
name- of the type.presence- of the type.description- of the type or null.semanticType- of the type or null.primitiveType- of the EncodedDataType.length- of the EncodedDataType.varLen- of the EncodedDataType.
-
EncodedDataType
public EncodedDataType(String name, String packageName, Presence presence, String description, String semanticType, PrimitiveType primitiveType, int length, boolean varLen) Construct a new EncodedDataType with direct values. Does not handle constant values.- Parameters:
name- of the type.packageName- of the type.presence- of the type.description- of the type or null.semanticType- of the type or null.primitiveType- of the EncodedDataType.length- of the EncodedDataType.varLen- of the EncodedDataType.
-
-
Method Details
-
length
public int length()Return the length attribute of the type- Returns:
- length attribute of the type
-
isVariableLength
public boolean isVariableLength()Return the variableLength attribute of the type- Specified by:
isVariableLengthin classType- Returns:
- variableLength boolean of the type
-
variableLength
public void variableLength(boolean variableLength) Set if the type is variable length or not.- Parameters:
variableLength- true if variable length.
-
primitiveType
Return the primitiveType attribute of the type- Returns:
- primitiveType attribute of the type
-
encodedLength
public int encodedLength()The encodedLength (in octets) of the encoding as length of the primitiveType times its count.- Specified by:
encodedLengthin classType- Returns:
- encodedLength of the encoding
-
constVal
The constant value of the type if specified- Returns:
- value of the constant for this type
-
minValue
The minValue of the type- Returns:
- value of the minValue
-
maxValue
The maxValue of the type- Returns:
- value of the maxValue
-
nullValue
The nullValue of the type- Returns:
- value of the nullValue primitiveType or type
-
characterEncoding
The character encoding of the type- Returns:
- value representing the encoding
-
valueRef
Get the value of the valueRef attribute.- Returns:
- the value of the valueRef attribute.
-
toString
-