Package org.corrib.s3b.mbb.beans

Examples of org.corrib.s3b.mbb.beans.Person


  },
   */
  protected JSONObject jsonPerson(Map<String, Map<String, Collection<String>>> triples, String resource, String serverAddress){
    JSONObject object = new JSONObject();
    Map<String, Collection<String>> value = triples.get(resource);
    Person person = MbbTypes.getPerson(value);
   
    object.put("type", "Person");
    object.put("label", person.getName());
    object.put("homepage", person.getHomepage());
    object.put("bio", person.getBio());
   
    JSONArray emails = new JSONArray();
    if(person.getEmails() != null)
      emails.addAll(person.getEmails());
   
    object.put("email", emails);
   
    JSONArray knows = new JSONArray();
    if(person.getKnows() != null)
      knows.addAll(person.getKnows());
   
    object.put("knows", knows);
   
    JSONArray phones = new JSONArray();
    if(person.getPhones() != null)
      phones.addAll(person.getPhones());
   
    object.put("phones", phones);
   
    JSONArray interests = new JSONArray();
    if(person.getInterests() != null)
      interests.addAll(person.getInterests());
   
    object.put("interests", interests);
   
    this.addProperties(object, person.getOtherProperties());

    return object;
  }
View Full Code Here

TOP

Related Classes of org.corrib.s3b.mbb.beans.Person

Copyright © 2018 www.massapicom. 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.