Index: SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/ClassLink.java
===================================================================
--- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/ClassLink.java (revision 164)
+++ SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/ClassLink.java (revision 166)
@@ -114,4 +114,45 @@
 	}
 
+	public String toJSONString3(SClass[] classes) {
+		String json_str ="{";
+		
+		if( propertyURI != null ) {
+			json_str+="\"propertyURI\":"+"\""+propertyURI+"\",";
+		}
+		else{
+			json_str+="\"propertyURI\":"+"\"propertyURI\",";			
+		}
+		if( linkedClassURI != null ){
+			json_str+="\"linkedClassURI\":"+"\""+linkedClassURI+"\",";
+		}
+		else{
+			json_str+="\"linkedClassURI\":"+"\"linkedClassURI\",";			
+		}
+		if( linkedLiteralDatatypeURI != null ){
+			json_str+="\"linkedLiteralDatatypeURI\":"+"\""+linkedLiteralDatatypeURI+"\",";
+		}
+		else{
+			json_str+="\"linkedLiteralDatatypeURI\":"+"\"linkedLiteralDatatypeURI\",";			
+		}
+                if( direction != null ){
+			json_str+="\"direction\":"+"\""+direction.toString()+"\",";
+		}
+		else{
+			json_str+="\"direction\":"+"\"direction\",";			
+		}
+                //if ( linkedClassURI != null ){
+                    String label = getLinkedClassLabel(classes);
+                    json_str+="\"nodelabel\":"+"\""+label+"\"";
+                //}
+	//	json_str+="\"numOfLinks\":"+"\""+numOfLinks+"\",";
+	//	json_str+="\"numOfLinkedInstances\":"+"\""+numOfLinkedInstances+"\",";
+	//	json_str+="\"numOfOriginInstances\":"+"\""+numOfOriginInstances+"\",";
+	//	json_str+="\"numOfOriginClassInstances\":"+"\""+numOfOriginClassInstances+"\",";
+	//	json_str+="\"numOfLinkedClassInstances\":"+"\""+numOfLinkedClassInstances+"\"";
+		
+		json_str+="}";
+
+		return json_str;
+	}
 	
 	public int getNumOfLinks() {
@@ -255,5 +296,27 @@
 	}
 		
-
+        private String getLinkedClassLabel(SClass[] classes){
+                if ( linkedClassURI == null ){
+                    return "";
+                }
+                for ( int i = 0 ; i < classes.length; i++ ){
+                    if ( linkedClassURI.equals(classes[i].getClassURI()) ){
+                        Label[] labels = classes[i].getLabels();
+                        for ( int j = 0 ; j < labels.length; j++ ){
+                            if ( labels[j].getLanguage() == null ){
+                                return labels[j].getLabel();
+                            }else if ( labels[j].getLanguage().equals("en") ){
+                                return labels[j].getLabel();
+                            }
+                        }
+                        break;
+                    }                    
+                }
+                String[] url = linkedClassURI.split("/");
+                String tmplabel = url[url.length-1];
+                String[] tmplabel2 = tmplabel.split("#");
+                String label = tmplabel2[tmplabel2.length-1];
+                return label;
+        }
 	
 	// private String[] propertyDomainClassURIs = null;
Index: SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/Path.java
===================================================================
--- SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/Path.java (revision 161)
+++ SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/OWL/Path.java (revision 166)
@@ -71,5 +71,24 @@
 	}
 
-	
+	public String toJSONString3(SClass[] classes){
+		String json_str="";
+		json_str+="{\"startClassURI\":\""+ startClass+"\",";
+		
+		if (classLinks != null && classLinks.size() != 0) {
+			json_str+="\"classLinks\":[";
+			
+			JSONObject[] classLinkObjs = new JSONObject[classLinks.size()];
+			for (int i = 0; i < classLinks.size(); i++) {
+				if(i>0){json_str += "," ;}
+				json_str+= classLinks.get(i).toJSONString3(classes);
+			}
+			json_str+="]";
+		}
+		json_str+="}";
+		
+		return json_str;
+	}
+
+        
 	public String getStartClass() {
 		return startClass;
