| 97 | public String toJSONString4(QueryPathGenerator qpg){ |
| 98 | String json_str=""; |
| 99 | json_str+="{\"startClass\":\""+ startClass+"\","; |
| 100 | // label |
| 101 | json_str+="\"label\":\""+qpg.getClassLabel(startClass)+"\","; |
| 102 | if (classLinks != null && classLinks.size() != 0) { |
| 103 | json_str+="\"classLinks\":["; |
| 104 | |
| 105 | JSONObject[] classLinkObjs = new JSONObject[classLinks.size()]; |
| 106 | for (int i = 0; i < classLinks.size(); i++) { |
| 107 | if(i>0){json_str += "," ;} |
| 108 | json_str+= classLinks.get(i).toJSONString4(qpg); |
| 109 | } |
| 110 | json_str+="]"; |
| 111 | } |
| 112 | json_str += ","; |
| 113 | json_str +="\"score\":\""+width+"\""; |
| 114 | json_str +="}"; |
| 115 | |
| 116 | return json_str; |
| 117 | } |