Package org.codehaus.jackson.map

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


                String targetRev = design.get("_rev").getTextValue();
                int targetRevNum = parseRevNumber(targetRev);
                System.out.println("Target Rev: " + targetRev);
                design.remove("_rev");

                JsonNode attachments = mapper.createObjectNode();

                if (design.has("_attachments")) {
                    attachments = design.get("_attachments");
                }
                design.remove("_attachments");
View Full Code Here


        final ObjectMapper mapper = new ObjectMapper();

        final ArrayNode rootNode = mapper.createArrayNode();
        for (final Document doc : documents) {
            final Map<String, String> fieldUnicity = Maps.newHashMap();
            final ObjectNode docNode = mapper.createObjectNode();
            for (final IndexableField field : doc.getFields()) {
                if (fieldUnicity.containsKey(field.name()) || field.binaryValue() != null) {
                    continue;
                }
                fieldUnicity.put(field.name(), "");
View Full Code Here

    {
        ObjectMapper        mapper = new ObjectMapper();
        ArrayNode           arrayNode = mapper.createArrayNode();
        for ( String name : serviceNames.getNames() )
        {
            ObjectNode      node = mapper.createObjectNode();
            node.put("name", name);
            arrayNode.add(node);
        }

        mapper.writer().writeValue(entityStream, arrayNode);
View Full Code Here

        .inputStreamToString(VersionedAvroEntityMapper.class
            .getResourceAsStream("/ManagedSchemaEntityVersion.avsc"));

    JsonNode jsonNode = rawSchemaAsJsonNode(avroSchemaString);
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode mappingNode = mapper.createObjectNode();
    mappingNode.put("type", "column");
    mappingNode.put("value", "_s:sv_" + entityName);
    ((ObjectNode)jsonNode.get("fields").get(0)).put("mapping", mappingNode);
    return jsonNode.toString();
  }
View Full Code Here

        .inputStreamToString(VersionedAvroEntityMapper.class
            .getResourceAsStream("/ManagedSchemaEntityVersion.avsc"));

    JsonNode jsonNode = rawSchemaAsJsonNode(avroSchemaString);
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode mappingNode = mapper.createObjectNode();
    mappingNode.put("type", "column");
    mappingNode.put("value", "_s:sv_" + entityName);
    ((ObjectNode)jsonNode.get("fields").get(0)).put("mapping", mappingNode);
    return jsonNode.toString();
  }
View Full Code Here

          return;
        }
       
        try {
          ObjectMapper objectMapper = new ObjectMapper();
          ObjectNode editorNode = objectMapper.createObjectNode();
          editorNode.put("id", "canvas");
          editorNode.put("resourceId", "canvas");
          ObjectNode stencilSetNode = objectMapper.createObjectNode();
          stencilSetNode.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
          editorNode.put("stencilset", stencilSetNode);
View Full Code Here

        try {
          ObjectMapper objectMapper = new ObjectMapper();
          ObjectNode editorNode = objectMapper.createObjectNode();
          editorNode.put("id", "canvas");
          editorNode.put("resourceId", "canvas");
          ObjectNode stencilSetNode = objectMapper.createObjectNode();
          stencilSetNode.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
          editorNode.put("stencilset", stencilSetNode);
          Model modelData = repositoryService.newModel();
         
          ObjectNode modelObjectNode = objectMapper.createObjectNode();
View Full Code Here

          ObjectNode stencilSetNode = objectMapper.createObjectNode();
          stencilSetNode.put("namespace", "http://b3mn.org/stencilset/bpmn2.0#");
          editorNode.put("stencilset", stencilSetNode);
          Model modelData = repositoryService.newModel();
         
          ObjectNode modelObjectNode = objectMapper.createObjectNode();
          modelObjectNode.put(MODEL_NAME, (String) nameTextField.getValue());
          modelObjectNode.put(MODEL_REVISION, 1);
          String description = null;
          if (StringUtils.isNotEmpty((String) descriptionTextArea.getValue())) {
            description = (String) descriptionTextArea.getValue();
View Full Code Here

    {
        super.setup();

        ObjectMapper mapper = new ObjectMapper();

        ObjectNode connectionNode = mapper.createObjectNode();
        connectionNode.put("name", "test");
        connectionNode.put("connectionString", server.getConnectString());

        ObjectNode thriftNode = mapper.createObjectNode();
        thriftPort = InstanceSpec.getRandomPort();
View Full Code Here

        ObjectNode connectionNode = mapper.createObjectNode();
        connectionNode.put("name", "test");
        connectionNode.put("connectionString", server.getConnectString());

        ObjectNode thriftNode = mapper.createObjectNode();
        thriftPort = InstanceSpec.getRandomPort();
        thriftNode.put("port", thriftPort);

        ArrayNode connections = mapper.createArrayNode();
        connections.add(connectionNode);
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.