NIH | National Cancer Institute | NCI Wiki  


Please be advised that NCI Wiki will be will be undergoing maintenance on Monday, June 24th between 1000 ET and 1100 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.

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

Java Code Snippet
       // Create a basic service object for data retrieval
       LexBIGServiceImpl lbs = LexBIGServiceImpl.defaultInstance();
       // Create a list of unique references (concept codes) for this coding scheme.
       // Parameters:  
       //       A String array initialized with a single concept code
       //       The name of the target Coding Scheme.
       ConceptReferenceList crefs = ConvenienceMethods.createConceptReferenceList( 
                       new String[], SAMPLE_SCHEME);
       // Initialize a coding scheme version object the version of the
       // sample scheme.
       CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
       // Initialize a CodedNodeSet Object with all possible concepts in our sample coding
       // scheme, then restrict the node set to a single node using restrictToCodes(crefs)
       CodedNodeSet nodes = lbs.getCodingSchemeConcepts(SAMPLE_SCHEME, csvt).
       // Build a potential list of references from the current (and already restricted) set
       // and restrict them to the single property name "textualPresentation" and
       // allow the list a size of 1.
       ResolvedConceptReferenceList matches = nodes.resolveToList(
                       null, ConvenienceMethods.createLocalNameList("textualPresentation"), null, 1);
       // Check the list size to see if any references are returned.  If true
       // get the only referenced entity in the list and print out it's "presentation"
       // or textual representation.
       if(matches.getResolvedConceptReferenceCount() > 0)
           ResolvedConceptReference ref = (ResolvedConceptReference)matches.
           Entity entry = ref.getReferencedEntry();
           System.out.println("Matching Name: " +
                   entry.getPresentation(0).getValue().getContent() );