I am using the below code to fetch parent and children of the work item and I got link reference, Now I want to fetch the work item Id from object. Please help
IReference reference = linkManager.referenceFactory().createReferenceToItem(workItem
.getItemHandle());
ILinkQueryPage page;
ILinkQueryPage page1;
page = linkManager.findLinksByTarget("com.ibm.team.workitem.linktype.parentworkitem", reference, monitor);
ILinkCollection linkCollection = page.getLinks();
Collection childWI = linkCollection.getLinksById("com.ibm.team.workitem.linktype.parentworkitem");
System.out.println(childWI);