uk.ac.ebi.biomodels.ws
Class BioModelsWSClient

java.lang.Object
  extended by uk.ac.ebi.biomodels.ws.BioModelsWSClient

public class BioModelsWSClient
extends java.lang.Object

Entry point of the BioModels Database Web Services client.

Version:
20120416
Author:
Camille Laibe, Chen Li

Constructor Summary
BioModelsWSClient()
          Default constructor.
 
Method Summary
 java.lang.String[] getAllCuratedModelsId()
          Retrieves the identifiers of all the published curated models.
 java.lang.String[] getAllModelsId()
          Retrieves the identifiers of all the published models.
 java.lang.String[] getAllNonCuratedModelsId()
          Retrieves the identifiers of all the published non-curated models.
 java.lang.String[] getAuthorsByModelId(java.lang.String modelId)
          Retrieves the name of the authors of the publication associated with a given model.
 java.lang.String getDateLastModifByModelId(java.lang.String modelId)
          Deprecated. Use getLastModifiedDateByModelId(String) instead.
 java.lang.String[] getEncodersByModelId(java.lang.String modelId)
          Retrieves the name of the encoders of a given model.
 java.lang.String getEndPoint()
          Retrieves the address of the web services endpoint.
 java.lang.String getLastModifiedDateByModelId(java.lang.String modelId)
          Retrieves the date of last modification of a given model.
 java.lang.String getModelById(java.lang.String id)
          Deprecated. Replaced by getModelSBMLById(String id)
 java.lang.String getModelNameById(java.lang.String id)
          Retrieves the name of a model name given its identifier.
 java.lang.String getModelSBMLById(java.lang.String id)
          Retrieves the SBML form of a model (in a string) given its identifier.
 java.lang.String[] getModelsIdByChEBI(java.lang.String text)
          Retrieves the identifiers of all models which are associated to some ChEBI terms.
 java.lang.String[] getModelsIdByChEBIId(java.lang.String ChEBIId)
          Retrieves the identifiers of all the models which are annotated with a given ChEBI term.
 java.lang.String[] getModelsIdByGO(java.lang.String text)
          Retrieves the models which are associated to the provided Gene Ontology text.
 java.lang.String[] getModelsIdByGOId(java.lang.String GOId)
          Retrieves the models which are annotated with the given Gene Ontology term.
 java.lang.String[] getModelsIdByName(java.lang.String modelName)
          Retrieves the models' identifiers which name includes the given keyword.
 java.lang.String[] getModelsIdByPerson(java.lang.String personName)
          Retrieves the identifiers of all models which have a given person as author or encoder.
 java.lang.String[] getModelsIdByPublication(java.lang.String publicationIdOrText)
          Retrieves the identifiers of all models related to one (or more) publication(s).
 java.lang.String[] getModelsIdByTaxonomy(java.lang.String text)
          Retrieves the models which are associated to the provided Taxonomy text.
 java.lang.String[] getModelsIdByTaxonomyId(java.lang.String taxonomyId)
          Retrieves the models which are annotated with the given taxon.
 java.lang.String[] getModelsIdByUniprot(java.lang.String text)
          Retrieves all the models which are associated to the provided UniProt text.
 java.lang.String[] getModelsIdByUniprotId(java.lang.String UniProtId)
          Retrieves all the models which are annotated with a given UniProt record.
 java.lang.String[] getModelsIdByUniprotIds(java.lang.String[] UniProtIds)
          Retrieves all the models which are annotated with the given UniProt records.
 java.lang.String getPublicationByModelId(java.lang.String modelId)
          Retrieves the publication's identifier of a given model.
 SimpleModel getSimpleModelById(java.lang.String id)
          Retrieves the main information (identifier, name, publication identifier and date of last modification) about a given model.
 java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsByChEBIIds(java.lang.String[] ChEBIIds)
          Retrieves the models which are annotated with the given ChEBI terms.
 java.util.List<SimpleModel> getSimpleModelsByIds(java.lang.String[] ids)
          Retrieves the main information (identifier, name, publication identifier and date of last modification, ...) about given models.
 java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsByReactomeIds(java.lang.String[] ReactomeIds)
          Retrieves all the models which are annotated with the given Reactome records.
 java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsByUniprotIds(java.lang.String[] UniProtIds)
          Retrieves all the models which are annotated with the given UniProt records.
 java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsRelatedWithChEBI()
          Retrieves all the models which are annotated with ChEBI terms.
 java.lang.String getSubModelSBML(java.lang.String modelId, java.lang.String[] elementsIds)
          Generates the minimal sub-model of a given model in the database including all selected components.
 java.lang.String helloBioModels()
          Checks if the web services are working properly.
 void setEndPoint(java.lang.String address)
          Sets the address of the web services endpoint.
 void setProperty(java.lang.String propertyName, java.lang.String value)
          Sets the values of environmental variables (useful for things such as proxy, ...).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BioModelsWSClient

public BioModelsWSClient()
Default constructor.

Method Detail

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.String value)
Sets the values of environmental variables (useful for things such as proxy, ...).

Parameters:
propertyName - name of the property
value - of the property

setEndPoint

public void setEndPoint(java.lang.String address)
Sets the address of the web services endpoint.

Parameters:
address - URL of the web services endpoint to be used

getEndPoint

public java.lang.String getEndPoint()
Retrieves the address of the web services endpoint.

Returns:
address URL of the web services endpoint

helloBioModels

public java.lang.String helloBioModels()
                                throws BioModelsWSException
Checks if the web services are working properly.

Returns:
"Hello BioModels", if the call is a success
Throws:
BioModelsWSException

getModelById

@Deprecated
public java.lang.String getModelById(java.lang.String id)
                              throws BioModelsWSException
Deprecated. Replaced by getModelSBMLById(String id)

Retrieves the SBML form of a model (in a string) given its identifier.

Parameters:
id - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
SBML model in a string, or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getModelSBMLById

public java.lang.String getModelSBMLById(java.lang.String id)
                                  throws BioModelsWSException
Retrieves the SBML form of a model (in a string) given its identifier.

Parameters:
id - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
SBML model in a string, or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getAuthorsByModelId

public java.lang.String[] getAuthorsByModelId(java.lang.String modelId)
                                       throws BioModelsWSException
Retrieves the name of the authors of the publication associated with a given model.

Parameters:
modelId - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
names of the publication's authors, or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getEncodersByModelId

public java.lang.String[] getEncodersByModelId(java.lang.String modelId)
                                        throws BioModelsWSException
Retrieves the name of the encoders of a given model.

Parameters:
modelId - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
names of the model's encoders, or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getPublicationByModelId

public java.lang.String getPublicationByModelId(java.lang.String modelId)
                                         throws BioModelsWSException
Retrieves the publication's identifier of a given model.

Parameters:
modelId - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
publication identifier (can be a PMID, DOI or URL), or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getDateLastModifByModelId

@Deprecated
public java.lang.String getDateLastModifByModelId(java.lang.String modelId)
                                           throws BioModelsWSException
Deprecated. Use getLastModifiedDateByModelId(String) instead.

Retrieves the date of last modification of a given model.

Parameters:
modelId - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
date of last modification (expressed according to ISO 8601), or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getLastModifiedDateByModelId

public java.lang.String getLastModifiedDateByModelId(java.lang.String modelId)
                                              throws BioModelsWSException
Retrieves the date of last modification of a given model.

Parameters:
modelId - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
date of last modification (expressed according to ISO 8601), or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getSimpleModelById

public SimpleModel getSimpleModelById(java.lang.String id)
                               throws BioModelsWSException
Retrieves the main information (identifier, name, publication identifier and date of last modification) about a given model.

Parameters:
id - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
a SimpleModel, or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getSimpleModelsByIds

public java.util.List<SimpleModel> getSimpleModelsByIds(java.lang.String[] ids)
                                                 throws BioModelsWSException
Retrieves the main information (identifier, name, publication identifier and date of last modification, ...) about given models.

Parameters:
ids - list of model identifiers (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
list of SimpleModel
Throws:
BioModelsWSException

getModelNameById

public java.lang.String getModelNameById(java.lang.String id)
                                  throws BioModelsWSException
Retrieves the name of a model name given its identifier.

Parameters:
id - model identifier (e.g. BIOMD0000000408 or MODEL1201250000)
Returns:
model name, or 'null' if the provided identifier is not valid or the model does not exist
Throws:
BioModelsWSException

getAllModelsId

public java.lang.String[] getAllModelsId()
                                  throws BioModelsWSException
Retrieves the identifiers of all the published models.

Returns:
list of model identifiers
Throws:
BioModelsWSException

getAllCuratedModelsId

public java.lang.String[] getAllCuratedModelsId()
                                         throws BioModelsWSException
Retrieves the identifiers of all the published curated models.

Returns:
list of model identifiers
Throws:
BioModelsWSException

getAllNonCuratedModelsId

public java.lang.String[] getAllNonCuratedModelsId()
                                            throws BioModelsWSException
Retrieves the identifiers of all the published non-curated models.

Returns:
list of model identifiers
Throws:
BioModelsWSException

getModelsIdByName

public java.lang.String[] getModelsIdByName(java.lang.String modelName)
                                     throws BioModelsWSException
Retrieves the models' identifiers which name includes the given keyword.

Parameters:
modelName - part of a model name
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByPerson

public java.lang.String[] getModelsIdByPerson(java.lang.String personName)
                                       throws BioModelsWSException
Retrieves the identifiers of all models which have a given person as author or encoder.

Parameters:
personName - author's or encoder's name
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByPublication

public java.lang.String[] getModelsIdByPublication(java.lang.String publicationIdOrText)
                                            throws BioModelsWSException
Retrieves the identifiers of all models related to one (or more) publication(s).

Parameters:
publicationIdOrText - publication identifier (PMID or DOI) or text which occurs in the publication's title or abstract
Returns:
list of model identifiers
Throws:
BioModelsWSException

getModelsIdByChEBIId

public java.lang.String[] getModelsIdByChEBIId(java.lang.String ChEBIId)
                                        throws BioModelsWSException
Retrieves the identifiers of all the models which are annotated with a given ChEBI term.

Parameters:
ChEBIId - identifier of a ChEBI term (e.g. CHEBI:4991)
Returns:
list of models identifiers
Throws:
BioModelsWSException

getSimpleModelsRelatedWithChEBI

public java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsRelatedWithChEBI()
                                                                                            throws BioModelsWSException
Retrieves all the models which are annotated with ChEBI terms.

Returns:
all models annotated with ChEBI terms, as a TreeMap (which uses ChEBI identifiers as keys)
Throws:
BioModelsWSException

getSimpleModelsByChEBIIds

public java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsByChEBIIds(java.lang.String[] ChEBIIds)
                                                                                      throws BioModelsWSException
Retrieves the models which are annotated with the given ChEBI terms.

Parameters:
ChEBIIds - identifiers of a ChEBI terms (e.g. CHEBI:4991)
Returns:
all models annotated with the provided ChEBI identifiers, as a TreeMap (which uses ChEBI identifiers as keys)
Throws:
BioModelsWSException

getModelsIdByChEBI

public java.lang.String[] getModelsIdByChEBI(java.lang.String text)
                                      throws BioModelsWSException
Retrieves the identifiers of all models which are associated to some ChEBI terms. This relies on the method 'getLiteEntity' of the ChEBI Web Services (cf. http://www.ebi.ac.uk/chebi/webServices.do).

Parameters:
text - ChEBI identifier (e.g. CHEBI:4991) or name or synonym
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByUniprotId

public java.lang.String[] getModelsIdByUniprotId(java.lang.String UniProtId)
                                          throws BioModelsWSException
Retrieves all the models which are annotated with a given UniProt record.

Parameters:
UniProtId - UniProt identifier (e.g. P12345)
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByUniprotIds

public java.lang.String[] getModelsIdByUniprotIds(java.lang.String[] UniProtIds)
                                           throws BioModelsWSException
Retrieves all the models which are annotated with the given UniProt records.

Parameters:
UniProtIds - list of UniProt identifiers (e.g. P12345)
Returns:
list of models identifiers
Throws:
BioModelsWSException

getSimpleModelsByUniprotIds

public java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsByUniprotIds(java.lang.String[] UniProtIds)
                                                                                        throws BioModelsWSException
Retrieves all the models which are annotated with the given UniProt records.

Parameters:
UniProtIds - list of UniProt identifiers (e.g. P12345)
Returns:
all the models annotated with the provided UniProt records, as a TreeMap (which uses UniProt identifiers as keys)
Throws:
BioModelsWSException

getModelsIdByUniprot

public java.lang.String[] getModelsIdByUniprot(java.lang.String text)
                                        throws BioModelsWSException
Retrieves all the models which are associated to the provided UniProt text.

Parameters:
text - free (UniProt based) text
Returns:
list of models identifiers
Throws:
BioModelsWSException

getSimpleModelsByReactomeIds

public java.util.Map<java.lang.String,java.util.List<SimpleModel>> getSimpleModelsByReactomeIds(java.lang.String[] ReactomeIds)
                                                                                         throws BioModelsWSException
Retrieves all the models which are annotated with the given Reactome records.

Parameters:
ReactomeIds - list of Reactome identifiers (e.g. REACT_1590)
Returns:
models annotated with the provided Reactome identifiers, as a TreeMap (which uses Reactome identifiers as keys)
Throws:
BioModelsWSException

getModelsIdByGOId

public java.lang.String[] getModelsIdByGOId(java.lang.String GOId)
                                     throws BioModelsWSException
Retrieves the models which are annotated with the given Gene Ontology term.

Parameters:
GOId - Gene Ontology identifier (e.g. GO:0006915)
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByGO

public java.lang.String[] getModelsIdByGO(java.lang.String text)
                                   throws BioModelsWSException
Retrieves the models which are associated to the provided Gene Ontology text.

Parameters:
text - free (GO based) text
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByTaxonomyId

public java.lang.String[] getModelsIdByTaxonomyId(java.lang.String taxonomyId)
                                           throws BioModelsWSException
Retrieves the models which are annotated with the given taxon.

Parameters:
taxonomyId - Taxonomy identifier (e.g. 9606)
Returns:
list of models identifiers
Throws:
BioModelsWSException

getModelsIdByTaxonomy

public java.lang.String[] getModelsIdByTaxonomy(java.lang.String text)
                                         throws BioModelsWSException
Retrieves the models which are associated to the provided Taxonomy text.

Parameters:
text - free (Taxonomy based) text
Returns:
list of models identifiers
Throws:
BioModelsWSException

getSubModelSBML

public java.lang.String getSubModelSBML(java.lang.String modelId,
                                        java.lang.String[] elementsIds)
                                 throws BioModelsWSException
Generates the minimal sub-model of a given model in the database including all selected components.

Parameters:
modelId - identifier of the model from which the sub-model will be extracted
elementsIds - identifiers of the selected elements. Currently only supports identifiers from compartments, species, and reactions.
Returns:
the sub-model encoded in SBML
Throws:
BioModelsWSException


Copyright © 2007-2012 BioModels.net
Last modified: 2012-04-23T10:20:37+0000