/** * Return the full data set. If the structure hasn't yet been determined * by a call to getStructure then method should do so before processing * the rest of the data set. * * @return the structure of the data set as an empty * set of Instances * @throws IOException if there is no source or parsing fails */ public Instances getDataSet() throws IOException { if (m_sourceReader == null) throw new IOException("No source has been specified"); if (getRetrieval() == INCREMENTAL) throw new IOException("Cannot mix getting Instances in both incremental and batch modes"); setRetrieval(BATCH); if (m_structure == null) getStructure(); try { // close the stream m_sourceReader.close(); } catch (Exception ex) { } return JSONInstances.toInstances(m_JSON); }
/** * Return the full data set. If the structure hasn't yet been determined * by a call to getStructure then method should do so before processing * the rest of the data set. * * @return the structure of the data set as an empty * set of Instances * @throws IOException if there is no source or parsing fails */ public Instances getDataSet() throws IOException { if (m_sourceReader == null) throw new IOException("No source has been specified"); if (getRetrieval() == INCREMENTAL) throw new IOException("Cannot mix getting Instances in both incremental and batch modes"); setRetrieval(BATCH); if (m_structure == null) getStructure(); try { // close the stream m_sourceReader.close(); } catch (Exception ex) { } return JSONInstances.toInstances(m_JSON); }