org.molgenis.omx.datasetdeleter
Class DataSetDeleterController

java.lang.Object
  extended by org.molgenis.framework.ui.MolgenisPlugin
      extended by org.molgenis.omx.datasetdeleter.DataSetDeleterController

@Controller
@RequestMapping(value="/plugin/datasetdeleter")
public class DataSetDeleterController
extends MolgenisPlugin


Field Summary
static String URI
           
 
Fields inherited from class org.molgenis.framework.ui.MolgenisPlugin
PLUGIN_URI_PREFIX
 
Constructor Summary
DataSetDeleterController()
           
 
Method Summary
protected  int countReferringProtocols(Characteristic characteristic, List<Protocol> allProtocols)
          Count the number of times a protocol of feature is referred to from a(n other) protocol
 String delete(String datasetIdentifier, boolean deletemetadata)
           
 String delete(String datasetIdentifier, org.springframework.web.context.request.WebRequest webRequest)
           
protected  void deleteCategories(List<Category> categories)
           
protected  void deleteData(DataSet dataset)
          Deletes the data from a given dataSet
protected  void deleteFeatures(List<ObservableFeature> features, List<Protocol> allProtocols)
          Deletes all features which do not have multiple Protocols referencing them
protected  void deleteObservedValues(ObservationSet observationSet)
          Deletes all ObservedValues from a given observationSet
protected  List<Protocol> deleteProtocol(Protocol protocol, List<Protocol> allProtocols)
          Deletes all subprotocols which do not have multiple Protocols referencing them
 String handleNotAuthenticated()
           
 String init(org.springframework.ui.Model model)
           
 
Methods inherited from class org.molgenis.framework.ui.MolgenisPlugin
getId, getUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URI

public static final String URI
See Also:
Constant Field Values
Constructor Detail

DataSetDeleterController

public DataSetDeleterController()
Method Detail

init

@RequestMapping(method=GET)
public String init(org.springframework.ui.Model model)
            throws Exception
Throws:
Exception

delete

@RequestMapping(value="/delete",
                method=POST)
@ResponseBody
public String delete(@RequestParam(value="dataset")
                                                 String datasetIdentifier,
                                                 org.springframework.web.context.request.WebRequest webRequest)
              throws HandleRequestDelegationException,
                     Exception
Throws:
HandleRequestDelegationException
Exception

delete

public String delete(String datasetIdentifier,
                     boolean deletemetadata)
              throws DatabaseException,
                     IOException
Throws:
DatabaseException
IOException

deleteData

protected void deleteData(DataSet dataset)
                   throws DatabaseException
Deletes the data from a given dataSet

Parameters:
the - DataSet from which the data should be deleted
Throws:
DatabaseException

deleteObservedValues

protected void deleteObservedValues(ObservationSet observationSet)
                             throws DatabaseException
Deletes all ObservedValues from a given observationSet

Parameters:
the - observationSet from which the values should be deleted
Throws:
DatabaseException

deleteProtocol

protected List<Protocol> deleteProtocol(Protocol protocol,
                                        List<Protocol> allProtocols)
                                 throws DatabaseException
Deletes all subprotocols which do not have multiple Protocols referencing them

Parameters:
the - protocols that should be deleted
Throws:
DatabaseException

deleteFeatures

protected void deleteFeatures(List<ObservableFeature> features,
                              List<Protocol> allProtocols)
                       throws DatabaseException
Deletes all features which do not have multiple Protocols referencing them

Parameters:
the - features that should be deleted
Throws:
DatabaseException

deleteCategories

protected void deleteCategories(List<Category> categories)
                         throws DatabaseException
Throws:
DatabaseException

countReferringProtocols

protected int countReferringProtocols(Characteristic characteristic,
                                      List<Protocol> allProtocols)
Count the number of times a protocol of feature is referred to from a(n other) protocol

Parameters:
the - feature of protocol that is referred to
Returns:
the number of referring protocols

handleNotAuthenticated

@ExceptionHandler(value=org.molgenis.framework.db.DatabaseAccessException.class)
public String handleNotAuthenticated()


Copyright © 2013. All Rights Reserved.