For a UniParc (see http://www.ebi.ac.uk/uniprot/database/DBDescription.html#uniparc) identifier/accession fetch the assocated InterPro Matches from SRS@EBI (see http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-page+LibInfo+-lib+IPRMC_UNIPARC).
Get the entry from SRS using http.
org.embl.ebi.escience.scuflworkers.java.WebPageFetcher
Construct SRS@EBI URL to get the InterPro matches UniParc (IPRMC_UNIPARC) entry (see http://www.ebi.ac.uk/~srs/wiki/doku.php?id=guides:linkingtosrs).
//
// Build URL to get InterPro matches UniParc, given a UniParc
// ID/accession.
//
iprmc_uniparc_url = "http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-e+-ascii+";
iprmc_uniparc_url += "[iprmc_uniparc-ID:" + uniparc_id + "]";
uniparc_id
iprmc_uniparc_url
Check the data returned by SRS for errors, and "not found" messages. In this case a simple check for HTML tags.
//
// Check the document returned by SRS for error messages.
//
if(input.indexOf("<HTML>") < 0) {
output = input;
} else {
output = "";
}
input
output
UniParc identifier/accession to get InterPro matches for (e.g. UPI000000004E).
text/xml
InterPro matches XML entry for UniParc identifer.