use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveEnsemblENSP.
// entry/NX_Q9BXA6/xref.json
@Test
public void testResolveEnsemblENSP() throws Exception {
DbXref xref = createDbXref("ENSP00000466056", "Ensembl", "whatever");
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Transcript/ProteinSummary?db=core;p=ENSP00000466056", resolver.resolve(xref));
Assert.assertEquals("http://www.ensembl.org/Homo_sapiens/Transcript/ProteinSummary?db=core;p=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveUniGene.
@Test
public void testResolveUniGene() throws Exception {
DbXref xref = createDbXref("Hs.83634", "UniGene", "https://www.ncbi.nlm.nih.gov/UniGene/clust.cgi?ORG=%d&CID=%s");
Assert.assertEquals("https://www.ncbi.nlm.nih.gov/UniGene/clust.cgi?ORG=Hs&CID=83634", resolver.resolve(xref));
Assert.assertEquals("https://www.ncbi.nlm.nih.gov/UniGene/clust.cgi?ORG=%d&CID=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveCGH_DB.
@Test
public void testResolveCGH_DB() throws Exception {
DbXref xref = createDbXref("9029-4", "CGH-DB", "http://www.cghtmd.jp/CGHDatabase/mapViewer?hid=%s&aid=%t&lang=en");
Assert.assertEquals("http://www.cghtmd.jp/CGHDatabase/mapViewer?hid=9029&aid=4&lang=en", resolver.resolve(xref));
Assert.assertEquals("http://www.cghtmd.jp/CGHDatabase/mapViewer?hid=%s&aid=4&lang=en", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveSRMAtlas.
// entry/NX_P01308/xref.json
@Test
public void testResolveSRMAtlas() throws Exception {
DbXref xref = 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(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));
Assert.assertEquals("https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetTransitions?organism_name=Human;default_search=1;peptide_sequence_constraint=%s;apply_action=QUERY", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolvePeptideAtlasNoPap.
// entry/NX_P01308/xref.json
@Test
public void testResolvePeptideAtlasNoPap() throws Exception {
DbXref xref = createDbXref("P01308", "PeptideAtlas", "whatever");
Assert.assertEquals("https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetProtein?protein_name=P01308;organism_name=Human;action=GO", resolver.resolve(xref));
Assert.assertEquals("https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetProtein?protein_name=%s;organism_name=Human;action=GO", xref.getLinkUrl());
}
Aggregations