Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
TriPOINT/src/edu/uconn/tripoint/export/PathwayCytoscapeEdge.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
25 lines (20 sloc)
636 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.uconn.tripoint.export; | |
public class PathwayCytoscapeEdge extends CytoscapeEdge{ | |
private String _type; | |
public PathwayCytoscapeEdge(int id, CytoscapeNode n1, CytoscapeNode n2, String type){ | |
super(id, n1, n2); | |
_type = type; | |
} | |
public String toJSON(){ | |
StringBuilder sb = new StringBuilder(); | |
sb.append("{\n"); | |
sb.append("\"data\" : {\n"); | |
sb.append("\"id\" : \""+getId()+"\",\n"); | |
sb.append("\"source\" : \""+getN1().getId()+"\",\n"); | |
sb.append("\"target\" : \""+getN2().getId()+"\",\n"); | |
sb.append("\"type\" : \""+_type+"\"\n"); | |
sb.append("}\n"); | |
sb.append("}\n"); | |
return sb.toString(); | |
} | |
} |