Class EncodedDataType

java.lang.Object
uk.co.real_logic.sbe.xml.Type
uk.co.real_logic.sbe.xml.EncodedDataType

public class EncodedDataType extends Type
SBE simple encoded data type.
  • Field Details

  • Constructor Details

    • EncodedDataType

      public EncodedDataType(Node node)
      Construct a new encodedDataType from XML Schema.
      Parameters:
      node - from the XML Schema Parsing
    • EncodedDataType

      public EncodedDataType(Node node, String givenName, String referencedName)
      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:
      isVariableLength in class Type
      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

      public PrimitiveType 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:
      encodedLength in class Type
      Returns:
      encodedLength of the encoding
    • constVal

      public PrimitiveValue constVal()
      The constant value of the type if specified
      Returns:
      value of the constant for this type
    • minValue

      public PrimitiveValue minValue()
      The minValue of the type
      Returns:
      value of the minValue
    • maxValue

      public PrimitiveValue maxValue()
      The maxValue of the type
      Returns:
      value of the maxValue
    • nullValue

      public PrimitiveValue nullValue()
      The nullValue of the type
      Returns:
      value of the nullValue primitiveType or type
    • characterEncoding

      public String characterEncoding()
      The character encoding of the type
      Returns:
      value representing the encoding
    • valueRef

      public String valueRef()
      Get the value of the valueRef attribute.
      Returns:
      the value of the valueRef attribute.
    • toString

      public String toString()
      Overrides:
      toString in class Object