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.
Code Block
titleJava Code Snippet
CodedNodeSet nodeSet = evsService.getNodeSet("NCI MetaThesaurus", null, null);

//Tell the api that you want to get back only the PRESENTATION type properties                    
CodedNodeSet.PropertyType[] types = new CodedNodeSet.PropertyType[1];                 
types[0] = CodedNodeSet.PropertyType.PRESENTATION;

//Now create a qualifier list containing the sourcecode you wish to search                                           
NameAndValueList qualifierList = new NameAndValueList();                   
NameAndValue nv = new NameAndValue();                   
nv.setName("source-code");
nv.setContent("12438C12438");                 
qualifierList.addNameAndValue(nv);

//Specify the source code should come from the NCI source
LocalNameListLnL = new LocalNameList();
LnL.addEntry("NCI");


nodeSet = nodeSet.restrictToProperties(null,types,nullLnL,null, qualifierList);