Commit 6ed5817b authored by Piotr Gawron's avatar Piotr Gawron
Browse files

ssl certificate for https://ctdbase.org/ is invalid, so top using SSL

parent 6489f848
......@@ -70,18 +70,18 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
/**
* Home page of ctd database.
*/
static final String URL = "https://ctdbase.org/";
static final String URL = "http://ctdbase.org/";
/**
* URL to get a list of chemicals by disease id.
*/
public static final String DISEASE_URL = "https://ctdbase.org/detail.go?6578706f7274=1&d-1332398-e=5&view=chem&"
public static final String DISEASE_URL = URL + "detail.go?6578706f7274=1&d-1332398-e=5&view=chem&"
+ "type=disease&acc=MESH%3A";
/**
* URL to get a list of chemicals by gene id.
*/
public static final String DISEASE_GENE_URL = "https://ctdbase.org/detail.go?slimTerm=all&6578706f7274=1&qid=3464576&"
public static final String DISEASE_GENE_URL = URL + "detail.go?slimTerm=all&6578706f7274=1&qid=3464576&"
+ "d-1332398-e=5&view=disease&type=gene&assnType=curated&acc=";
/**
......@@ -404,10 +404,10 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
}
if (result != null) {
MeSH mesh = meshParser.getMeSH(result.getChemicalId());
if (mesh!=null) {
result.addSynonyms(mesh.getSynonyms());
if (mesh != null) {
result.addSynonyms(mesh.getSynonyms());
} else {
logger.warn("Problematic mesh id: "+result.getChemicalId());
logger.warn("Problematic mesh id: " + result.getChemicalId());
}
}
......@@ -486,7 +486,7 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
if (entrez == null) {
invalidHgnc.add(md);
} else {
String query = "https://ctdbase.org/detail.go?type=gene&view=ixn&chemAcc=" + chemID.getResource() + "&acc="
String query = URL + "detail.go?type=gene&view=ixn&chemAcc=" + chemID.getResource() + "&acc="
+ entrez.getResource();
String referencesPage = getWebPageContent(query);
Matcher matcher = pattern.matcher(referencesPage);
......@@ -494,7 +494,7 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
idx.add(matcher.group(1));
}
for (String string : idx) {
String query2 = "https://ctdbase.org/detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId="
String query2 = URL + "detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId="
+ string;
String referencesPage2 = getWebPageContent(query2);
String[] lines = referencesPage2.split("\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment