Package org.codehaus.jackson.map

Examples of org.codehaus.jackson.map.ObjectMapper.createObjectNode()


    String basemap = rootNode.path("basemap").getTextValue();
    String bbox = rootNode.path("extent").getTextValue();
    String username = rootNode.path("username").getTextValue();
    String password = rootNode.path("password").getTextValue();
   
    ObjectNode responseJson = mapper.createObjectNode();
    //response json format
    //{"status": "", "message": "", mapUrl: "", "layers": []}
    //status  where in the process
    //statusMessage text
    //mapUrl:
View Full Code Here


    public ObjectNode toJson() {

  ObjectMapper om = new ObjectMapper();

  ObjectNode root = om.createObjectNode();

  root.put(JSON_ID, getIdentifier());
  root.put(JSON_IS_MULTIPLE, isMultiple());
  root.put(JSON_COMP_REF_NAME, getComponent().getName());
  root.put(JSON_PROVIDER_URL, providerURL);
View Full Code Here

  root.put(JSON_ID, getIdentifier());
  root.put(JSON_IS_MULTIPLE, isMultiple());
  root.put(JSON_COMP_REF_NAME, getComponent().getName());
  root.put(JSON_PROVIDER_URL, providerURL);

  ObjectNode json_rr = om.createObjectNode();

  json_rr.put(JSON_RESOLVABLE_REF_NAME, getTarget().getName());

  // Set RRTYPE
  if (getTarget() instanceof InterfaceReference) {
View Full Code Here

    private String toJson(EndpointRegistration registration)
      throws JsonGenerationException, JsonMappingException, IOException {

  ObjectMapper root = new ObjectMapper();

  ObjectNode node = root.createObjectNode();

  ObjectNode nodeendpoint = root.createObjectNode();

  for (Map.Entry<String, String> entry : registration.getEndpoint()
    .entrySet()) {
View Full Code Here

  ObjectMapper root = new ObjectMapper();

  ObjectNode node = root.createObjectNode();

  ObjectNode nodeendpoint = root.createObjectNode();

  for (Map.Entry<String, String> entry : registration.getEndpoint()
    .entrySet()) {
      nodeendpoint.put(entry.getKey(), entry.getValue());
  }
View Full Code Here

  node.put("endpoint_entry", nodeendpoint);
  node.put("protocol", registration.getProtocol());
  node.put("instance_name", registration.getInstance().getName());

  ObjectNode constraints = root.createObjectNode();

  // @distriman: add contraints

  for (Map.Entry<String, String> entry : registration.getInstance()
    .getAllPropertiesString().entrySet()) {
View Full Code Here

                JsonNode keyNode = result.get(key);
                JsonNode valNode = keyNode.get(val);

                // clone the original content
                ObjectMapper tmpMapper = new ObjectMapper();
                JsonNode tmp = tmpMapper.createObjectNode();
                ((ObjectNode) tmp).putAll(((ObjectNode) content));

                // replace the result with the sub-content
                ((ObjectNode) tmp).put("result", valNode);
View Full Code Here

    //log.setLevel(Level.ALL);
    //log.info("testinfo");
    //log.warning("testwarning");
    AppEngineDriver a = new AppEngineDriver();
    ObjectMapper mapper = new ObjectMapper();
    JsonNode rootNode = mapper.createObjectNode(); // will be of type ObjectNode
    ArrayNode records = ((ObjectNode)rootNode).putArray("Shelters");
    try {
      Connection conn = null;
      DriverManager.registerDriver(a);
      conn = DriverManager.getConnection("jdbc:google:rdbms://pcni.org:openhmis:openciss/compass");
View Full Code Here

      Statement st = conn.createStatement();
      ResultSet rs = st.executeQuery("SELECT program_key, program_name FROM compass.program_profile_info WHERE program_type_code='1';");
      int i = 0;
      while (rs.next()) {
        //System.out.println(rs.getString("program_key") + "," + rs.getString("program_name"));       
        JsonNode recordNode = mapper.createObjectNode(); // will be of type ObjectNode
        ((ObjectNode)recordNode).put("ProgramKey", rs.getString("program_key"));
        ((ObjectNode)recordNode).put("ProgramName", rs.getString("program_name"));
        records.insert(i++, recordNode);
      }
   
View Full Code Here

    // one or more matching JSON records
    //System.out.println("In existence search, we got first name: " + firstName + ", last name:" + lastName);
    BloomFilter b = new BloomCache().getCachedBloomFilter();
    b.populate();
    ObjectMapper mapper = new ObjectMapper();
    JsonNode rootNode = mapper.createObjectNode(); // will be of type ObjectNode
    //JsonNode responseNode = mapper.createObjectNode(); // will be of type ObjectNode

    if (b.test(firstName+lastName)) { // that is, if it was found in the bloom filter
        ((ObjectNode)rootNode).put("Exists", true);
    } else {((ObjectNode)rootNode).put("Exists", false);}
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.