use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class JcrbXrefURLResolverTest method testResolveJCRB.
@Test
public void testResolveJCRB() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("JCRB1234", "JCRB", "whatever/%s");
Assert.assertEquals("http://cellbank.nibio.go.jp/~cellbank/en/search_res_list.cgi?KEYWOD=jcrb1234", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class PirXrefURLResolverTest method testResolvePIR.
// entry/NX_P51610/xref.json
@Test
public void testResolvePIR() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("babebibobu", "PIR", "http://pir.georgetown.edu/cgi-bin/nbrfget?uid=%s");
xref.setProperties(Collections.singletonList(DbXrefURLResolverDelegateTest.createDbXrefProperty("entry name", "A40718")));
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=A40718", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class SrmAtlasXrefURLResolverTest method testResolveSRMAtlas.
// entry/NX_P01308/xref.json
@Test
public void testResolveSRMAtlas() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("PAp00968082", "SRMAtlas", "https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetTransitions?organism_name=Human;default_search=1;peptide_sequence_constraint=%s;apply_action=QUERY");
xref.setProperties(Collections.singletonList(DbXrefURLResolverDelegateTest.createDbXrefProperty("sequence", "GFFYTPK")));
Assert.assertEquals("https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetTransitions?organism_name=Human;default_search=1;peptide_sequence_constraint=GFFYTPK;apply_action=QUERY", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class EnsemblXrefURLResolverTest method testResolveEnsemblENSG.
// entry/NX_Q9BXA6/xref.json
@Test
public void testResolveEnsemblENSG() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("ENSG00000178093", "Ensembl", "whatever");
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Gene/Summary?db=core;g=ENSG00000178093", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class EnsemblXrefURLResolverTest method testResolveEnsemblBadPrimaryId.
@Test
public void testResolveEnsemblBadPrimaryId() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("EST00000587522", "Ensembl", "whatever");
Assert.assertEquals("https://www.ensembl.org/Multi/Search/Results?q=EST00000587522;site=ensembl", resolver.resolve(xref));
Assert.assertEquals("https://www.ensembl.org/Multi/Search/Results?q=%s;site=ensembl", xref.getLinkUrl());
}
Aggregations