private BytesRef computePayloadFromMappingPayload(MtasParserObject object,
      List<Map<String, String>> mappingPayloads,
      Map<String, List<MtasParserObject>> currentList)
      throws MtasParserException {
    BytesRef payload = null;
    for (Map<String, String> mappingPayload : mappingPayloads) {
      if (mappingPayload.get(MAPPING_VALUE_SOURCE)
          .equals(MtasParserMapping.SOURCE_STRING)) {
        if (mappingPayload.get(MAPPING_VALUE_TYPE)
            .equals(MtasParserMapping.PARSER_TYPE_STRING)
            && mappingPayload.get(MAPPING_VALUE_TEXT) != null) {
          BytesRef subpayload = computeMaximumFilteredPayload(
              mappingPayload.get(MAPPING_VALUE_TEXT), payload, null);
          payload = (subpayload != null) ? subpayload : payload;
        }
        // from objects
      } else {
        MtasParserObject[] checkObjects = computeObjectFromMappingValue(object,
            mappingPayload, currentList);
        // do checks and updates
        if (checkObjects != null) {
          // payload from attribute
          if (mappingPayload.get("type")
              .equals(MtasParserMapping.PARSER_TYPE_ATTRIBUTE)) {
            BytesRef subpayload = computeMaximumFilteredPayload(
                checkObjects[0].getAttribute(mappingPayload.get("name")),
                payload, mappingPayload.get(MAPPING_VALUE_FILTER));
            payload = (subpayload != null) ? subpayload : payload;
            // payload from text
          } else if (mappingPayload.get("type")
              .equals(MtasParserMapping.PARSER_TYPE_TEXT)) {
            BytesRef subpayload = computeMaximumFilteredPayload(
                object.getText(), payload,
                mappingPayload.get(MAPPING_VALUE_FILTER));
            payload = (subpayload != null) ? subpayload : payload;
          }
        }
      }
    }
    return payload;
  }
private BytesRef computePayloadFromMappingPayload ( MtasParserObject object , List < Map < String , String > > mappingPayloads , Map < String , List < MtasParserObject > > currentList ) throws MtasParserException { BytesRef payload = null ; for ( Map < String , String > mappingPayload : mappingPayloads ) { if ( mappingPayload . get ( MAPPING_VALUE_SOURCE ) . equals ( MtasParserMapping . SOURCE_STRING ) ) { if ( mappingPayload . get ( MAPPING_VALUE_TYPE ) . equals ( MtasParserMapping . PARSER_TYPE_STRING ) && mappingPayload . get ( MAPPING_VALUE_TEXT ) != null ) { BytesRef subpayload = computeMaximumFilteredPayload ( mappingPayload . get ( MAPPING_VALUE_TEXT ) , payload , null ) ; payload = ( subpayload != null ) ? subpayload : payload ; } } else { MtasParserObject [ ] checkObjects = computeObjectFromMappingValue ( object , mappingPayload , currentList ) ; if ( checkObjects != null ) { if ( mappingPayload . get ( "type" ) . equals ( MtasParserMapping . PARSER_TYPE_ATTRIBUTE ) ) { BytesRef subpayload = computeMaximumFilteredPayload ( checkObjects [ 0 ] . getAttribute ( mappingPayload . get ( "name" ) ) , payload , mappingPayload . get ( MAPPING_VALUE_FILTER ) ) ; payload = ( subpayload != null ) ? subpayload : payload ; } else if ( mappingPayload . get ( "type" ) . equals ( MtasParserMapping . PARSER_TYPE_TEXT ) ) { BytesRef subpayload = computeMaximumFilteredPayload ( object . getText ( ) , payload , mappingPayload . get ( MAPPING_VALUE_FILTER ) ) ; payload = ( subpayload != null ) ? subpayload : payload ; } } } } return payload ; }
Compute payload from mapping payload.

@param object the object
@param mappingPayloads the mapping payloads
@param currentList the current list
@return the bytes ref
@throws MtasParserException the mtas parser exception