Package org.codehaus.jackson

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


      JsonNode processSubject = JsonConverterUtil.getProperty(PROPERTY_USERTASK_SUBJECT, elementNode);
      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(task, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_SUBJECT, taskSubject);
      }
     
View Full Code Here


      }
     
      //任务类型
      JsonNode taskTypeNode = getProperty(PROPERTY_USERTASK_TASKTYPE, elementNode);
      if(taskTypeNode != null){
        BpmnModelUtil.addExtensionAttribute(task, FixFlowPackage.Literals.DOCUMENT_ROOT__TASK_TYPE, taskTypeNode.asText());
      }
     
      //任务优先级
      JsonNode taskPriorityNode = getProperty(PROPERTY_PRIORITY, elementNode);
      if(taskPriorityNode != null){
View Full Code Here

        }
      } else {
        // field
        if (path.startsWith(REQUEST_INFO_PATH)) {
          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length()), name), child.asText());
        } else {
          propertySet.getProperties().put(PropertyHelper.getPropertyId(
              path.equals(BODY_TITLE) ? "" : path, name), child.asText());
        }
      }
View Full Code Here

        if (path.startsWith(REQUEST_INFO_PATH)) {
          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length()), name), child.asText());
        } else {
          propertySet.getProperties().put(PropertyHelper.getPropertyId(
              path.equals(BODY_TITLE) ? "" : path, name), child.asText());
        }
      }
    }
  }
View Full Code Here

        processNode(child, path.isEmpty() ? name : path + '/' + name, propertySet, requestInfoProps);
      } else {
        // field
        if (path.startsWith(REQUEST_INFO_PATH)) {
          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length()), name), child.asText());
        } else {
          propertySet.getProperties().put(PropertyHelper.getPropertyId(
              path.equals(BODY_TITLE) ? "" : path, name), child.asText());
        }
      }
View Full Code Here

        if (path.startsWith(REQUEST_INFO_PATH)) {
          requestInfoProps.put(PropertyHelper.getPropertyId(
              path.substring(REQUEST_INFO_PATH.length()), name), child.asText());
        } else {
          propertySet.getProperties().put(PropertyHelper.getPropertyId(
              path.equals(BODY_TITLE) ? "" : path, name), child.asText());
        }
      }
    }
  }
View Full Code Here

        JsonNode jLemma = jMorpho.path("lemma");
        if(!jLemma.isTextual()){
            throw new IllegalStateException("Field 'lemma' MUST provide a String value (parsed JSON: "
                +jMorpho);
        }
        MorphoFeatures morpho = new MorphoFeatures(jLemma.asText());
        JsonNode node = jMorpho.path("case");
        if(node.isArray()){
            ArrayNode jCases = (ArrayNode)node;
            for(int i=0;i<jCases.size();i++){
                JsonNode member = jCases.get(i);
View Full Code Here

    public String getAsString(String expression)
    {
        JsonNode node = get(expression);
        if (node.isValueNode())
        {
            return node.asText();
        }
        else
        {
            return node.toString();
        }
View Full Code Here

            try
            {
                JsonNode resultNode = data.get(expression);
                if (compareTo != null)
                {
                    Object resultValue = resultNode.isValueNode() ? resultNode.asText() : resultNode;
                    if (compareTo.equalsIgnoreCase("null"))
                    {
                        boolean answer = resultValue == null;
                        return (not ? !answer : answer);
                    }
View Full Code Here

        while (iter.hasNext()) {
            final Map.Entry<String, JsonNode> entry = iter.next();
            if (entry.getKey().equalsIgnoreCase("type")) {
                final JsonNode n = entry.getValue();
                if (n.isValueNode()) {
                    return n.asText();
                }
            }
        }
        return name;
    }
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.