Examples of createObjectNode()


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

    //suggest
    //Global suggest object
    ObjectNode suggestObj = mapper.createObjectNode();
       
    //type suggest (autocomplete)
    ObjectNode typeSuggestObj = mapper.createObjectNode();
    typeSuggestObj.put("service_url", baseServiceUrl);
    typeSuggestObj.put("service_path", "/suggest/type");
    typeSuggestObj.put("flyout_service_url", baseServiceUrl);
    typeSuggestObj.put("flyout_service_path" , "/suggest/type/preview");
     
View Full Code Here

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

    typeSuggestObj.put("flyout_service_path" , "/suggest/type/preview");
     
    suggestObj.put("type", typeSuggestObj);
   
    //property suggest (autocomplete)
    ObjectNode propertySuggestObj = mapper.createObjectNode();
    propertySuggestObj.put("service_url", baseServiceUrl);
    propertySuggestObj.put("service_path", "/suggest/property");
    propertySuggestObj.put("flyout_service_url", baseServiceUrl);
    propertySuggestObj.put("flyout_service_path" , "/suggest/property/preview");
     
View Full Code Here

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

    propertySuggestObj.put("flyout_service_path" , "/suggest/property/preview");
     
    suggestObj.put("property", propertySuggestObj);
   
    //entity search
    ObjectNode entitySearchObj = mapper.createObjectNode();
    entitySearchObj.put("service_url", baseServiceUrl);
    entitySearchObj.put("service_path", "/suggest/entity");
    entitySearchObj.put("flyout_service_url", baseServiceUrl);
    entitySearchObj.put("flyout_service_path" , "/suggest/entity/preview");
     
View Full Code Here

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

  }
 
  @Override
  public ObjectNode getMultipleResponse(ImmutableMap<String,ReconciliationResponse> multiResponse, PrefixManager prefixManager) {
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode multiResponseObj = mapper.createObjectNode();
    for(Entry<String, ReconciliationResponse> entry: multiResponse.entrySet()){
      String key = entry.getKey();
      ReconciliationResponse response  = entry.getValue();
      multiResponseObj.put(key, getResponse(response,prefixManager));
    }
View Full Code Here

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

 
  @Override
  public ObjectNode jsonizeSearchResult(ImmutableList<SearchResultItem> results, String prefix) throws JsonGenerationException, JsonMappingException, IOException{

    ObjectMapper mapper = new ObjectMapper();
    ObjectNode resultObj = mapper.createObjectNode();
    resultObj.put("code", "/api/status/ok");
    resultObj.put("status", "200 OK");
    resultObj.put("prefix", prefix);
   
    ArrayNode resultArr = mapper.createArrayNode();
View Full Code Here

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

    resultObj.put("status", "200 OK");
    resultObj.put("prefix", prefix);
   
    ArrayNode resultArr = mapper.createArrayNode();
    for(SearchResultItem item: results){
      ObjectNode resultItemObj = mapper.createObjectNode();
      resultItemObj.put("id", item.getId());
      resultItemObj.put("name", item.getName());
     
      //FIXME id is used instead of type to enable the suggest autocomplete to function as it doesn't work when no type is given
      ObjectNode tmpObj = mapper.createObjectNode();
View Full Code Here

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

      ObjectNode resultItemObj = mapper.createObjectNode();
      resultItemObj.put("id", item.getId());
      resultItemObj.put("name", item.getName());
     
      //FIXME id is used instead of type to enable the suggest autocomplete to function as it doesn't work when no type is given
      ObjectNode tmpObj = mapper.createObjectNode();
      tmpObj.put("id", item.getId());
      tmpObj.put("name", item.getId());
      resultItemObj.put("type", tmpObj);     
     
      resultArr.add(resultItemObj);
View Full Code Here

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

  }
 
  @Override
  public ObjectNode jsonizeHtml(String html, String id){
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode resultObj = mapper.createObjectNode();
    resultObj.put("html",html);
    resultObj.put("id", id);
   
   
   
View Full Code Here

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

        }
  }
 
  private ObjectNode getResponse(ReconciliationResponse response, PrefixManager prefixManager) {
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode responseObj = mapper.createObjectNode();
    ArrayNode resultArr = mapper.createArrayNode();
    for(ReconciliationCandidate result:response.getResults()){
      ObjectNode resultItemObj = getResultItem(result,prefixManager);
      resultArr.add(resultItemObj);
    }
View Full Code Here

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

    return responseObj;
  }
 
  private ObjectNode getResultItem(ReconciliationCandidate item, PrefixManager prefixManager){
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode resultItemObj = mapper.createObjectNode();
    resultItemObj.put("id", item.getId());
    resultItemObj.put("name", item.getName());
    resultItemObj.put("score", item.getScore());
    resultItemObj.put("match", item.isMatch());
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.