Web Services

MIRIAM Registry provides some SOAP and REST Web Services for programmatic access.

Services available

SOAP Web Services

All the services provided are listed in detail here.

Alternatively, you can access to the WSDL file here.

REST Web Services

REST Web Services are now available from http://www.ebi.ac.uk/miriamws/main/rest/ for you to test and give us feedback! BETA

Java Library

In order to communicate with the SOAP Web Services of MIRIAM Registry in a Java program, you can use the library provided below. It is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Get the library via Maven

The library is available from the EBI Maven repository.

You just need to add the following to your pom.xml to get it and all its dependencies:

  <dependencies>
    <dependency>
      <groupId>uk.ac.ebi.miriam</groupId>
      <artifactId>miriam-lib</artifactId>
      <version>1.1.5</version>
    </dependency>
  </dependencies>
  
  <repositories>
	<repository>
	  <id>ebi-repo</id>
	  <name>The EBI internal repository</name>
	  <url>http://www.ebi.ac.uk/~maven/m2repo</url>
	  <releases>
	    <enabled>true</enabled>
	  </releases>
	  <snapshots>
	    <enabled>false</enabled>
	  </snapshots>
	</repository>
  </repositories>

You may still need to manually add some Sun JARs, cf. this page from the Maven documentation for more information.

Get the library via SourceForge

Two versions are available for download from the SourceForge project (latest release: 1.1.5):

Here are all the dependencies (for the light version):

Note: you can find the latest version of each of these packages on their official web site.

Java 1.5 (or newer) is required in order to use the library.

JavaDoc

The documentation (javadoc) can be found here.

Tutorial

Here is a sample program to show how to use the library:

import uk.ac.ebi.miriam.lib.*;

public class WebServicesTesting
{
    public static void main(String[] args)
    {
        // Creation of the link to the Web Services
        MiriamLink link = new MiriamLink();
        
        // Sets the address to access the Web Services
        link.setAddress("http://www.ebi.ac.uk/miriamws/main/MiriamWebServices");
        
        // Gets some information about the library
        System.out.println("Are you using the latest Java library available:");
        System.out.println("\t" + link.isLibraryUpdated());
        
        // Gets the physical locations corresponding to a Identifiers.org URI
        System.out.println("Physical locations available for the entity identified by official Identifiers.org URI: 'http://identifiers.org/taxonomy/9606':");
        for (String loc: link.getLocations(link.convertURL("http://identifiers.org/taxonomy/9606")))
        {
            System.out.println("\t- " + loc);
        }
        
        // Gets the physical locations corresponding to a MIRIAM URN
        System.out.println("Physical locations available for the entity identified by outdated MIRIAM URN: 'urn:miriam:ec-code:1.1.1.1':");
        for (String loc: link.getLocations("urn:miriam:taxonomy:9606"))
        {
            System.out.println("\t- " + loc);
        }
		
        // Gets the physical locations corresponding to an obsolete MIRIAM URN
        System.out.println("Physical locations available for the entity identified by obsolete MIRIAM URN: 'urn:miriam:obo.go:GO%3A0045202':");
        for (String loc: link.getLocations("urn:miriam:obo.go:GO%3A0045202"))
        {
            System.out.println("\t- " + loc);
        }
        
        // Converts an obsolete URI into the valid one
        System.out.println("Get the official Identifiers.org URI of the obsolete URI: urn:lsid:ec-code.org:chebi:CHEBI:17891");
        System.out.println("\t" + link.convertURN("urn:lsid:ec-code.org:1.1.1.1"));
		
        // Tests if the identifier of an entity matches the pattern stored for its data collection
        System.out.println("Is 'X62158' a valid identifier for a UniProt entity? ");
        System.out.println("\t" + link.checkRegExp("X62158", "uniprot"));  
        
        // and much more...
    }
}

And the result should be:

    
	Are you using the latest Java library available:
		true
	Physical locations available for the entity identified by official Identifiers.org URI: 'http://identifiers.org/taxonomy/9606':
		- http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=9606
		- http://www.uniprot.org/taxonomy/9606
		- http://www.ebi.ac.uk/ena/data/view/Taxon:9606
		- http://purl.bioontology.org/ontology/NCBITAXON/obo:NCBITaxon_9606
	Physical locations available for the entity identified by outdated MIRIAM URN: 'urn:miriam:ec-code:1.1.1.1':
		- http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=9606
		- http://www.uniprot.org/taxonomy/9606
		- http://www.ebi.ac.uk/ena/data/view/Taxon:9606
		- http://purl.bioontology.org/ontology/NCBITAXON/obo:NCBITaxon_9606
	Physical locations available for the entity identified by obsolete MIRIAM URN: 'urn:miriam:obo.go:GO%3A0045202':
		- http://www.ebi.ac.uk/QuickGO/GTerm?id=GO%3A0045202
		- http://amigo.geneontology.org/cgi-bin/amigo/term_details?term=GO%3A0045202
		- http://www.informatics.jax.org/searches/GO.cgi?id=GO%3A0045202
		- http://purl.bioontology.org/ontology/GO/GO%3A0045202
		- http://www.pantherdb.org/panther/category.do?categoryAcc=GO%3A0045202
	Get the official Identifiers.org URI of the obsolete URI: urn:lsid:ec-code.org:chebi:CHEBI:17891
		http://identifiers.org/ec-code/1.1.1.1
	Is 'X62158' a valid identifier for a UniProt entity? 
		false