public void checkForWellFormedGroupSizeEncoding ( final Node node ) { final EncodedDataType blockLengthType = ( EncodedDataType ) containedTypeByNameMap . get ( "blockLength" ) ; final EncodedDataType numInGroupType = ( EncodedDataType ) containedTypeByNameMap . get ( "numInGroup" ) ; if ( blockLengthType == null ) { XmlSchemaParser . handleError ( node , "composite for group encodedLength encoding must have \"blockLength\"" ) ; } else if ( ! isUnsigned ( blockLengthType . primitiveType ( ) ) ) { XmlSchemaParser . handleError ( node , "\"blockLength\" must be unsigned type" ) ; } else { if ( blockLengthType . primitiveType ( ) != UINT8 && blockLengthType . primitiveType ( ) != UINT16 ) { XmlSchemaParser . handleWarning ( node , "\"blockLength\" should be UINT8 or UINT16" ) ; } final PrimitiveValue blockLengthTypeMaxValue = blockLengthType . maxValue ( ) ; validateGroupMaxValue ( node , blockLengthType . primitiveType ( ) , blockLengthTypeMaxValue ) ; } if ( numInGroupType == null ) { XmlSchemaParser . handleError ( node , "composite for group encodedLength encoding must have \"numInGroup\"" ) ; } else if ( ! isUnsigned ( numInGroupType . primitiveType ( ) ) ) { XmlSchemaParser . handleWarning ( node , "\"numInGroup\" should be unsigned type" ) ; final PrimitiveValue numInGroupMinValue = numInGroupType . minValue ( ) ; if ( null == numInGroupMinValue ) { XmlSchemaParser . handleError ( node , "\"numInGroup\" minValue must be set for signed types" ) ; } else if ( numInGroupMinValue . longValue ( ) < 0 ) { XmlSchemaParser . handleError ( node , String . format ( "\"numInGroup\" minValue=%s must be greater than zero " + "for signed \"numInGroup\" types" , numInGroupMinValue ) ) ; } } else { if ( numInGroupType . primitiveType ( ) != UINT8 && numInGroupType . primitiveType ( ) != UINT16 ) { XmlSchemaParser . handleWarning ( node , "\"numInGroup\" should be UINT8 or UINT16" ) ; } final PrimitiveValue numInGroupMaxValue = numInGroupType . maxValue ( ) ; validateGroupMaxValue ( node , numInGroupType . primitiveType ( ) , numInGroupMaxValue ) ; final PrimitiveValue numInGroupMinValue = numInGroupType . minValue ( ) ; if ( null != numInGroupMinValue ) { final long max = numInGroupMaxValue != null ? numInGroupMaxValue . longValue ( ) : numInGroupType . primitiveType ( ) . maxValue ( ) . longValue ( ) ; if ( numInGroupMinValue . longValue ( ) > max ) { XmlSchemaParser . handleError ( node , String . format ( "\"numInGroup\" minValue=%s greater than maxValue=%d" , numInGroupMinValue , max ) ) ; } } } }
Check the composite for being a well formed group encodedLength encoding . This means that there are the fields blockLength and numInGroup present .