private void processOperandValue ( int index , FieldType type , GraphicalIndicatorCriteria criteria ) { boolean valueFlag = ( MPPUtility . getInt ( m_data , m_dataOffset ) == 1 ) ; m_dataOffset += 4 ; if ( valueFlag == false ) { int fieldID = MPPUtility . getInt ( m_data , m_dataOffset ) ; criteria . setRightValue ( index , FieldTypeHelper . getInstance ( fieldID ) ) ; m_dataOffset += 4 ; } else { //int dataTypeValue = MPPUtility.getShort(m_data, m_dataOffset); m_dataOffset += 2 ; switch ( type . getDataType ( ) ) { case DURATION : // 0x03 { Duration value = MPPUtility . getAdjustedDuration ( m_properties , MPPUtility . getInt ( m_data , m_dataOffset ) , MPPUtility . getDurationTimeUnits ( MPPUtility . getShort ( m_data , m_dataOffset + 4 ) ) ) ; m_dataOffset += 6 ; criteria . setRightValue ( index , value ) ; break ; } case NUMERIC : // 0x05 { Double value = Double . valueOf ( MPPUtility . getDouble ( m_data , m_dataOffset ) ) ; m_dataOffset += 8 ; criteria . setRightValue ( index , value ) ; break ; } case CURRENCY : // 0x06 { Double value = Double . valueOf ( MPPUtility . getDouble ( m_data , m_dataOffset ) / 100 ) ; m_dataOffset += 8 ; criteria . setRightValue ( index , value ) ; break ; } case STRING : // 0x08 { String value = MPPUtility . getUnicodeString ( m_data , m_dataOffset ) ; m_dataOffset += ( ( value . length ( ) + 1 ) * 2 ) ; criteria . setRightValue ( index , value ) ; break ; } case BOOLEAN : // 0x0B { int value = MPPUtility . getShort ( m_data , m_dataOffset ) ; m_dataOffset += 2 ; criteria . setRightValue ( index , value == 1 ? Boolean . TRUE : Boolean . FALSE ) ; break ; } case DATE : // 0x13 { Date value = MPPUtility . getTimestamp ( m_data , m_dataOffset ) ; m_dataOffset += 4 ; criteria . setRightValue ( index , value ) ; break ; } default : { break ; } } } }
Process an operand value used in the definition of the graphical indicator criteria .