Package net.sf.json

Examples of net.sf.json.JSONObject.optJSONObject()


                logRotator = LogRotator.DESCRIPTOR.newInstance(req,json.getJSONObject("logrotate"));
            else
                logRotator = null;

            DescribableList<JobProperty<?>, JobPropertyDescriptor> t = new DescribableList<JobProperty<?>, JobPropertyDescriptor>(NOOP,getAllProperties());
            t.rebuild(req,json.optJSONObject("properties"),JobPropertyDescriptor.getPropertyDescriptors(Job.this.getClass()));
            properties.clear();
            for (JobProperty p : t) {
                p.setOwner(this);
                properties.add(p);
            }
View Full Code Here


    {
      JSONObject attachments = doc.optJSONObject("nunaliit_attachments");
      if( null != attachments ) {
        JSONObject files = attachments.optJSONObject("files");
        if( null != files ) {
          attachmentDescription = files.optJSONObject(attachmentName);
        }
      }
    }
   
    return attachmentDescription;
View Full Code Here

      return null;
    }
    JSONObject relationshipObject = jsonObject.getJSONObject("relationship");
    Relationship.Builder builder = Relationship.newBuilder();
    if (relationshipObject.has("source")) {
      builder.setSource(newRelationshipUser(relationshipObject.optJSONObject("source")));
    }
    if (relationshipObject.has("target")) {
      builder.setTarget(newRelationshipUser(relationshipObject.optJSONObject("target")));
    }
    return builder.build();
View Full Code Here

    Relationship.Builder builder = Relationship.newBuilder();
    if (relationshipObject.has("source")) {
      builder.setSource(newRelationshipUser(relationshipObject.optJSONObject("source")));
    }
    if (relationshipObject.has("target")) {
      builder.setTarget(newRelationshipUser(relationshipObject.optJSONObject("target")));
    }
    return builder.build();
  }

  private final static Relationship.User newRelationshipUser(JSONObject jsonObject) {
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.