com.googlecode.fascinator.common.JsonObject.putAll()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中com.googlecode.fascinator.common.JsonObject.putAll()方法的一些代码示例,展示了JsonObject.putAll()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JsonObject.putAll()方法的具体详情如下:
包路径:com.googlecode.fascinator.common.JsonObject
类名称:JsonObject
方法名:putAll

JsonObject.putAll介绍

暂无

代码示例

代码示例来源:origin: com.googlecode.the-fascinator.plugins/plugin-harvester-csv

/**
   * Merge the newly processed data with an (possible) existing data already
   * present, also convert the completed JSON merge into a Stream for storage.
   *
   * @param dataJson an instantiated JSON object containing data to store
   * @param metaJson an instantiated JSON object containing metadata to store
   * @param existing an instantiated JsonSimple object with any existing data
   * @throws IOException if any character encoding issues effect the Stream
   */
  private InputStream streamMergedJson(JsonObject dataJson,
      JsonObject metaJson, JsonSimple existing) throws IOException {
    // Overwrite and/or create only nodes we consider new data
    existing.getJsonObject().put("recordIDPrefix", idPrefix);
    JsonObject existingData = existing.writeObject("data");
    existingData.putAll(dataJson);
    JsonObject existingMeta = existing.writeObject("metadata");
    existingMeta.putAll(metaJson);

    // Turn into a stream to return
    String jsonString = existing.toString(true);
    return IOUtils.toInputStream(jsonString, "UTF-8");
  }
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

/**
 * Generate orders for the list of normal transformers scheduled to execute
 * on the tool chain
 * 
 * @param message The incoming message, which contains the tool chain config
 * for this object
 * @param response The response to edit
 * @param oid The object to schedule for clearing
 */
private void scheduleTransformers(JsonSimple message, JsonSimple response) {
  String oid = message.getString(null, "oid");
  List<String> list = message.getStringList(
      "transformer", "metadata");
  if (list != null && !list.isEmpty()) {
    for (String id : list) {
      JsonObject order = newTransform(response, id, oid);
      // Add item config to message... if it exists
      JsonObject itemConfig = message.getObject(
          "transformerOverrides", id);
      if (itemConfig != null) {
        JsonObject config = (JsonObject) order.get("config");
        config.putAll(itemConfig);
      }
    }
  }
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

/**
 * Generate orders for the list of normal transformers scheduled to execute
 * on the tool chain
 * 
 * @param message
 *            The incoming message, which contains the tool chain config for
 *            this object
 * @param response
 *            The response to edit
 * @param oid
 *            The object to schedule for clearing
 */
private void scheduleTransformers(JsonSimple message, JsonSimple response) {
  String oid = message.getString(null, "oid");
  List<String> list = message.getStringList("transformer", "metadata");
  if (list != null && !list.isEmpty()) {
    for (String id : list) {
      JsonObject order = newTransform(response, id, oid);
      // Add item config to message... if it exists
      JsonObject itemConfig = message.getObject(
          "transformerOverrides", id);
      if (itemConfig != null) {
        JsonObject config = (JsonObject) order.get("config");
        config.putAll(itemConfig);
      }
    }
  }
}

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

"transformerOverrides", id);
if (overrides != null) {
  config.putAll(overrides);

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

"transformerOverrides", id);
if (overrides != null) {
  config.putAll(overrides);

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

audit.putAll(message.getJsonObject());
JsonObject order = newSubscription(response, oid);
JsonObject audit = (JsonObject) order.get("message");
audit.putAll(message.getJsonObject());

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

"transformerOverrides", id);
if (override != null) {
  config.putAll(override);

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-redbox

"transformerOverrides", id);
if (overrides != null) {
  config.putAll(overrides);

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

toMove.putAll(newMap);

代码示例来源:origin: com.googlecode.redbox-mint/plugin-transaction-curation-mint

audit.putAll(message.getJsonObject());
JsonObject order = newSubscription(response, oid);
JsonObject audit = (JsonObject) order.get("message");
audit.putAll(message.getJsonObject());

代码示例来源:origin: com.googlecode.the-fascinator/fascinator-common

toMove.putAll(newMap);

相关文章