Examples of addToMetadata()


Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

    newDoc.setCreated(new Date());
    newDoc.setModified(new Date());
    newDoc.setPublishedDate(new Date());
    newDoc.setId(queryId);
    newDoc.setMediaType("Social");
    newDoc.addToMetadata("query", _query);
    newDoc.setSourceKey("test1");
    newDoc.setCommunityId(new ObjectId(_savedCommIdStrs[0]));
    if (null != topDoc) {
      newDoc.setScore(topDoc.getDouble(DocumentPojo.score_, 100.0));
      newDoc.setAggregateSignif(topDoc.getDouble(DocumentPojo.aggregateSignif_, 100.0));
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

                      rec = json.getJSONObject(names);
                      doc.addToMetadata(names, convertJsonObjectToLinkedHashMap(rec));
                    } catch (JSONException e2) {
                      try {
                        Object[] val = {json.getString(names)};
                        doc.addToMetadata(names,val);
                      } catch (JSONException e1) {
                        e1.printStackTrace();
                      }
                    }
                  }
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

            }
          }
          if ((null != primaryKey) && (null != source.getFileConfig().XmlSourceName)) {
            newDoc.setUrl(source.getFileConfig().XmlSourceName + primaryKey);
          }//TESTED
          newDoc.addToMetadata("csv", JsonToMetadataParser.convertJsonObjectToLinkedHashMap(json, _memUsage));         
        }
        catch (Exception e) {} // can just skip over the line and carry on
       
      }//TESTED
     
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

        if (  (column != null) && (value != null) )
        {
          if (!source.getDatabaseConfig().getPreserveCase()) {
            column = column.toLowerCase();
          }
          doc.addToMetadata(column, value);
        }
          }     
    }
    catch (SQLException e)
    {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

      // ...And add metadata back again...
      if (null != tmp) {
        JsonObject tmpMeta = tmp.getAsJsonObject();
        for (Entry<String, JsonElement> entry: tmpMeta.entrySet()) {
          if (entry.getValue().isJsonArray()) {
            doc.addToMetadata(entry.getKey(), MongoDbUtil.encodeArray(entry.getValue().getAsJsonArray()));
          }
          else {
            BasicDBList dbl = new BasicDBList();
            dbl.add(MongoDbUtil.encodeUnknown(entry.getValue()));
            doc.addToMetadata(entry.getKey(), dbl);
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

            doc.addToMetadata(entry.getKey(), MongoDbUtil.encodeArray(entry.getValue().getAsJsonArray()));
          }
          else {
            BasicDBList dbl = new BasicDBList();
            dbl.add(MongoDbUtil.encodeUnknown(entry.getValue()));
            doc.addToMetadata(entry.getKey(), dbl);
          }
        }//TOTEST       
      }
     
      // Finally handle updateId/_id swap
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.document.DocumentPojo.addToMetadata()

      "'test_null1': {}, test_null2: null"+
      "}";
   
    BasicDBObject metadataObj = (BasicDBObject) com.mongodb.util.JSON.parse(metadataObjStr);
   
    doc.addToMetadata("TestMeta", metadataObj);
    System.out.println("DOC_META=" + docMap.extendBuilder(BaseApiPojo.getDefaultBuilder()).setPrettyPrinting().create().toJson(doc));
   
// Changes to new ElasticSearch construct (particularly for bulk add)
   
    ElasticSearchManager indexManager = IndexManager.createIndex("test", null, false, null, null, ImmutableSettings.settingsBuilder());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.