Package org.codehaus.jackson

Examples of org.codehaus.jackson.JsonNode.path()


          String arrayOperators = currentToken.substring(indexOfLeftSquareBracket);
          StringTokenizer arrayOpsTokenizer = new StringTokenizer(arrayOperators,ARRAY_RIGHT);
          while(arrayOpsTokenizer.hasMoreTokens()) {
            if (!tempNode.isMissingNode() && tempNode.isArray()) {
              String currentArrayOperator = arrayOpsTokenizer.nextToken();
              tempNode = tempNode.path(Integer.parseInt(currentArrayOperator.substring(1)));
            }
          }
        } else { // LSB first character
          String arrayOperators = currentToken.substring(indexOfLeftSquareBracket);
          StringTokenizer arrayOpsTokenizer = new StringTokenizer(arrayOperators,ARRAY_RIGHT);
View Full Code Here


          String arrayOperators = currentToken.substring(indexOfLeftSquareBracket);
          StringTokenizer arrayOpsTokenizer = new StringTokenizer(arrayOperators,ARRAY_RIGHT);
          while(arrayOpsTokenizer.hasMoreTokens()) {
            if (!tempNode.isMissingNode() && tempNode.isArray()) {
              String currentArrayOperator = arrayOpsTokenizer.nextToken();
              tempNode = tempNode.path(Integer.parseInt(currentArrayOperator.substring(1)));
            }
          }
        }
      } else {
        tempNode = goDownPathWithAttribute(tempNode, currentToken);
View Full Code Here

      throws ServletException, IOException {
    //given a list of ogpids, export them to geocommons
    //read the POST'ed JSON object
    ObjectMapper mapper = new ObjectMapper();
    JsonNode rootNode = mapper.readTree(request.getInputStream());
    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();
View Full Code Here

    //given a list of ogpids, export them to geocommons
    //read the POST'ed JSON object
    ObjectMapper mapper = new ObjectMapper();
    JsonNode rootNode = mapper.readTree(request.getInputStream());
    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
View Full Code Here

    //read the POST'ed JSON object
    ObjectMapper mapper = new ObjectMapper();
    JsonNode rootNode = mapper.readTree(request.getInputStream());
    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": []}
View Full Code Here

    ObjectMapper mapper = new ObjectMapper();
    JsonNode rootNode = mapper.readTree(request.getInputStream());
    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
View Full Code Here

    /*if ((username.isEmpty())||(password.isEmpty())){
      response.sendError(500, "This request requires a valid GeoCommons username and password.");
      return;
    }*/
    String title = rootNode.path("title").getTextValue();
    String description = rootNode.path("description").getTextValue();
    JsonNode idArray = rootNode.path("OGPIDS");
    ArrayList<String> layers = new ArrayList<String>();
    for (JsonNode idNode : idArray){
      layers.add(idNode.getTextValue());
View Full Code Here

    /*if ((username.isEmpty())||(password.isEmpty())){
      response.sendError(500, "This request requires a valid GeoCommons username and password.");
      return;
    }*/
    String title = rootNode.path("title").getTextValue();
    String description = rootNode.path("description").getTextValue();
    JsonNode idArray = rootNode.path("OGPIDS");
    ArrayList<String> layers = new ArrayList<String>();
    for (JsonNode idNode : idArray){
      layers.add(idNode.getTextValue());
    }
View Full Code Here

        e.printStackTrace();
        logger.error("Class Key not defined for this layer.");
        throw new Exception("Class Key not defined for this layer.");
      }
    }
    ArrayNode jsonArray = (ArrayNode) institutions.path(record.getInstitution());
    Iterator<JsonNode> institutionIterator = jsonArray.getElements();
    String classKey = null;
    while (institutionIterator.hasNext()){
      JsonNode currentNode = institutionIterator.next();
      logger.debug("trying matches...");
View Full Code Here

      if (!outputFormatMatch){
        continue;
      }
      logger.debug("requested format match");
     
      classKey = currentNode.path("classKey").getTextValue();
      if (accessMatch && dataTypeMatch && outputFormatMatch){
        break;
      }
    }
    if (classKey == null){
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.