/**
  * Get the current state of the specified relation
  *
  * @param relname The name of the relation of interest
  * @return The state as a map, this allows lookup by key
  * @throws SSException
  */
 final TupleSet getState(String relname) throws SSException {
   ResultIterator<Tuple> stateIterator = getStateIterator(relname);
   TupleSet retval = new TupleSet();
   try {
     while (stateIterator.hasNext()) {
       retval.add(stateIterator.next());
     }
   } catch (IteratorException e) {
     throw new SSException(e.getMessage(), e.getCause());
   }
   return retval;
 }