Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.ObjectMapper.createObjectNode()


        }
       
        if (selectEditorComponent.isModelerPreferred()) {
          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

    }
  }

  private JsonNode getProcessDefinitionResponse(ProcessDefinitionEntity processDefinition) {
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode pdrJSON = mapper.createObjectNode();
    pdrJSON.put("id", processDefinition.getId());
    pdrJSON.put("name", processDefinition.getName());
    pdrJSON.put("key", processDefinition.getKey());
    pdrJSON.put("version", processDefinition.getVersion());
    pdrJSON.put("deploymentId", processDefinition.getDeploymentId());
View Full Code Here

           
            RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService();
            model.setCategory(null);
           
            ObjectMapper objectMapper = new ObjectMapper();
            ObjectNode metaInfoJson = objectMapper.createObjectNode();
            metaInfoJson.put("name", model.getName());
            model.setMetaInfo(metaInfoJson.toString());
            repositoryService.saveModel(model);
           
            BpmnJsonConverter bpmnJsonConverter = new BpmnJsonConverter();
View Full Code Here

            final String id = ((URI) contextObject.getReferent().getDescriptors()[0]).toASCIIString();
            status = ReferentManager.getResolver().getStatus(id);

            if (status != HttpServletResponse.SC_NOT_FOUND) {
                final ObjectMapper mapper = new ObjectMapper();
                final ObjectNode rootNode = mapper.createObjectNode();

                String res_status = null;

                if (status == HttpServletResponse.SC_OK) {
                    res_status = STATUS_OK;
View Full Code Here

        int status = HttpServletResponse.SC_OK;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        try {
            final ObjectMapper mapper = new ObjectMapper();
            final ObjectNode rootNode = mapper.createObjectNode();
            final IExtract jp2 = new KduExtractExe();

            ImageRecord r = ReferentManager.getImageRecord(contextObject.getReferent());
            r = jp2.getMetadata(r);
View Full Code Here

     * @param aPrefix The IIIF prefix
     * @return The JSON representation of the image's metadata
     */
    public String toJSON(final String aService, final String aPrefix) throws JsonProcessingException {
        final ObjectMapper mapper = new ObjectMapper();
        final ObjectNode rootNode = mapper.createObjectNode();
        final ArrayNode formats, scaleFactors;
        final String id;

        try {
            id = URLEncoder.encode(getIdentifier(), "UTF-8");
View Full Code Here

   *
   * @return this table in JSON representation
   */
  public JsonNode toJson() {
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode node = mapper.createObjectNode();

    ArrayNode columnsNode = mapper.createArrayNode();
    for (DataColumn column : columns) {
      columnsNode.add(column.toJson());
    }
View Full Code Here

                JsonNode mappings = indexConfig.get("mappings");
                if (mappings != null && mappings.isObject()) {
                    for (Iterator<Map.Entry<String, JsonNode>> i = mappings.fields(); i.hasNext(); ) {
                        Map.Entry<String, JsonNode> field = i.next();
                        ObjectNode mapping = jsonMapper.createObjectNode();
                        mapping.put(field.getKey(), field.getValue());
                        createIndex.addMapping(field.getKey(), jsonMapper.writeValueAsString(mapping));
                    }
                }
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.