NIH | National Cancer Institute | NCI Wiki  

Connection to the LexEVS Grid Service

Java Code
        LexBIGServiceGridAdapter lbsg = new LexBIGServiceGridAdapter
    } catch( e){
        //Error Connecting
    } catch(org.apache.axis.types.URI.MalformedURIException e){
        //URL Syntax Error

Searching for concepts in NCI Thesaurus containing the string "Gene"

Java Code Snippet
    //Create a Connection to the Grid Service
    LexBIGServiceGrid lbs = new LexBIGServiceGridAdapter(gridServiceURL);
    //Set up the CodingSchemeIdentification object to define the Coding Scheme</font>
    CodingSchemeIdentification csid = new CodingSchemeIdentification();
    csid.setName("NCI Thesaurus");
    //Get the CodedNodeSet for that CodingScheme (This returns a CodedNodeSet Service Context)
    CodedNodeSetGrid cnsg = lbs.getCodingSchemeConcepts(csid, null);
    //getCodingSchemeConcepts is a Grid Service Call
    //Set the text to match
    MatchCriteria matchText = new MatchCriteria();
    //Define a SearchDesignationOption, if any
    SearchDesignationOption searchOption = new SearchDesignationOption();
    //Choose an algorithm to do the matching
    ExtensionIdentification matchAlgorithm = new ExtensionIdentification();
    //Chose a language
    LanguageIdentification language = new LanguageIdentification();

    //Restrict the CodedNodeSet
    cnsg.restrictToMatchingDesignations(matchText, searchOption, matchAlgorithm, language);
    //restrictToMatchingDesignations is a Grid Service Call
    //Create a SetResolutionPolicy to handle the details of Resolving the CodedNodeSet
    //Here, we will set the Maximum number of Concepts returned to 10.
    SetResolutionPolicy resolvePolicy = new SetResolutionPolicy();
    //Do the resolve
    ResolvedConceptReferenceList rcrlist = cnsg.resolveToList(resolvePolicy); 
    //resolveToList is a Grid Service Call
    //Use the returned ResolvedConceptReferenceList to print some details about the concepts found
    ResolvedConceptReference[] rcref = rcrlist.getResolvedConceptReference();
    for (int i = 0; i < rcref.length; i++) {


Request History Service

Java Code Snippet
     HistoryServiceGrid history = lbs.getHistoryService(org.LexGrid.LexBIG.DataModel.cagrid.CodingSchemeIdentification);

Request LexBIGService Metadata

Java Code Snippet
     LexBIGServiceMetadataGrid metadata = lbs.getServiceMetadata();

Request LexBIGService Convenience Methods

Java Code Snippet
     LexBIGServiceConvenienceMethodsGrid lbscm = lbs.getGenericExtensions(org.LexGrid.LexBIG.DataModel.cagrid.ExtensionIdentification);

LexBIGService Adapter

Java Code Snippet
 LexBIGService lbs = new LexBIGServiceAdapter("");

LexBIGService Grid Adapter

Java Code Snippet
LexBIGServiceGrid lbs = new LexBIGServiceGridAdapter("");