*/
public Report execute( QueryFeature queryFeature, DeploymentForm deploymentForm, User user )
{
Report report = null;
Tuple[] tuples= null;
if( authenticateUser( user ) )
{
try
{
String queryFeatureName = queryFeature.getName();
if ( queryFeatureName.equals("Query by Experimenter")) {
QueryByExperimenter experimenterQuery = new QueryByExperimenter(databaseOperations, statementExecutor, queryFeature, getTimeStamp(), user.getID());
tuples = experimenterQuery.getTuples();
}
if (queryFeatureName.equals("Query by Start Date")) {
QueryByDate dateQuery = new QueryByDate(databaseOperations, statementExecutor, queryFeature, getTimeStamp(), user.getID());
tuples = dateQuery.getTuples();
}
if (queryFeatureName.equals("Query by Keyword")) {
QueryByKeyword keywordQuery = new QueryByKeyword(databaseOperations, statementExecutor, queryFeature, getTimeStamp(), user.getID());
tuples = keywordQuery.getTuples();
}
if (queryFeatureName.equals("Query by Plasmid")){
QueryByPlasmid plasmidQuery = new QueryByPlasmid(databaseOperations, statementExecutor, queryFeature, getTimeStamp(), user.getID());
tuples = plasmidQuery.getTuples();
}
if (queryFeatureName.equals("Query by Multiple Plasmids")){
}
if (queryFeatureName.equals("Query by Compound")) {
}
if (queryFeatureName.equals("Query by Plasmid and Compound")) {
}
if( tuples.length == 0 )
{
return new NoResultsFoundReport( deploymentForm );
}
report = new ExtendedTupleReport( deploymentForm, queryFeature.getName(), queryFeature.getName(), tuples );
( (ExtendedTupleReport)report ).setTimeStamp( getTimeStamp() );
( (ExtendedTupleReport)report ).setUserID( user.getID() );
}
catch( Exception e )
{
e.printStackTrace();
report = new ErrorReport( deploymentForm );
( (ErrorReport)report ).addError( e );
}
}
else
{
report = new ErrorReport( deploymentForm );
}
report.setIdentifier( generateReportIdentifier() );
caterReportForDeploymentForm( report, deploymentForm );
return report;
}