NIH | National Cancer Institute | NCI Wiki  

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table 4.2 The following table lists the NCICB/caBIG Libraries.

Library

Associated JARs

caGrid Software Libraries

caGrid-ServiceSecurityProvider-client-1.2.jar
caGrid-ServiceSecurityProvider-common-1.2.jar
caGrid-ServiceSecurityProvider-stubs-1.2.jar
caGrid-core-1.2.jar
caGrid-metadata-common-1.2.jar
caGrid-metadata-data-1.2.jar
caGrid-metadata-security-1.2.jar
caGrid-metadatautils-1.2.jar

EVS API Libaries

evsapi42-beans.jar
evsapi42-framework.jar

LexEVS Grid Service Client Library

LexEVSGridService-client.jar

LexEVS Grid Service Stubs

LexEVSGridService-stubs.jar

LexEVS Grid Service Common

LexEVSGridService-common.jar

LexEVS Grid Service Service

LexEVSGridService-service.jar

LexEVS Grid Service Tests

LexEVSGridService-tests.jar

caCORE SDK Library

sdk-client-framework.jar

LexEVS API

lexbig.jar

Custom Castor Serializer

castor-bean-serializer.jar

Downloads

For your convenience, the required libraries are available for download here:

https://gforge.nci.nih.gov/docman/view.php/491/14401/lexevs42-gridsrvc-jars.jar.

In order to To programmatically access the LexEVS API Grid Service, these libraries need to be added to your local classpath.

Code Examples

Example

...

Client and Service Calls and SOAP

...

Messages

See http://gforge.nci.nih.gov/docman/view.php/491/14252/TestClient.zip

Example API usage

Example 1: Searching for concepts in NCI Thesaurus containing the string "Gene"

Include Page
LexEVS:SearchingForConcepts Snippet
LexEVS:SearchingForConcepts

...

Snippet

Error Handling

Error Connecting to LexEVS Grid Service

When connecting through the Java Client, java.net.ConnectException and , an org.apache.axis.types.URI.MalformedURIException may be thrown upon an unsuccessful attempt to connect.

A MalformedURIException is thrown in the case if a poorly-formed URL string. In this case, the exception is thrown before an attempt to connect is even made.

If the URL is well-formed, proper connection is tested. If the connection attempt fails, a ConnectException is thrown containing the reason for the failure.

Include Page
LexEVS:LexGridServiceConnection

...

Snippet
LexEVS:LexGridServiceConnection Snippet

This example shows a typical connection to the LexEVS Grid Service, with the two potential Exceptions being caught and handled as necessary.

LexEVS Errors

LexEVS errors will be forwarded through the Distributed LexEVS layer and then on to the Grid layer. Input parameters, along with any other LexEVS (or Distributed LexEVS) errors will be detected on the server, not the client, and forwarded. All Generic LexEVS (or Distributed LexEVS) errors will be forwarded via a RemoteException, with the cause of the error and underlying LexEVS error message included.

Invalid Service Context Access

Service Context Services are not meant to be called directly. If the client attempts to do so, an org.LexGrid.LexBIG.cagrid.LexEVSGridService.CodedNodeSet.stubs.types.InvalidServiceContextAccess Exception will be thrown. This indicates a call was made to a Service Context without obtaining a Service Context Reference via the Main Service (see the above section Service Contexts and State for more information).

Security Issues

LexEVS Grid Service Security

Certain vocabulary content accessible through the LexEVS Grid Service may require extra authorization to access. Each client is required to supply its own access credentials via Security Tokens. These Security Tokens are implemented by a SecurityToken object:<font color="000FFF">Name: SecurityToken
Namespace:

Code Block

Name: SecurityToken
Namespace: gme://caCORE.caCORE/3.2/gov.nih.nci.evs.security

...


Package: gov.nih.nci.evs.

...

security

Accessing Secure Content

A client establishes access to a secured vocabulary via the following Grid Service Calls:Step 1:

  1. Connect to the LexEVS caGrid Service
    Code Block
    LexBIGServiceGrid lbs = new LexBIGServiceGridAdapter(

...

  1. url);

...

  1. Build an org.LexGrid.LexBIG.DataModel.cagrid.CodingSchemeIdentification to hold the Coding Scheme name.
    Code Block
    CodingSchemeIdentification

...

  1.  codingScheme = new CodingSchemeIdentification();

...

  1. 
    codingScheme.setName

...

  1.  "codingScheme"

...

  1. ;

...

  1. Build

...

  1. a gov.nih.nci.evs.security.SecurityToken containing the security information for the desired Coding Scheme.

...

  1. SecurityToken token = new SecurityToken ();
    token.setAccessToken(

...

  1. "

...

  1. securityToken"

...

  1. );

...

  1. Code Block
    
    # Invoke the LexEVS caGrid service as follows: 
    
    LexBIGServiceGrid lbsg = lbs.setSecurityToken(codingScheme, token);
    Code Block

...

  1. This will return a reference to a new "LexBIGServiceGrid" instance that is associated with the security properties that were passed in.

...

Info
titleNote

It is important to note that the Grid Service

...

setSecurityToken

...

returns an

...

{{org.LexGrid.LexBIG.cagrid.LexEVSGridService.stubs.types
.LexEVSGridServiceReference.LexEVSGridServiceReference

...

}} object. This reference must be used to access the secured vocabularies.

Implementation

Each call to "setSecurityToken" sets up a secured connection to Distributed LexEVS with the access privileges included in the SecurityToken parameter. The LexEVSGridServiceReference that is returned to the client contains a unique key identifier to the secure connection that has been created on the server. All subsequent calls the client makes through this LexEVSGridServiceReference will be made securely. If additional SecurityTokens are passed in through the "setSecurityToken" Grid Service, the additional security will be added and maintained.

...

For complete documentation on caGrid Data Services, see caGrid Data Service Documentation

Querying

...

the System

To query the LexEVS Data Grid Service, use the standard caGrid CQL query method to compose queries. See caGrid Data Service API Documentation for more information.

Example LexEVS queries follow.

Query for a Concept with a

...

Specific Code

  • Example: Concept: C12345
Include Page
LexEVS:DataGridQueryByCode Snippet
LexEVS:DataGridQueryByCode Snippet

Query for a Concept with

...

Specific Presentation Text

  • Example: A concept with a namespace 'SNOMED Clinical Terms' that contains a Presentation equal to 'Heart'

...