/** * Construct a new message from XML Schema. * * @param messageNode from the XML Schema Parsing * @param typeByNameMap holding type information for message * @throws XPathExpressionException on invalid XPath */ public Message(final Node messageNode, final Map<String, Type> typeByNameMap) throws XPathExpressionException { id = Integer.parseInt(getAttributeValue(messageNode, "id")); // required name = getAttributeValue(messageNode, "name"); // required description = getAttributeValueOrNull(messageNode, "description"); // optional blockLength = Integer.parseInt(getAttributeValue(messageNode, "blockLength", "0")); // 0 means not set sinceVersion = Integer.parseInt(getAttributeValue(messageNode, "sinceVersion", "0")); deprecated = Integer.parseInt(getAttributeValue(messageNode, "deprecated", "0")); semanticType = getAttributeValueOrNull(messageNode, "semanticType"); // optional this.typeByNameMap = typeByNameMap; fieldList = parseMembers(messageNode); computeAndValidateOffsets(messageNode, fieldList, blockLength); computedBlockLength = computeMessageRootBlockLength(fieldList); validateBlockLength(messageNode, blockLength, computedBlockLength); }
validateBlockLength(node, field.blockLength(), groupBlockLength); field.computedBlockLength(Math.max(field.blockLength(), groupBlockLength));
/** * Construct a new message from XML Schema. * * @param messageNode from the XML Schema Parsing * @param typeByNameMap holding type information for message * @throws XPathExpressionException on invalid XPath */ public Message(final Node messageNode, final Map<String, Type> typeByNameMap) throws XPathExpressionException { id = Integer.parseInt(getAttributeValue(messageNode, "id")); // required name = getAttributeValue(messageNode, "name"); // required description = getAttributeValueOrNull(messageNode, "description"); // optional blockLength = Integer.parseInt(getAttributeValue(messageNode, "blockLength", "0")); // 0 means not set sinceVersion = Integer.parseInt(getAttributeValue(messageNode, "sinceVersion", "0")); deprecated = Integer.parseInt(getAttributeValue(messageNode, "deprecated", "0")); semanticType = getAttributeValueOrNull(messageNode, "semanticType"); // optional this.typeByNameMap = typeByNameMap; fieldList = parseMembers(messageNode); computeAndValidateOffsets(messageNode, fieldList, blockLength); computedBlockLength = computeMessageRootBlockLength(fieldList); validateBlockLength(messageNode, blockLength, computedBlockLength); }
/** * Construct a new message from XML Schema. * * @param messageNode from the XML Schema Parsing * @param typeByNameMap holding type information for message * @throws XPathExpressionException on invalid XPath */ public Message(final Node messageNode, final Map<String, Type> typeByNameMap) throws XPathExpressionException { id = Integer.parseInt(getAttributeValue(messageNode, "id")); // required name = getAttributeValue(messageNode, "name"); // required description = getAttributeValueOrNull(messageNode, "description"); // optional blockLength = Integer.parseInt(getAttributeValue(messageNode, "blockLength", "0")); // 0 means not set sinceVersion = Integer.parseInt(getAttributeValue(messageNode, "sinceVersion", "0")); deprecated = Integer.parseInt(getAttributeValue(messageNode, "deprecated", "0")); semanticType = getAttributeValueOrNull(messageNode, "semanticType"); // optional this.typeByNameMap = typeByNameMap; fieldList = parseMembers(messageNode); computeAndValidateOffsets(messageNode, fieldList, blockLength); computedBlockLength = computeMessageRootBlockLength(fieldList); validateBlockLength(messageNode, blockLength, computedBlockLength); }
/** * Construct a new message from XML Schema. * * @param messageNode from the XML Schema Parsing * @param typeByNameMap holding type information for message * @throws XPathExpressionException on invalid XPath */ public Message(final Node messageNode, final Map<String, Type> typeByNameMap) throws XPathExpressionException { id = Integer.parseInt(getAttributeValue(messageNode, "id")); // required name = getAttributeValue(messageNode, "name"); // required description = getAttributeValueOrNull(messageNode, "description"); // optional blockLength = Integer.parseInt(getAttributeValue(messageNode, "blockLength", "0")); // 0 means not set semanticType = getAttributeValueOrNull(messageNode, "semanticType"); // optional headerType = getAttributeValue(messageNode, "headerType", "messageHeader"); // has default this.typeByNameMap = typeByNameMap; fieldList = parseFieldsAndGroups(messageNode); computeAndValidateOffsets(messageNode, fieldList, blockLength); computedBlockLength = computeMessageRootBlockLength(); validateBlockLength(messageNode, blockLength, computedBlockLength); }
validateBlockLength(node, field.blockLength(), groupBlockLength); field.computedBlockLength(Math.max(field.blockLength(), groupBlockLength));
validateBlockLength(node, field.blockLength(), groupBlockLength); field.computedBlockLength(Math.max(field.blockLength(), groupBlockLength));
validateBlockLength(node, field.blockLength(), groupBlockLength); field.computedBlockLength(Math.max(field.blockLength(), groupBlockLength));