git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1823 improvement to all chain code specification from manual pdb entry mode
[jalview.git]
/
src
/
jalview
/
ext
/
ensembl
/
EnsemblLookup.java
diff --git
a/src/jalview/ext/ensembl/EnsemblLookup.java
b/src/jalview/ext/ensembl/EnsemblLookup.java
index
cd792b5
..
c5945ae
100644
(file)
--- a/
src/jalview/ext/ensembl/EnsemblLookup.java
+++ b/
src/jalview/ext/ensembl/EnsemblLookup.java
@@
-13,9
+13,34
@@
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
+/**
+ * A client for the Ensembl lookup REST endpoint; used to find the Parent gene
+ * identifier given a transcript identifier.
+ *
+ * @author gmcarstairs
+ *
+ */
public class EnsemblLookup extends EnsemblRestClient
{
public class EnsemblLookup extends EnsemblRestClient
{
+ /**
+ * Default constructor (to use rest.ensembl.org)
+ */
+ public EnsemblLookup()
+ {
+ super();
+ }
+
+ /**
+ * Constructor given the target domain to fetch data from
+ *
+ * @param
+ */
+ public EnsemblLookup(String d)
+ {
+ super(d);
+ }
+
@Override
public String getDbName()
{
@Override
public String getDbName()
{
@@
-41,7
+66,7
@@
public class EnsemblLookup extends EnsemblRestClient
*/
protected URL getUrl(String identifier)
{
*/
protected URL getUrl(String identifier)
{
- String url = ENSEMBL_REST + "/lookup/id/" + identifier
+ String url = getDomain() + "/lookup/id/" + identifier
+ "?content-type=application/json";
try
{
+ "?content-type=application/json";
try
{