getState for DataSet

Added a getState function for DataSet.