public void testFullSynBySource(){
try {
String searchTerm = "gene";
CodedNodeSet nodeSet = lbSvc.getNodeSet("HUBt", 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;
LocalNameList sourceLnL = new LocalNameList();
sourceLnL.addEntry("CAHUB");
LocalNameList propLnL = new LocalNameList();
propLnL.addEntry("FULL_SYN");
nodeSet = nodeSet.restrictToMatchingProperties(propLnL,types,sourceLnL,null, null,searchTerm,LBConstants.MatchAlgorithms.contains.name(),null);
ResolvedConceptReferenceList rcl = nodeSet.resolveToList(null, null, null, 100);
for (int i=0; i<rcl.getResolvedConceptReferenceCount();i++){
ResolvedConceptReference rcr = rcl.getResolvedConceptReference(i);
Entity entity = rcr.getReferencedEntry();
Presentation[] presProps = entity.getPresentation();
for(int y=0;y<presProps.length;y++){
Presentation pres = presProps[y];
if(pres.getPropertyName().equals("FULL_SYN")&& pres.getRepresentationalForm().equals("PT") && pres.getSource(0).getContent().equals("CAHUB")){
System.out.println(pres.getValue().getContent());
}
}
}
} catch (IndexOutOfBoundsException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (LBInvocationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (LBParameterException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (LBException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}