use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolveWithAccessionRuleBase.
@Test
public void testResolveWithAccessionRuleBase() throws Exception {
DbXref xref = createDbXref("RU000461", "RuleBase", "http://www.uniprot.org/unirule/%s");
Assert.assertEquals("http://www.uniprot.org/unirule/RU000461", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolvePIR.
// entry/NX_P51610/xref.json
@Test
public void testResolvePIR() throws Exception {
DbXref xref = createDbXref("babebibobu", "PIR", "http://pir.georgetown.edu/cgi-bin/nbrfget?uid=%s");
xref.setProperties(Collections.singletonList(createDbXrefProperty("entry name", "A40718")));
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=A40718", resolver.resolve(xref));
Assert.assertEquals("http://pir.georgetown.edu/cgi-bin/nbrfget?uid=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class DbXrefURLResolverDelegateTest method testResolvePDB.
// entry/NX_P01308/xref.json
@Test
public void testResolvePDB() throws Exception {
DbXref xref = createDbXref("1A7F", "PDB", "whatever");
Assert.assertEquals("https://www.rcsb.org/pdb/explore/explore.do?pdbId=1A7F", resolver.resolve(xref));
Assert.assertEquals("https://www.rcsb.org/pdb/explore/explore.do?pdbId=%s", xref.getLinkUrl());
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class EmblXrefURLResolverTest method testResolveEmbl.
@Test
public void testResolveEmbl() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("AF009225", "EMBL", "http://www.ebi.ac.uk/ena/data/view/%s");
Assert.assertEquals("http://www.ebi.ac.uk/ena/data/view/AF009225", resolver.resolve(xref));
}
use of org.nextprot.api.core.domain.DbXref in project nextprot-api by calipho-sib.
the class GenevisibleXrefURLResolverTest method testResolve2.
@Test
public void testResolve2() throws Exception {
DbXref xref = DbXrefURLResolverDelegateTest.createDbXref("P51612", "Genevisible", "whatever");
String url = new DbXrefURLResolverDelegate().resolve(xref);
Assert.assertEquals("https://genevisible.com/tissues/HS/UniProt/P51612", url);
}
Aggregations