Integer elemid = kamElementRef.getKamStoreObjectId();
org.openbel.framework.api.Kam.KamNode objKamNode;
objKamNode = objKam.findNode(elemid);
// Process the request
GetAdjacentKamNodesResponse response =
OBJECT_FACTORY.createGetAdjacentKamNodesResponse();
// Get the adjacent nodes
Set<org.openbel.framework.api.Kam.KamNode> adjnodes;
if (direction == null) {
adjnodes = objKam.getAdjacentNodes(objKamNode, edges, nodes);
} else {
adjnodes = objKam.getAdjacentNodes(objKamNode, direction, edges,
nodes);
}
for (org.openbel.framework.api.Kam.KamNode node : adjnodes) {
KamNode kn = convert(kamInfo, node);
response.getKamNodes().add(kn);
}
return response;
}