while (edges.hasNext()) {
Edge nextEdge = (Edge) edges.next();
PSDFEdgeWeight weight = (PSDFEdgeWeight) nextEdge
.getWeight();
IOPort sourcePort = weight.getSourcePort();
List relationList = sourcePort.linkedRelationList();
if (relationList.size() != 1) {
// FIXME: Need to generalize this?
throw new RuntimeException("Cannot handle relation "
+ "lists that are not singletons.\n"