/** Stores a DataSet into a DataContext */ public DataContext store() throws Exception { DataContext dataContext = new DataContext(); dataContext.add(new NodePair(titleTag, this.title)); dataContext.add(dataHeadersTag, storeDataHeaders()); dataContext.add(dataItemsTag, storeDataItems()); return dataContext; }
/** @return the DataContext of the DataItems */ public DataContext storeDataItems() { DataContext dataContext = new DataContext(); for (int i = 0; dataItems != null && i < dataItems.length; i++) { dataContext.add(dataItemTag, ((DataItem) dataItems[i]).store()); } return dataContext; }
/** @return the DataContext of DataHeaders */ public DataContext storeDataHeaders() throws Exception { DataContext dataContext = new DataContext(); for (int i = 0; dataHeaders != null && i < dataHeaders.length; i++) { dataContext.add(dataHeaderTag, ((DataHeader) dataHeaders[i]).store()); } return dataContext; }