Configures the Parser implementation according the supplied configuration object.

@param {Object} payload Raw mesh description (buffers, params, materials) used to build one to many meshes.
494709
function ( payload ) {
		if ( payload.cmd === 'run' ) {

			var self = this.getParentScope();
			var callbacks = {
				callbackOnAssetAvailable: function ( payload ) {
					self.postMessage( payload );
				},
				callbackOnProgress: function ( text ) {
					if ( payload.logging.enabled && payload.logging.debug ) console.debug( 'WorkerRunner: progress: ' + text );
				}
			};

			// Parser is expected to be named as such
			var parser = new Parser();
			if ( typeof parser[ 'setLogging' ] === 'function' ) parser.setLogging( payload.logging.enabled, payload.logging.debug );
			this.applyProperties( parser, payload.params );
			this.applyProperties( parser, payload.materials );
			this.applyProperties( parser, callbacks );
			parser.workerScope = self;
			parser.parse( payload.data.input, payload.data.options );

			if ( payload.logging.enabled ) console.log( 'WorkerRunner: Run complete!' );

			callbacks.callbackOnAssetAvailable( {
				cmd: 'complete',
				msg: 'WorkerRunner completed run.'
			} );

		} else {

			console.error( 'WorkerRunner: Received unknown command: ' + payload.cmd );

		}
	}
358674
function handleMesh (mesh, gltf, ctx, renderer) {
  return mesh.primitives.map((primitive) => {
    const geometryCmp = renderer.geometry(
      handlePrimitive(primitive, gltf, ctx, renderer)
    )
    const materialCmp =
      primitive.material !== undefined
        ? renderer.material(
          handleMaterial(
            gltf.materials[primitive.material],
            gltf,
            ctx,
            renderer
          )
        )
        : renderer.material()

    const components = [
      geometryCmp,
      materialCmp
    ]

    // Create morph
    if (primitive.targets) {
      let sources = {}
      const targets = primitive.targets.reduce((targets, target) => {
        const targetKeys = Object.keys(target)

        targetKeys.forEach(targetKey => {
          const targetName = PEX_ATTRIBUTE_NAME_MAP[targetKey] || targetKey
          targets[targetName] = targets[targetName] || []

          const accessor = getAccessor(gltf.accessors[target[targetKey]], gltf.bufferViews)

          targets[targetName].push(accessor._data)

          if (!sources[targetName]) {
            const sourceAccessor = getAccessor(gltf.accessors[primitive.attributes[targetKey]], gltf.bufferViews)
            sources[targetName] = sourceAccessor._data
          }
        })
        return targets
      }, {})

      const morphCmp = renderer.morph({
        sources,
        targets,
        weights: mesh.weights
      })
      components.push(morphCmp)
    }

    return components
  })
}
1063058
function Parser(config) {
  if (!(this instanceof Parser)) return new Parser(config);

  this.config = config;

  this.config.on('read', function read(type) {
    this[type]();
  }.bind(this));
}
547607
private void configure(Object obj, XmlParser.Node cfg, int i) throws ClassNotFoundException,
            NoSuchMethodException, InvocationTargetException, IllegalAccessException
    {
        XmlParser.Node node = null;
        try
        {
            for (; i < cfg.size(); i++)
            {
                Object o = cfg.get(i);
                if (o instanceof String) continue;
                node = (XmlParser.Node) o;

                String tag = node.getTag();
                if ("Set".equals(tag))
                    set(obj, node);
                else if ("Put".equals(tag))
                    put(obj, node);
                else if ("Call".equals(tag))
                    call(obj, node);
                else if ("Get".equals(tag))
                    get(obj, node);
                else if ("New".equals(tag))
                    newObj(obj, node);
                else if ("Ref".equals(tag))
                    refObj(obj, node);
                else
                    throw new IllegalStateException("Unknown tag: " + tag);
            }
        }
        catch(InvocationTargetException e)
        {
            log.warn("Exception at "+node.toString(),e.getTargetException());
            throw e;
        }
        catch (Error e)
        {
            log.debug(node);
            throw e;
        }
        catch (Exception e)
        {
            log.debug(node);
            if (e instanceof NoSuchMethodException) throw (NoSuchMethodException) e;
            if (e instanceof InvocationTargetException) throw (InvocationTargetException) e;
            if (e instanceof IllegalAccessException) throw (IllegalAccessException) e;
            if (e instanceof RuntimeException) throw (RuntimeException) e;
        }
    }
1356785
function(payload) {
    console.log('parse',this.defaults)
    var toReturn = {};
    //todo: will be better to use regular expressions to avoid full witespaces strings
    toReturn.caption = payload.caption || ' -x- ';
    toReturn.name = payload.name || 'test-action';
    toReturn.icon = payload.icon || 'fa-icon';
    toReturn.status=payload.status || false;
    return toReturn;
  }
331911
@Override
    protected void configure() {
        // ***** Simulator content types *****
        Map<String, String> simulatorContentTypes = new HashMap<String, String>();
        simulatorContentTypes.put("application/json", "json");
        simulatorContentTypes.put("application/xml", "xml");
        simulatorContentTypes.put("application/soap+xml", "xml");
        simulatorContentTypes.put("text/xml", "xml");
        simulatorContentTypes.put("default", "txt");

        bind(new TypeLiteral<Map<String, String>>() {
        }).annotatedWith(Names.named("simulatorContentTypes")).toInstance(simulatorContentTypes);

        // ***** Accepts *****
        Map<String, String> accepts = new HashMap<String, String>();
        accepts.put("application/json", "json");
        accepts.put("default", "txt");

        bind(new TypeLiteral<Map<String, String>>() {
        }).annotatedWith(Names.named("accepts")).toInstance(accepts);
        
        // ***** Response content types *****
        Map<String, String> responseContentTypes = new HashMap<String, String>();
        responseContentTypes.put("json", "application/json");
        responseContentTypes.put("txt", "text/plain");
        responseContentTypes.put("xml", "application/xml");
        responseContentTypes.put("default", "text/plain");

        bind(new TypeLiteral<Map<String, String>>() {
        }).annotatedWith(Names.named("responseContentTypes")).toInstance(responseContentTypes);        
    }
1255487
function configureWrapper(name){
                        var _ = nvd3Utils.deepExtend(defaultWrapper(name), scope.options[name] || {});

                        if (scope._config.extended) scope.options[name] = _;

                        var wrapElement = angular.element('<div></div>').html(_['html'] || '')
                            .addClass(name).addClass(_.className)
                            .removeAttr('style')
                            .css(_.css);

                        if (!_['html']) wrapElement.text(_.text);

                        if (_.enable) {
                            if (name === 'title') element.prepend(wrapElement);
                            else if (name === 'subtitle') angular.element(element[0].querySelector('.title')).after(wrapElement);
                            else if (name === 'caption') element.append(wrapElement);
                        }
                    }
453397
function ( materials ) {
		var payload = {
			cmd: 'materialData',
			materials: {
				materialCloneInstructions: null,
				serializedMaterials: null,
				runtimeMaterials: this.validator.isValid( this.callbacks.onLoadMaterials ) ? this.callbacks.onLoadMaterials( materials ) : materials
			}
		};
		this.updateMaterials( payload );
	}
447895
function(raw_tag) {

		var container_config = {
				type: 'Element',
				tag_name: raw_tag.name
			};

		if ('attributes' in raw_tag) this._parseContainerStaticAttributes(container_config, raw_tag.attributes);
		if ('x' in raw_tag) this._parseContainerControlAttributes(container_config, raw_tag.x);

		return /** @type {_cElementContainer} */ container_config;

	}
694592
function parse(msg) {
  let model;
  if (typeof msg === 'object') {
    // data is a MessageEvent not a raw string
    msg = msg.data;
  }

  if (msg.startsWith(PullMessage.TYPE)) {
    // pull
    return new PullMessage();
  }

  if (msg.startsWith(RegisteredMessage.TYPE)) {
    // registered ack
    return new RegisteredMessage();
  }

  if (msg.startsWith(PushMessage.TYPE + '/')) {
    // push/modelStr
    model = msg.substring(PushMessage.TYPE.length + 1);
    return new PushMessage(model);
  }

  if (msg.startsWith(PushKevSMessage.TYPE + '/')) {
    // push/kevsStr
    model = msg.substring(PushKevSMessage.TYPE.length + 1);
    return new PushKevSMessage(model);
  }

  if (msg.startsWith(RegisterMessage.TYPE)) {
    // register/nodeName/modelStr
    const payload = msg.substring(RegisterMessage.TYPE.length + 1);
    let index = 0;
    let ch = payload.charAt(index);
    while (index < payload.length && ch !== '/') {
      index++;
      ch = payload[index];
    }
    const nodeName = payload.substring(0, index);
    return new RegisterMessage(nodeName, payload.substring(index + 1));
  }

  return null;
}
1065354
protected void setPayload(String payload) {
        MessageContentBuilder messageContentBuilder = getMessageContentBuilder();

        if (messageContentBuilder instanceof PayloadTemplateMessageBuilder) {
            ((PayloadTemplateMessageBuilder) messageContentBuilder).setPayloadData(payload);
        } else if (messageContentBuilder instanceof StaticMessageContentBuilder) {
            ((StaticMessageContentBuilder) messageContentBuilder).getMessage().setPayload(payload);
        } else {
            throw new CitrusRuntimeException("Unable to set payload on message builder type: " + messageContentBuilder.getClass());
        }
    }
428868
function
configure(options) {

  var config = {
    context: {},
    extension: '.html',
    verbose: false,
    renderString: false,
    piping: true
  };
  if (options === undefined || options === null)
    options = {};
  else
    options = cloneDeep(options);

  configureErrors(config, options);
  configureVerbosity(config, options);
  configureGlobals(config, options);
  configureLocals(config, options);
  configureContext(config, options);
  configureFiles(config, options);
  configureNunjucks(config, options);
  configurePluginOptions(config, options);

  return config;
}
679724
function fixEventPayload(events) {
    return new Promise(function (resolve, reject) {
        events.forEach(function(event) {
            try {
                event.payload = JSON.parse(event.payload);
            } catch (e) {
                console.log('Could not parse payload');
                return reject(new Error('Could not parse payload: ' + e.message));
            }
        });
        resolve();
    });
}
236664
@Override
	public void configure(SceneStructureProjective structure ,
						  SceneObservations observations )
	{
		this.structure = structure;
		this.observations = observations;

		numObservations = observations.getObservationCount();
		numParameters = structure.getParameterCount();
	}
1143391
function TriggerRequestPayload(payload) {
  TriggerRequestPayload.super_.call(this, payload);

  this.payload = _.defaults(this.payload || {}, {
    limit: 50
  });
}
683874
@Override
    protected void configure() {

        install(new com.englishtown.promises.hk2.WhenBinder());

        bind(VertxExecutor.class).to(Executor.class).in(Singleton.class).ranked(10);

        bind(DefaultWhenVertx.class).to(WhenVertx.class).in(Singleton.class);
        bind(DefaultWhenEventBus.class).to(WhenEventBus.class).in(Singleton.class);
        bind(DefaultWhenHttpClient.class).to(WhenHttpClient.class).in(Singleton.class);
        bind(DefaultWhenFileSystem.class).to(WhenFileSystem.class).in(Singleton.class);
        bind(DefaultPromiseAdapter.class).to(PromiseAdapter.class).in(Singleton.class);

    }
142486
public void setPayload(java.util.Map<String, java.util.List<String>> payload) {
        this.payload = payload;
    }