![JAR search and dependency download from the Maven repository](/logo.png)
org.bridgedb.uri.ws.server.3.1.4.source-code.api.vm Maven / Gradle / Ivy
The newest version!
Supported services include:
- mapID
- List the Xrefs that map to these Xrefs
- xrefExists
- State if the Xref is know to the Mapping Service or not
- freeSearch
- Searches for Xrefs that have this id.
- getCapabilities
- Gives the Capabilitles as defined by BridgeDb.
- Close()
- Not supported as clients should not be able to close the server.
- isConnected
- Not supported as Close() is not allowed
- isFreeSearchSupported
- Returns True as freeSearch and URLSearch are supported.
- getSupportedSrcDataSources
- Returns Supported Source (BridgeDb) DataSource(s).
- getSupportedTgtDataSources
- Returns Supported Target (BridgeDb) DataSource(s).
- isMappingSupported
- States if two DataSources are mapped at least once.
- property/key
- Returns The property value for this key.
- getKeys
- Returns The keys and their property value.
- map
- List the full mappings to this URI (or Xref)
- mapUri
- List the URIs that map to this/these URIs
- mapUriRDF
- Same data as mapURI but presented as RDF.
- mapBySet
- DEPRECATED: Use map which gives the required information and more.
- mapBySetRDF
- DEPRECATED: Use mapUriRDF which gives the required information.
- UriExists
- State if the URI is know to the Mapping Service or not
- UriSearch
- Searches for URIs that have this ending.
- dataSource
- Returns the DataSource and associated UriSpace(s) with a specific id
- toUris
- Returns the URIs associated with a Xref (specified as id and code)
- toXref
- Retrns the Xref for this URI
- SourceInfos
- Brings up a table of all the Sources in the system.
- SourceTargetInfos
- Brings up a table of all the Targets for a particular Source.
- mappingSet
- Brings up a table of all the mappings in the system for a particular Source and Target.
- mappingSet/id
- Provides the metadata for one mapping set
- mappingSetRDF
- Same data as mappingSet/id but presented as RDF.
- mappingSetRDF/id
- Same data as mappingSet/id but presented as RDF.
- Lens
- Brings up a list of the Supported Lens
- LensRDF
- Brings up the supported Lens in RDF format
Parameters
The following parameters may be applicable to the methods.
See the individual method description for which are required and which are optional.
Their behaviour is consistent across all methods, unless stated otherwise
BridgeDb Parameters
id and code
- Limits the results to ones with this/these Xrefs.
- code is the SystemCode of the Xref's DataSource)
- id is the identifier part of the Xref
- Typically There can be multiple "id" and "code" values
- There must be at least one of each.
- There must be the same number of each.
- They will be paired by order.
- If multiple Xref's have the same DataSource their code must be repeated.
- Note: Other methods may obtain a different id by following the method name with a slash // id. These do not require a "code"
key
- Selects which property to return.
- Only one key parameter is supported.
limit
- Limits the number of results.
- Must be a positive Integer in String Format
- If less than limit results are available limit will have no effect.
- Only one limit parameter is supported.
- If no limit is set a default limit will be used.
- If too high a limit is set the default limit will be used.
- To obtain a full data dump please contact the admins.
sourceCode
- Limits the results to ones with those Source Xref's DataSource has this sysCode.
- String Format
- Typically there must be exactly one sourceCode when used.
targetCode
- Limits the results to ones with those Target Xref's DataSource has this sysCode.
- String Format
- Typically there can but need not be more than one.
text
- A bit of text that will be searched for.
- String Format
- Only one text parameter is supported.
- Note this is for searching for text in Identifiers not for mapping between text and Identifiers.
Ops Extension Parameters
Uri
- Limits the results to ones with this URI.
- String Format
- Do NOT include the < and > seen around URIs in RDF
- Only one Uri parameters is supported.
baseUri
- Used for methods that return RDF.
- Changes the base of any URIs that refer to the IMS
- Should be used if the IMS services are used Vai another service
- The baseUri should include the service name and the final / but not the method name
- So if calling http://localhost:8080/BridgeDb/mapUriRDF?... the baseUri would be http://www.example.com/MyBridgeDb/
- This allows http://www.example.com/MyBridgeDb/ to forward any calls to its BridgeDb service.
lensUri
- Determines which types of results are returned
- If not provided the default lens is used. Except in the Lens
- Use Lens method to get a list of the Lens.
lensGroup
- If not provided the public groups is used
- A list of the current groups is available from /BridgeDb/lensGroup
linksetInfo
- Allows the addition of statements about the linkset(s) used
- boolean value if not set false is assumed
- Only works if is null or supports context.
- Warning: Setting linksetInfo will increase the number of statements returned by about a factor of 10
- Warning: Setting linksetInfo will increase response time considerably
- Only use if provenance data is really required.
overridePredicateURI
- Override the link predicate URI returned by mapUri and mapUriRDF
- The default (if the parameter is not given or is an empty string) is to return links using the predicates from the original linksets
- Parameter must be an absolute URI of the term to use, e.g.
http://www.w3.org/2004/02/skos/core#exactMatch
or
http://www.w3.org/2002/07/owl#sameAs
- If combined with linksetInfo=
true
, the returned linkset info will describe
derived linksets with the overridden void:linkPredicate
graph
- Limits the results to ones required for this OpenRdf context/graph.
- This works by looking up the required targetUriPattern(s) in the graph.properties configuration file.
- There can only one parameter graph and ONLY if NO paramters targetUriPattern are supplied.
targetUriPattern
- Limits the results to ones with URIs with this pattern.
- The URI pattern must match on of the Patterns specified in the System.
- String Format
- Do NOT include the < and > seen around URIs in RDF
- There are two supported formats
- prefix$idpostfix
- Only selects URIs which have exactlty that pattern
- Must be exactly a known pattern or an exception is thrown.
- Where $id represent the id part of the URI
- The whole postfix part must be provided.
- It the pattern has nothing after the $id no postfix is included.
- startsWith
- Returns any URIs whose prefixt start with the provided pattern.
- Can not include any part of the id section of the URI.
- For example targetUriPattern=http://identifiers.org returns all indentifiers.org URIs
- No wildcard or regex support is currently available.
- An Empty String is considered a null and returns an empty set
- Typically there can but need not be more than one.
- Each TargetURI is added as a new paramter
- In the format targetUriPattern=target1&targetUriPattern=target12&
- See: mapUri for a working example
targetCode
- Acts in exactly the same way as non URI based methods.
- Note: If both targetUriPattern and targetCode are specified the result is the union of results of running this method twice with each parameter individually.
- String Format
- Typically there can but need not be more than one.
rdfFormat
- Specifies the RDF format that should be used.
- WARNING: Not all RDF formats supports contexts/graphs.
- So some formats will not have the mappings in Set contexts.
- String Format
- Legal values are:
#foreach ($rdfFormat in $rdfFormats)
- $rdfFormat.getName()
#if ($rdfFormat.supportsContexts())
(Supports Context)
#end
#end
- Only one format can be specified.
- The default format $rdfDefaultFormat is used if MediaType.TEXT_PLAIN is requested
includeXrefResults
- Ask for the results to include Bridgb Xref results.
- Only effects calls that would not naturally return Xref results
- Always considered true for any call with
- id and code paramtered set
- Always considered true for any call with targetCode paramters set
- For transitives also allows the Via information to be added.
- In all other cases defaults to false.
includeUriResults
- Ask for the results to include URI results.
- Only effects calls that would not naturally return URI results
- Always considered true for any call with Uri paramter set
- Always considered true for any call with graph paramters set
- Always considered true for any call with targetUriPattern paramters set
- In all other cases defaults to false.
Implementations of BridgeDb's IDMapper methods
mapID
- List the Xrefs that map to these Xrefs
- Implements: Map<Xref, Set<Xref>> mapID(Collection<Xref> srcXrefs, DataSource... tgtDataSources)
- Implements: Set<Xref> mapID(Xref srcXrefs, DataSource... tgtDataSources)
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- Required arguements: (Only Source Xref considered)
- Optional arguments
- Xref Example:
mapID?id=$id2&code=$code2&id=$id1&code=$code1
- Target Code:
mapID?id=$id2&code=$code2&id=$id1&code=$code1&targetCode=$targetCode1
xrefExists
- Implements: boolean xrefExists(Xref xref)
- State if the Xref is know to the Mapping Service or not
- This method is available for media types XML and JSON.
- Status 204 (no Content) is never returned.
- There is not media type HTML.
- Required arguements: (Considers both Source and target Xrefs
- Example:
xrefExists?id=$id2?id=Cs
freeSearch
- Searches for Xrefs that have this id.
- Implements: Set<Xref> freeSearch (String text, int limit)
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML result in a framed page.
- An warning page is returned if no data available.
- Required arguements:
- Example:
freeSearch?text=$id2&limit=5
getCapabilities
- Implements: IDMapperCapabilities getCapabilities()
- Gives the Capabilitles as defined by BridgeDb.
- This method is available for media types XML and JSON.
- Status 204 (no Content) is never returned.
- There is not media type HTML.
- Example: getCapabilities
Other IDMapper Functions
- Close()
- Not supported as clients should not be able to close the server.
- isConnected
- Not supported as Close() is not allowed
Implementations of BridgeDb's IDMapperCapabilities methods
isFreeSearchSupported
- Implements: boolean isFreeSearchSupported()
- Returns True as freeSearch and URISearch are supported.
- This method is available for media types XML and JSON.
- Status 204 (no Content) is never returned.
- There is not media type HTML.
- Example: isFreeSearchSupported
getSupportedSrcDataSources
- Implements: Set<DataSource> getSupportedSrcDataSources()
- Returns Supported Source (BridgeDb) DataSource(s).
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML result in a framed page.
- An warning page is returned if no data available.
- Example: getSupportedSrcDataSources
getSupportedTgtDataSources
- Implements: Set<DataSource> getSupportedTgtDataSources()
- Returns Supported Target (BridgeDb) DataSource(s).
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- Example: getSupportedTgtDataSources
isMappingSupported
- States if two DataSources are mapped at least once.
- Implements: boolean isMappingSupported(DataSource src, DataSource tgt)
- This method is available for media types XML and JSON.
- Status 204 (no Content) is never returned.
- There is not media type HTML.
- Required arguements: (One of each)
- Example:
isMappingSupported?sourceCode=$sourceCode1&targetCode=$targetCode1
property/key
- Implements: String getProperty(String key)
- Returns The property value for this key.
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available
- Required arguements:
- Place the actual key after the /
- Example: property/LastUpdates
getKeys
- Implements: Set<string> getKeys()
- Returns The keys and their property value.
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- Example: getKeys
URI based methods
map
- List the full mappings to this URI or Xref
- WARNING: Providing both URI and Xref parameters always causes an Exception. Even if they match!
- Note: it is not recommened to use both targetCode
and targetUriPattern.
If both are supplied the result is the union of the calls with each individually.
- Note: it is not allowed to use both graph
and targetUriPattern.
If both are supplied an error is thrown.
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- Required arguements:
- Optional arguments
- Xref Example:
map?id=$id2&code=$code2&id=$id1&code=$code1
- Target Code:
map?id=$id2&code=$code2&id=$id1&code=$code1&targetCode=$targetCode1
- With Uri data:
map?id=$id2&code=$code2&id=$id1&code=$code1&targetCode=$targetCode1&includeUriResults=true
- 1 URI: map?Uri=$uri2
- 2 URIs:
map?Uri=$uri2&Uri=$uri1
- The by graph and by targetUriPattern methods provide the same result as $graph
which has been set to the just the single targetUriPattern targetUriSpace2
- With Graph:
map?Uri=$uri2&graph=$graph
- 1 Target Pattern:
map?Uri=$uri2&targetUriPattern=targetUriSpace2
- 2 Target Patterns:
map?Uri=$uri2&targetUriPattern=$sourceUriSpace2&targetUriPattern=$targetUriSpace2
- Starts with Pattern:
map?Uri=$uri2&targetUriPattern=http://identifiers.org
- All Lens:
map?Uri=$uri2&lensUri=All
- With Xref:
map?Uri=$uri2&includeXrefResults=true
mapUri
- List the URIs that map to this URI(s)
- Note: it is not allowed to use both graph and targetUriPattern.
If both are supplied an error is thrown.
- This method is available for media types XML and JSON.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will return XML Format.
- An warning page is returned if no data available.
- Required arguements:
- Uri
- In Contrast to other methods multiple values may be provided
- Optional arguments
- Note: The HTML version of this call is actually based on map
- The id of the mapping set(s) used is added
- The via (intermediate) values of transitives are shown.
- 1 URI: mapUri?Uri=$uri2
- 2 URIs:
mapUri?Uri=$uri2&Uri=$uri1
- The by graph and by targetUriPattern methods provide the same result as $graph
which has been set to the just the single targetUriPattern targetUriSpace2
- With Graph:
mapUri?Uri=$uri2&graph=$graph
- 1 Target Pattern:
mapUri?Uri=$uri2&targetUriPattern=targetUriSpace2
- 2 Target Patterns:
mapUri?Uri=$uri2&targetUriPattern=$sourceUriSpace2&targetUriPattern=$targetUriSpace2
- Starts with Pattern:
mapUri?Uri=$uri2&targetUriPattern=http://identifiers.org
- All Lens:
mapUri?Uri=$uri2&lensUri=All
mapUriRDF
- Same data as mapUri but presented at RDF.
- This method is available for media type text/plain.
- Status 204 (no Content) is never returned.
- Request for media type HTML will return same text in a window.
- Empty RDF is returned if no data available.
- Includes all the same arguements as :mapUri
- Plus
- As Statements:
- As RDF
- The default format $rdfDefaultFormat is used if MediaType.TEXT_PLAIN is requested
#foreach ($rdfFormat in $rdfFormats)
- $rdfFormat.getName():
mapUriRDF?Uri=$uri2&rdfFormat=$rdfFormat.getName()
#end
- Note: linksetInfo is ignored if rdfFormat does not support context!
- With info:
- mapUriRDF?Uri=$uri2&linksetinfo=true
#foreach ($rdfFormat in $rdfFormats)
#if($rdfFormat.supportsContexts())
- $rdfFormat.getName():
mapUriRDF?Uri=$uri2&rdfFormat=$rdfFormat.getName()&linksetInfo=true
#end
#end
- With baseuri:
- Note: All the examples shown in
- mapUri work with mapUriRDF too!
mapBySet
- DEPRECATED: Use map which gives the required information and more
mapBySetRDF
- DEPRECATED: Use mapUriRDF which gives the required information.
UriExists
- State if the URI is know to the Mapping Service or not
- This method is available for media types XML and JSON.
- Status 204 (no Content) is never returned.
- There is not media type HTML.
- Required arguements:
- Uri
- Currently limited to single URI
- Example:
UriExists?Uri=$uri2
UriSearch
- Searches for URIs that have this ending.
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- Required arguements:
- Example: UriSearch?text=$id2&limit=5
dataSource/id
- Obtain a dataSource
- This method is available for media types XML and JSON.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will return XML Format.
- An warning page is returned if no data available.
- Required arguements:
- Returns the DataSource and associated UriSpace(s) with a specific id.
- Example: dataSource/$code1
toUris
- Returns the URIs associated with a Xref
- This method is available for media types XML and JSON.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will return XML Format.
- An warning page is returned if no data available.
- Required arguements:
- Example: toUris?id=$id2&code=$code2
toXref
- Retrns the Xref for this URI
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- Required arguements:
- Example: toXref?Uri=$uri2
Support methods
SourceInfos
- Brings up a table of all the Sources in the system.
- Optional arguments:
- Example (Default Lens): SourceInfos
- Example (All Lens): SourceInfos?lensUri=All
SourceTargetInfos
- Brings up a table of all the Targets for a particular Source.
- Required arguement:
- Optional arguments
- Example (Default Lens): SourceTargetInfos?sourceCode=$sourceCode1
- Example (All Lens): SourceTargetInfos?sourceCode=$sourceCode1&lensUri=All
mappingSet
- Brings up a table of all the mappings in the system for a particular Source and Target.
- Or Brings up the information for one mapping.
- This method is available for media types XML, JSON and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- For a Single Mapping set append /Id.
- id can be a single integer
- Example (one Set): mappingSet/1
- Or a Transitive mapping as list of integers separated by _ (underrscore)
- Note: No check is done to see if the list of integers makes a legal transitive.
- Transitive: mappingSet/1_3
- For a Summary table for a Source Target pair.
- Required arguements:
- sourceCode
- targetCode
- Note: These are required arguements Since April 2014 as this method did not scale well
- Optional arguments
- Example (Default Lens):
mappingSet?sourceCode=$sourceCode1&targetCode=$targetCode1
- Example (All Lens):
mappingSet?sourceCode=$sourceCode1&targetCode=$targetCode1&lensUri=All
- Example (XML version):
mappingSetXML?sourceCode=$sourceCode1&targetCode=$targetCode1
- Example (All Lens XML version):
mappingSetXML?sourceCode=$sourceCode1&targetCode=$targetCode1
mappingSetRDF
- Brings up the information for one mapping.
- This method is available for media types TEXT and HTML.
- Status 204 (no Content) is return if no data available.
- Request for media type HTML will a html formated page.
- An warning page is returned if no data available.
- To use as an Identifier append /Id.
- With media type TEXT the default RDF format is used
- Single mappingSet: mappingSetRDF/1
- Transitive: mappingSetRDF/1_3
- Note: /id form does not support any optiona arguements
- With extra Parameters
- Required arguements:
- id (/id paramter)
- Optional arguments
- Note: sourceCode, targetCode and lensUri are NOT supported by this method
- As Statements:
- As RDF:
#foreach ($rdfFormat in $rdfFormats)
- $rdfFormat.getName():
mappingSetRDF?id=1&rdfFormat=$rdfFormat.getName()
#end
- With baseuri:
- mappingSetRDF?id=1&baseUri=http://www.example.com/myBridgeDB/
#foreach ($rdfFormat in $rdfFormats)
- $rdfFormat.getName():
mappingSetRDF?id=1&rdfFormat=$rdfFormat.getName()&baseUri=http://www.example.com/myBridgeDB/
#end
graphviz
This method will now always throw an Exception! It did not scale.
Lens
- Brings up a list of the Supported Lens
- Optional arguments:
- Examples:
- No Parameter call Lens
- Get all the Lenses Lens?lensGroup=all
- Get all the default Lens. Lens?lensUri=Default
LensRDF
- Same data as Lens but presented at RDF.
- Required Argument:
- Optional arguments:
- TriX Examples:
- No Parameter call LensRDF?rdfFormat=TriX
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=TriX
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=TriX
- TriG Examples:
- No Parameter call LensRDF?rdfFormat=TriG
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=TriG
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=TriG
- N-Quads Examples:
- No Parameter call LensRDF?rdfFormat=N-Quads
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=N-Quads
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=N-Quads
- N-Triples Examples:
- No Parameter call LensRDF?rdfFormat=N-Triples
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=N-Triples
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=N-Triples
- RDF/JSON Examples:
- No Parameter call LensRDF?rdfFormat=RDF/JSON
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=RDF/JSON
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=RDF/JSON
- RDF/XML Examples:
- No Parameter call LensRDF?rdfFormat=RDF/XML
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=RDF/XML
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=RDF/XML
- N3 Examples:
- No Parameter call LensRDF?rdfFormat=N3
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=N3
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=N3
- Turtle Examples:
- No Parameter call LensRDF?rdfFormat=Turtle
- Get all the Lenses LensRDF?lensGroup=all&rdfFormat=Turtle
- Get all the default Lens. LensRDF?lensUri=Default&rdfFormat=Turtle
© 2015 - 2025 Weber Informatics LLC | Privacy Policy