@Override
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context) {
GraphModel graph = viewConverter.getGraphModel(context);
String nodeId = reader.getValue();
GraphNode result = (GraphNode) graph.findNode(nodeId);
if (null == result) {
throw new IllegalStateException(
"Edge reference to undefined node " + nodeId);
}
return result;