Package org.json.simple

Examples of org.json.simple.JSONObject.containsKey()


        submission.setExternalLink((String) object.get(EXTERNAL_LINK));
      }
      if(object.containsKey(EXCEPTION)) {
        submission.setExceptionInfo((String) object.get(EXCEPTION));
      }
      if(object.containsKey(EXCEPTION_TRACE)) {
        submission.setExceptionStackTrace((String) object.get(EXCEPTION_TRACE));
      }
      if(object.containsKey(COUNTERS)) {
        submission.setCounters(restoreCounters((JSONObject) object.get(COUNTERS)));
      }
View Full Code Here


        submission.setExceptionInfo((String) object.get(EXCEPTION));
      }
      if(object.containsKey(EXCEPTION_TRACE)) {
        submission.setExceptionStackTrace((String) object.get(EXCEPTION_TRACE));
      }
      if(object.containsKey(COUNTERS)) {
        submission.setCounters(restoreCounters((JSONObject) object.get(COUNTERS)));
      }
      if(object.containsKey(CONNECTOR_SCHEMA)) {
        submission.setConnectorSchema(restoreSchemna((JSONObject) object.get(CONNECTOR_SCHEMA)));
      }
View Full Code Here

        submission.setExceptionStackTrace((String) object.get(EXCEPTION_TRACE));
      }
      if(object.containsKey(COUNTERS)) {
        submission.setCounters(restoreCounters((JSONObject) object.get(COUNTERS)));
      }
      if(object.containsKey(CONNECTOR_SCHEMA)) {
        submission.setConnectorSchema(restoreSchemna((JSONObject) object.get(CONNECTOR_SCHEMA)));
      }
      if(object.containsKey(HIO_SCHEMA)) {
        submission.setHioSchema(restoreSchemna((JSONObject) object.get(HIO_SCHEMA)));
      }
View Full Code Here

        submission.setCounters(restoreCounters((JSONObject) object.get(COUNTERS)));
      }
      if(object.containsKey(CONNECTOR_SCHEMA)) {
        submission.setConnectorSchema(restoreSchemna((JSONObject) object.get(CONNECTOR_SCHEMA)));
      }
      if(object.containsKey(HIO_SCHEMA)) {
        submission.setHioSchema(restoreSchemna((JSONObject) object.get(HIO_SCHEMA)));
      }

      this.submissions.add(submission);
    }
View Full Code Here

    JSONObject connector = (JSONObject)connectors.get(0);
    JSONArray inputs = (JSONArray)connector.get("inputs");
    assertEquals(3, inputs.size());
    // Inputs are ordered when creating connection
    JSONObject password = (JSONObject)inputs.get(2);
    assertTrue(password.containsKey("value"));

    // Sensitive values should not exist
    all = (JSONArray)jsonFiltered.get("all");
    allItem = (JSONObject)all.get(0);
    connectors = (JSONArray)allItem.get("connector");
View Full Code Here

    connector = (JSONObject)connectors.get(0);
    inputs = (JSONArray)connector.get("inputs");
    assertEquals(3, inputs.size());
    // Inputs are ordered when creating connection
    password = (JSONObject)inputs.get(2);
    assertFalse(password.containsKey("value"));
  }
}
View Full Code Here

      // Propagate form ID
      mInput.setPersistenceId((Long)input.get(ID));

      // Propagate form optional value
      if(input.containsKey(FORM_INPUT_VALUE)) {
        mInput.restoreFromUrlSafeValueString(
          (String) input.get(FORM_INPUT_VALUE));
      }
      mInputs.add(mInput);
    }
View Full Code Here

          if (dataType != null &&
                  !dataType.toString().isEmpty()) {
            mGraph.add(new TripleImpl(subject, new UriRef((String) predicate),
                //LiteralFactory.getInstance().createTypedLiteral(value)));
                    new TypedLiteralImpl(value.toString(),new UriRef(dataType.toString()))));
          } else if (values.containsKey("lang")
              && !values.get("lang").equals("")
              && values.get("lang") != null) {
            mGraph.add(new TripleImpl(subject, new UriRef((String) predicate),
                new PlainLiteralImpl(value, new Language((String) values.get("lang")))));
          } else {
View Full Code Here

      String jsonProperty,
      String... expectedSubstrings) throws Exception {
    assertNotNull(emitted);
    JSONObject json = (JSONObject) json(emitted);
    assertNotNull(json);
    assertTrue(jsonProperty + " present", json.containsKey(jsonProperty));
    String value = (String) json.get(jsonProperty);
    for (String s : expectedSubstrings) {
      assertContainsIgnoreSpace(value, s);
    }
  }
View Full Code Here

     */
    public <V> V getValue(ObjectName pObjectName,String pAttribute) {
        ObjectName requestMBean = getRequest().getObjectName();
        if (requestMBean.isPattern()) {
            JSONObject mAttributes = getAttributesForObjectNameWithPatternRequest(pObjectName);
            if (!mAttributes.containsKey(pAttribute)) {
                throw new IllegalArgumentException("No attribute " + pAttribute + " for ObjectName " + pObjectName + " returned for" +
                        " the given request");
            }
            return (V) mAttributes.get(pAttribute);
        } else {
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.