Package org.biopax.paxtools.normalizer
Class MiriamLink
java.lang.Object
org.biopax.paxtools.normalizer.MiriamLink
Singleton local MIRIAM data resolver with all methods static.
- Author:
- rodche
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringpackage name for jaxb to usestatic booleanstatic boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor: initialization of some parameters -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckRegExp(String identifier, String datatype) Checks if the identifier given follows the regular expression of its data type (also provided).static booleancontainsIdOrName(String searchKey) Check whether Miriam contains a data type record with this name (any synonym) or identifier (case insensitive)static booleancontainsUri(String searchUri) Check whether Miriam contains a data type record with this URI (case sensitive)static StringconvertUrn(String urn) Deprecated.static String[]getDataResources(String datatypeKey) Retrieves home page URLs of a datatype.static net.biomodels.miriam.Miriam.DatatypegetDatatype(String datatypeKey) Gets Miriam Datatype by its ID, Name, Synonym, or URI (URN/URL)static StringgetDataTypeDef(String datatypeKey) Retrieves the definition of a data type.static StringgetDataTypePattern(String datatypeKey) Retrieves the pattern (regular expression) used by the identifiers within a data type.static String[]Retrieves the internal identifier (stable and perennial) of all the data types (for example: "MIR:00000005").static String[]Retrieves the list of preferred names of all the data types available.static StringgetDataTypeURI(String datatypeKey) Retrieves the unique (official) URI of a data type (example: "urn:miriam:uniprot").static String[]getDataTypeURIs(String datatypeKey) Retrieves all the URIs of a data type, including all the deprecated ones (examples: "urn:miriam:uniprot", "http://www.uniprot.org/", "urn:lsid:uniprot.org:uniprot", ...).static StringgetIdentifiersOrgURI(String name, String id) Gets the Identifiers.org URI/URL of the entity (example: "http://identifiers.org/obo.go/GO:0045202").static String[]getLocations(String datatypeKey, String entityId) Retrieves the physical locationS (URLs) of web pageS providing knowledge about an entity.static StringRetrieves the preferred name of a data type.static String[]Retrieves all the synonyms (incl.static StringDeprecated.use getDataTypeURI insteadstatic StringgetOfficialDataTypeURI(net.biomodels.miriam.Miriam.Datatype datatype) Retrieves the unique (official) URI of a data type (example: "http://identifiers.org/uniprot").static net.biomodels.miriam.ResourcegetResource(String resourceId) Retrieves the resource by id (for example: "MIR:00100008" (bind) ).static StringgetResourceInstitution(String resourceId) Retrieves the institution which manages a resource (example: "European Bioinformatics Institute").static StringgetResourceLocation(String resourceId) Retrieves the location (or country) of a resource (example: "United Kingdom").static String[]Retrieves the internal identifier (stable and perennial) of all the resources (for example: "MIR:00100008" (bind) ).static StringRetrieves the current version of MIRIAM Web Services.static StringRetrieves the unique MIRIAM URI of a specific entity (example: "urn:miriam:obo.go:GO%3A0045202").static booleanisDeprecated(String uri) To know if a URI of a data type is deprecated.
-
Field Details
-
BINDING
package name for jaxb to use- See Also:
-
useObsoleteDatatypes
public static boolean useObsoleteDatatypes -
useObsoleteResources
public static boolean useObsoleteResources
-
-
Constructor Details
-
MiriamLink
protected MiriamLink()Default constructor: initialization of some parameters
-
-
Method Details
-
getServicesVersion
Retrieves the current version of MIRIAM Web Services.- Returns:
- Current version of the Web Services
-
getDataTypeURI
Retrieves the unique (official) URI of a data type (example: "urn:miriam:uniprot").- Parameters:
datatypeKey- - ID, name, synonym, or (incl. deprecated) URI (URN or URL) of a data type (examples: "UniProt")- Returns:
- unique URI of the data type
- Throws:
IllegalArgumentException- when datatype not found
-
getDataTypeURIs
Retrieves all the URIs of a data type, including all the deprecated ones (examples: "urn:miriam:uniprot", "http://www.uniprot.org/", "urn:lsid:uniprot.org:uniprot", ...).- Parameters:
datatypeKey- name (or synonym), ID, or URI (URN or URL) of the data type (examples: "ChEBI", "UniProt")- Returns:
- all the URIs of a data type (including the deprecated ones)
- Throws:
IllegalArgumentException- when datatype not found
-
getResourceLocation
Retrieves the location (or country) of a resource (example: "United Kingdom").- Parameters:
resourceId- identifier of a resource (example: "MIR:00100009")- Returns:
- the location (the country) where the resource is managed
-
getResourceInstitution
Retrieves the institution which manages a resource (example: "European Bioinformatics Institute").- Parameters:
resourceId- identifier of a resource (example: "MIR:00100009")- Returns:
- the institution managing the resource
-
getURI
Retrieves the unique MIRIAM URI of a specific entity (example: "urn:miriam:obo.go:GO%3A0045202").- Parameters:
name- - name, URI/URL, or ID of a data type (examples: "ChEBI", "MIR:00000005")id- identifier of an entity within the data type (examples: "GO:0045202", "P62158")- Returns:
- unique standard MIRIAM URI of a given entity
- Throws:
IllegalArgumentException- when datatype not found
-
getDataTypeDef
Retrieves the definition of a data type.- Parameters:
datatypeKey- - ID, name or URI (URN or URL) of a data type- Returns:
- definition of the data type
- Throws:
IllegalArgumentException- when datatype not found
-
getLocations
Retrieves the physical locationS (URLs) of web pageS providing knowledge about an entity.- Parameters:
datatypeKey- name (can be a synonym), ID, or URI of a data type (examples: "Gene Ontology", "UniProt")entityId- identifier of an entity within the given data type (examples: "GO:0045202", "P62158")- Returns:
- physical locationS (URL templates) of web pageS providing knowledge about the given entity
- Throws:
IllegalArgumentException- when datatype not found
-
getDataResources
Retrieves home page URLs of a datatype.- Parameters:
datatypeKey- - name (can be a synonym), ID, or URI (URL or URN) of a data type- Returns:
- array of strings containing all the address of the main page of the resources of the data type
- Throws:
IllegalArgumentException- when datatype not found
-
isDeprecated
To know if a URI of a data type is deprecated.- Parameters:
uri- (URN or URL) of a data type- Returns:
- answer ("true" or "false") to the question: is this URI deprecated?
-
getDataTypePattern
Retrieves the pattern (regular expression) used by the identifiers within a data type.- Parameters:
datatypeKey- data type ID, name (or synonym), or URI (URL or URN)- Returns:
- pattern of the data type
- Throws:
IllegalArgumentException- when datatype not found
-
getName
Retrieves the preferred name of a data type.- Parameters:
datatypeKey- URI (URL or URN), ID, or nickname of a data type- Returns:
- the common name of the data type
- Throws:
IllegalArgumentException- when not found
-
getNames
Retrieves all the synonyms (incl. the preferred name) of a data type.- Parameters:
datatypeKey- ID, any name, or URI (URL or URN) of a data type- Returns:
- all the data type's synonyms (incl. preferred name)
-
getDataTypesName
Retrieves the list of preferred names of all the data types available.- Returns:
- list of names of all the data types
-
getDataTypesId
Retrieves the internal identifier (stable and perennial) of all the data types (for example: "MIR:00000005").- Returns:
- list of the identifier of all the data types
-
getOfficialDataTypeURI
Deprecated.use getDataTypeURI insteadRetrieves the official URI (it will always be URN) of a data type corresponding to the deprecated one.- Parameters:
uri- deprecated URI (URN or URL) of a data type- Returns:
- the official URI of a data type corresponding to the deprecated one
-
checkRegExp
Checks if the identifier given follows the regular expression of its data type (also provided).- Parameters:
identifier- internal identifier used by the data typedatatype- name, synonym or URI of a data type- Returns:
- "true" if the identifier follows the regular expression, "false" otherwise
- Throws:
IllegalArgumentException- when datatype not found
-
getOfficialDataTypeURI
Retrieves the unique (official) URI of a data type (example: "http://identifiers.org/uniprot").- Parameters:
datatype- net.biomodels.miriam.Miriam.Datatype- Returns:
- URI
-
getDatatype
Gets Miriam Datatype by its ID, Name, Synonym, or URI (URN/URL)- Parameters:
datatypeKey- - a datatype ID, name, synonym, or URI- Returns:
- MIRIAM Datatype bean
- Throws:
IllegalArgumentException- when not found
-
getResourcesId
Retrieves the internal identifier (stable and perennial) of all the resources (for example: "MIR:00100008" (bind) ).- Returns:
- list of the identifiers of all data types
-
getResource
Retrieves the resource by id (for example: "MIR:00100008" (bind) ).- Parameters:
resourceId- - resource identifier (similar to, but not a data type identifier!)- Returns:
- MIRIAM Resource bean
-
containsIdOrName
Check whether Miriam contains a data type record with this name (any synonym) or identifier (case insensitive)- Parameters:
searchKey- - ID, name, or synonym (case insensitive)- Returns:
- true/false
-
containsUri
Check whether Miriam contains a data type record with this URI (case sensitive)- Parameters:
searchUri- - URI (case sensitive)- Returns:
- true/false
-
convertUrn
Deprecated.this method appliesURLDecoder.decode(String)to the last part of the URN, which may not always work as expected (test yours!)Converts a MIRIAM URN into its equivalent Identifiers.org URL.- Parameters:
urn- - an existing Miriam URN, e.g., "urn:miriam:obo.go:GO%3A0045202"- Returns:
- the Identifiers.org URL corresponding to the data URN, e.g., "http://identifiers.org/obo.go/GO:0045202"
- See Also:
-
getIdentifiersOrgURI
Gets the Identifiers.org URI/URL of the entity (example: "http://identifiers.org/obo.go/GO:0045202").- Parameters:
name- - name, URI/URL, or ID of a data type (examples: "ChEBI", "MIR:00000005")id- identifier of an entity within the data type (examples: "GO:0045202", "P62158")- Returns:
- Identifiers.org URL for the id
- Throws:
IllegalArgumentException- when datatype not found
-
URLDecoder.decode(String)to the last part of the URN, which may not always work as expected (test yours!)