Package org.codehaus.jackson

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


        {
            String fieldName = fieldNames.next();
            JsonNode fieldNode = parent.get(fieldName);
            if (fieldName.equals(ID))
            {
                idAsString = fieldNode.asText();
            }
            else if (fieldName.equals(TYPE))
            {
                type = fieldNode.asText();
            }
View Full Code Here


            {
                idAsString = fieldNode.asText();
            }
            else if (fieldName.equals(TYPE))
            {
                type = fieldNode.asText();
            }
            else if (fieldNode.isArray())
            {
                // array containing either broker children or attribute values
                Iterator<JsonNode> elements = fieldNode.getElements();
View Full Code Here

                JsonNode jsonNode = objMapper.readTree(msg);
                String[] keyArr = key.split(":");
                for(String field: keyArr){
                    jsonNode = jsonNode.get(field);
                }
                return jsonNode.asText();
            }catch(Exception e){
                LOG.info("Failed to get value:", e);
            }
        }
        return null;
View Full Code Here

    //做pool的时候用
    boolean nonEmptyPoolFound = false;

    if (nonEmptyPoolFound == false) {
        JsonNode processIdNode = JsonConverterUtil.getProperty(PROPERTY_OVERRIDE_ID, modelNode);
        if(processIdNode != null && StringUtils.isNotEmpty(processIdNode.asText())) {
          process.setId(processIdNode.asText());
        }
        JsonNode processNameNode = JsonConverterUtil.getProperty(PROPERTY_NAME, modelNode);
        if(processNameNode != null && StringUtils.isNotEmpty(processNameNode.asText())) {
          process.setName(processNameNode.asText());
View Full Code Here

    boolean nonEmptyPoolFound = false;

    if (nonEmptyPoolFound == false) {
        JsonNode processIdNode = JsonConverterUtil.getProperty(PROPERTY_OVERRIDE_ID, modelNode);
        if(processIdNode != null && StringUtils.isNotEmpty(processIdNode.asText())) {
          process.setId(processIdNode.asText());
        }
        JsonNode processNameNode = JsonConverterUtil.getProperty(PROPERTY_NAME, modelNode);
        if(processNameNode != null && StringUtils.isNotEmpty(processNameNode.asText())) {
          process.setName(processNameNode.asText());
        }
View Full Code Here

        JsonNode processIdNode = JsonConverterUtil.getProperty(PROPERTY_OVERRIDE_ID, modelNode);
        if(processIdNode != null && StringUtils.isNotEmpty(processIdNode.asText())) {
          process.setId(processIdNode.asText());
        }
        JsonNode processNameNode = JsonConverterUtil.getProperty(PROPERTY_NAME, modelNode);
        if(processNameNode != null && StringUtils.isNotEmpty(processNameNode.asText())) {
          process.setName(processNameNode.asText());
        }
       
        //加载process的扩展元素
        //任务主题
View Full Code Here

        if(processIdNode != null && StringUtils.isNotEmpty(processIdNode.asText())) {
          process.setId(processIdNode.asText());
        }
        JsonNode processNameNode = JsonConverterUtil.getProperty(PROPERTY_NAME, modelNode);
        if(processNameNode != null && StringUtils.isNotEmpty(processNameNode.asText())) {
          process.setName(processNameNode.asText());
        }
       
        //加载process的扩展元素
        //任务主题
        JsonNode processSubject = JsonConverterUtil.getProperty(PROPERTY_PROCESS_SUBJECT, modelNode);
View Full Code Here

        }
       
        //加载process的扩展元素
        //任务主题
        JsonNode processSubject = JsonConverterUtil.getProperty(PROPERTY_PROCESS_SUBJECT, modelNode);
        if(processSubject != null && StringUtils.isNotEmpty(processSubject.asText())) {
          TaskSubject taskSubject = FixFlowFactory.eINSTANCE.createTaskSubject();
            Expression subjectExpression = FixFlowFactory.eINSTANCE.createExpression();
            subjectExpression.setName(processSubject.asText());
            subjectExpression.setValue(processSubject.asText());
            taskSubject.setExpression(subjectExpression);
View Full Code Here

        //任务主题
        JsonNode processSubject = JsonConverterUtil.getProperty(PROPERTY_PROCESS_SUBJECT, modelNode);
        if(processSubject != null && StringUtils.isNotEmpty(processSubject.asText())) {
          TaskSubject taskSubject = FixFlowFactory.eINSTANCE.createTaskSubject();
            Expression subjectExpression = FixFlowFactory.eINSTANCE.createExpression();
            subjectExpression.setName(processSubject.asText());
            subjectExpression.setValue(processSubject.asText());
            taskSubject.setExpression(subjectExpression);
            taskSubject.setId("TaskSubject_1");
            BpmnModelUtil.addExtensionElement(process, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_SUBJECT, taskSubject);
        }
View Full Code Here

        JsonNode processSubject = JsonConverterUtil.getProperty(PROPERTY_PROCESS_SUBJECT, modelNode);
        if(processSubject != null && StringUtils.isNotEmpty(processSubject.asText())) {
          TaskSubject taskSubject = FixFlowFactory.eINSTANCE.createTaskSubject();
            Expression subjectExpression = FixFlowFactory.eINSTANCE.createExpression();
            subjectExpression.setName(processSubject.asText());
            subjectExpression.setValue(processSubject.asText());
            taskSubject.setExpression(subjectExpression);
            taskSubject.setId("TaskSubject_1");
            BpmnModelUtil.addExtensionElement(process, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_SUBJECT, taskSubject);
        }
       
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.