@@ -19,10 +19,14 @@ func AddHandleFunc() {
1919 Utils .CreateHandleFunc (prePath + "/compute_correlationsDB/" , handleComputeCorrelationsDB )
2020 Utils .CreateHandleFunc (prePath + "/compute_spearmanDB/" , handleComputeSpearmanDB )
2121 Utils .CreateHandleFunc (prePath + "/create_tags/" , handleCreateTags )
22- Utils .CreateHandleFunc (prePath + "/delete_tag_from_column/" , handleDeleteTagFromColumn )
2322 Utils .CreateHandleFunc (prePath + "/handle_pkl/" , handlePKL )
23+ Utils .CreateHandleFunc (prePath + "/delete_columns/" , deleteColumns )
24+ Utils .CreateHandleFunc (prePath + "/transform_columns/" , transformColumns )
25+ Utils .CreateHandleFunc (prePath + "/get_row_column_missing_values/" , handleGetMissingValues )
26+ Utils .CreateHandleFunc (prePath + "/get_subset_data/" , handleGetSubsetData )
27+ Utils .CreateHandleFunc (prePath + "/create_new_collection/" , handleCreateNewCollection )
28+ Utils .CreateHandleFunc (prePath + "/overwrite_collection/" , handleOverwriteCollection )
2429 Utils .CreateHandleFunc (prePath + "/create_group_DB/" , handleCreateGroupDB )
25- Utils .CreateHandleFunc (prePath + "/delete_row_tag_DB/" , handleDeleteRowTagDB )
2630}
2731
2832// handleMerge handles the request to merge the datasets for the DB
@@ -146,47 +150,95 @@ func handleCreateTags(jsonConfig string, id string) (string, error) {
146150 return response , nil
147151}
148152
149- // handleDeleteTagFromColumn handles the request to tag deletion for the DB
153+ // handlePKL handles the request to handle the pkl file
150154// It returns the response from the python script
151- func handleDeleteTagFromColumn (jsonConfig string , id string ) (string , error ) {
152- log .Println ("Compute Tag Deletion " , id )
153- response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/delete_tag_from_column .py" , id )
155+ func handlePKL (jsonConfig string , id string ) (string , error ) {
156+ log .Println ("handling .pkl filetype " , id )
157+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/handle_pkl .py" , id )
154158 Utils .RemoveIdFromScripts (id )
155159 if err != nil {
156160 return "" , err
157161 }
158162 return response , nil
159163}
160164
161- // handlePKL handles the request to handle the pkl file
165+ // deleteColumns handles the request to delete columns from the DB
162166// It returns the response from the python script
163- func handlePKL (jsonConfig string , id string ) (string , error ) {
164- log .Println ("handling .pkl filetype " , id )
165- response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/handle_pkl .py" , id )
167+ func deleteColumns (jsonConfig string , id string ) (string , error ) {
168+ log .Println ("Deleting Columns " , id )
169+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/delete_columns .py" , id )
166170 Utils .RemoveIdFromScripts (id )
167171 if err != nil {
168172 return "" , err
169173 }
170174 return response , nil
171175}
172176
173- // handleCreateGroupDB handles the request to create the group for the DB
177+ // transformColumns handles the request to transform columns from the DB
174178// It returns the response from the python script
175- func handleCreateGroupDB (jsonConfig string , id string ) (string , error ) {
176- log .Println ("Create Group DB" , id )
177- response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/create_group_DB.py" , id )
179+ func transformColumns (jsonConfig string , id string ) (string , error ) {
180+ log .Println ("Transforming Columns" , id )
181+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/transform_columns.py" , id )
182+ Utils .RemoveIdFromScripts (id )
183+ if err != nil {
184+ return "" , err
185+ }
186+ return response , nil
187+ }
188+
189+ // handleGetMissingValues handles the request to get the missing values from the DB
190+ // It returns the response from the python script
191+ func handleGetMissingValues (jsonConfig string , id string ) (string , error ) {
192+ log .Println ("Getting Missing Values" , id )
193+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/get_row_column_missing_values.py" , id )
194+ Utils .RemoveIdFromScripts (id )
195+ if err != nil {
196+ return "" , err
197+ }
198+ return response , nil
199+ }
200+
201+ // handleGetSubsetData handles the request to get the subset data from the DB
202+ // It returns the response from the python script
203+ func handleGetSubsetData (jsonConfig string , id string ) (string , error ) {
204+ log .Println ("Getting Subset Data" , id )
205+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/get_subset_data.py" , id )
206+ Utils .RemoveIdFromScripts (id )
207+ if err != nil {
208+ return "" , err
209+ }
210+ return response , nil
211+ }
212+
213+ // handleCreateNewCollection handles the request to create a new collection from the DB
214+ // It returns the response from the python script
215+ func handleCreateNewCollection (jsonConfig string , id string ) (string , error ) {
216+ log .Println ("Creating New Collection" , id )
217+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/create_new_collection.py" , id )
178218 Utils .RemoveIdFromScripts (id )
179219 if err != nil {
180220 return "" , err
181221 }
182222 return response , nil
183223}
184224
185- // deleteRowTagDB handles the request to delete the row tag for the DB
225+ // handleOverwriteCollection handles the request to overwrite the collection from the DB
186226// It returns the response from the python script
187- func handleDeleteRowTagDB (jsonConfig string , id string ) (string , error ) {
188- log .Println ("Delete Row Tag DB" , id )
189- response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/delete_row_tag_DB.py" , id )
227+ func handleOverwriteCollection (jsonConfig string , id string ) (string , error ) {
228+ log .Println ("Overwriting Collection" , id )
229+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/overwrite_collection.py" , id )
230+ Utils .RemoveIdFromScripts (id )
231+ if err != nil {
232+ return "" , err
233+ }
234+ return response , nil
235+ }
236+
237+ // handleCreateGroupDB handles the request to create the group for the DB
238+ // It returns the response from the python script
239+ func handleCreateGroupDB (jsonConfig string , id string ) (string , error ) {
240+ log .Println ("Create Group DB" , id )
241+ response , err := Utils .StartPythonScripts (jsonConfig , "../pythonCode/modules/input/create_group_DB.py" , id )
190242 Utils .RemoveIdFromScripts (id )
191243 if err != nil {
192244 return "" , err
0 commit comments