public MessageSchema( final Node schemaNode, final Map<String, Type> typeByNameMap, final Map<Long, Message> messageByIdMap) { this.packageName = getAttributeValue(schemaNode, "package"); this.description = getAttributeValueOrNull(schemaNode, "description"); this.id = Integer.parseInt(getAttributeValue(schemaNode, "id")); this.version = Integer.parseInt(getAttributeValue(schemaNode, "version", "0")); this.semanticVersion = getAttributeValueOrNull(schemaNode, "semanticVersion"); this.byteOrder = getByteOrder(getAttributeValue(schemaNode, "byteOrder", "littleEndian")); this.typeByNameMap = typeByNameMap; this.messageByIdMap = messageByIdMap; final String headerType = getAttributeValueOrNull(schemaNode, "headerType"); this.headerType = null == headerType ? HEADER_TYPE_DEFAULT : headerType; Verify.present(typeByNameMap, this.headerType, "Message header"); ((CompositeType)typeByNameMap.get(this.headerType)).checkForWellFormedMessageHeader(schemaNode); }
public MessageSchema( final Node schemaNode, final Map<String, Type> typeByNameMap, final Map<Long, Message> messageByIdMap) { this.packageName = getAttributeValue(schemaNode, "package"); this.description = getAttributeValueOrNull(schemaNode, "description"); this.id = Integer.parseInt(getAttributeValue(schemaNode, "id")); this.version = Integer.parseInt(getAttributeValue(schemaNode, "version", "0")); this.semanticVersion = getAttributeValueOrNull(schemaNode, "semanticVersion"); this.byteOrder = getByteOrder(getAttributeValue(schemaNode, "byteOrder", "littleEndian")); this.typeByNameMap = typeByNameMap; this.messageByIdMap = messageByIdMap; final String headerType = getAttributeValueOrNull(schemaNode, "headerType"); this.headerType = null == headerType ? HEADER_TYPE_DEFAULT : headerType; Verify.present(typeByNameMap, this.headerType, "Message header"); ((CompositeType)typeByNameMap.get(this.headerType)).checkForWellFormedMessageHeader(schemaNode); }
public MessageSchema( final Node schemaNode, final Map<String, Type> typeByNameMap, final Map<Long, Message> messageByIdMap) { this.packageName = getAttributeValue(schemaNode, "package"); this.description = getAttributeValueOrNull(schemaNode, "description"); this.id = Integer.parseInt(getAttributeValue(schemaNode, "id")); this.version = Integer.parseInt(getAttributeValue(schemaNode, "version", "0")); this.semanticVersion = getAttributeValueOrNull(schemaNode, "semanticVersion"); this.byteOrder = getByteOrder(getAttributeValue(schemaNode, "byteOrder", "littleEndian")); this.typeByNameMap = typeByNameMap; this.messageByIdMap = messageByIdMap; final String headerType = getAttributeValueOrNull(schemaNode, "headerType"); this.headerType = null == headerType ? HEADER_TYPE_DEFAULT : headerType; Verify.present(typeByNameMap, this.headerType, "Message header"); ((CompositeType)typeByNameMap.get(this.headerType)).checkForWellFormedMessageHeader(schemaNode); }
public MessageSchema( final Node schemaNode, final Map<String, Type> typeByNameMap, final Map<Long, Message> messageByIdMap) { this.packageName = getAttributeValue(schemaNode, "package"); this.description = getAttributeValueOrNull(schemaNode, "description"); this.id = Integer.parseInt(getAttributeValue(schemaNode, "id")); this.version = Integer.parseInt(getAttributeValue(schemaNode, "version", "0")); this.semanticVersion = getAttributeValueOrNull(schemaNode, "semanticVersion"); this.byteOrder = getByteOrder(getAttributeValue(schemaNode, "byteOrder", "littleEndian")); this.typeByNameMap = typeByNameMap; this.messageByIdMap = messageByIdMap; final String headerType = getAttributeValueOrNull(schemaNode, "headerType"); this.headerType = null == headerType ? HEADER_TYPE_DEFAULT : headerType; Verify.present(typeByNameMap, this.headerType, "Message header"); ((CompositeType)typeByNameMap.get(this.headerType)).checkForWellFormedMessageHeader(schemaNode); }