NIH | National Cancer Institute | NCI Wiki  

WIKI MAINTENANCE NOTICE

NCI Wiki will be will be undergoing scheduled maintenance on Monday, June 23rd between 5:00 and 6:00 PM ET.
Wiki will remain available, but users may experience screen refreshes or HTTP 502 errors during the maintenance period. If you encounter these errors, wait 1-2 minutes, then refresh your page.
As a precautionary measure, editors should ensure all work is saved prior to the maintenance period.

If you have any questions or concerns, contact the CBIIT Atlassian Management Team.

Create content

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagejava
			//Instantiate the search extension
         	LexBIGService lbsvc = LexBIGServiceImpl.defaultInstance();
         	SourceAssertedValueSetSearchExtensionImpl assertedVSsvc = null;
       		try {
        	assertedVSsvc = (SourceAssertedValueSetSearchExtensionImpl) lbsvc
                   .getGenericExtension("AssertedValueSetSearchExtension");
    		} catch (LBException e) {
        	e.printStackTrace();
    		}
			//Search for results based on an exact match of the unique identifier of the value set member
	        ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("C48323", null, null, MatchAlgorithm.CODE_EXACT,
                false, false);
			while(itr.hasNext()){
				ResolvedConceptReference ref = itr.next();
				System.out.println("description: " + ref.getEntityDescription().getContent()):
			}
			//Search for results based on an exact match of the preferred text designation of the value set member
	        ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("Black", null, null,
                MatchAlgorithm.PRESENTATION_EXACT, false, false);
			while(itr.hasNext()){
				ResolvedConceptReference ref = itr.next();
				System.out.println("description: " + ref.getEntityDescription().getContent()):
			}

            //Search for results based on an containing match of the preferred text designation of the value set member
            ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("Blinding", null, null,
                MatchAlgorithm.PRESENTATION_CONTAINS, false, false);
            while(itr.hasNext()){
                ResolvedConceptReference ref = itr.next();
                System.out.println("description: " + ref.getEntityDescription().getContent()):
            }

			//Search for results based on an lucene query parser match of the preferred text designation of the value set member
            ResolvedConceptReferencesIterator itr = assertedVSsvc.
                search("BlindingWhite", null, null,
                MatchAlgorithm.LUCENE, false, false);
            while(itr.hasNext()){
                ResolvedConceptReference ref = itr.next();
                System.out.println("description: " + ref.getEntityDescription().getContent()):
            }

		    //Search for results based on an exact match of some property of the value set member
			//Also, restrict the search to a given value set designation
			CodingSchemeReference csRef = new CodingSchemeReference();
        	csRef.setCodingScheme("http://evs.nci.nih.gov/valueset/FDA/C54453");
        	csRef.setVersionOrTag(Constructors.createCodingSchemeVersionOrTagFromVersion("0.1.5.1"));
        	ResolvedConceptReferencesIterator itr = assertedVSsvc.search("Black", csRef,  MatchAlgorithm.PROPERTY_EXACT);
			while(itr.hasNext()){
				ResolvedConceptReference ref = itr.next();
				System.out.println("description: " + ref.getEntityDescription().getContent()):
			}