uk.ac.ebi.intenz.webapp.controller
Class SearchCommand

java.lang.Object
  extended by uk.ac.ebi.intenz.webapp.controller.Command
      extended by uk.ac.ebi.intenz.webapp.controller.DatabaseCommand
          extended by uk.ac.ebi.intenz.webapp.controller.SearchCommand

public class SearchCommand
extends DatabaseCommand

This class processes all full text queries.

All queries are processed using the UTF-8 encoded (octet sequences) representation sent by browsers. Rather than using request.getParameter(...) this class decodes the query string manually, since request.getParameter(...) does not decode the octet sequences correctly, if special characters encoded as two or more octets are transmitted.
See the XChars library documentation for more information regarding UTF-8 octet sequence decoding.

TODO: Implement a query parser.

Version:
2.0 - 13-July-2004
Author:
Michael Darsow

Nested Class Summary
 class SearchCommand.Result
           
 
Field Summary
static org.apache.log4j.Logger LOGGER
           
 
Fields inherited from class uk.ac.ebi.intenz.webapp.controller.DatabaseCommand
con, context, databaseErrorMessage, enzymeEntryMapper, request, response
 
Constructor Summary
SearchCommand()
           
 
Method Summary
 void process()
          Processes the full text query.
 String transformQuery(String query, uk.ac.ebi.intenz.webapp.controller.SearchCommand.QueryType queryType, boolean exclusion)
           
 
Methods inherited from class uk.ac.ebi.intenz.webapp.controller.DatabaseCommand
close, closeConnection, finalize, forward, init
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

public static final org.apache.log4j.Logger LOGGER
Constructor Detail

SearchCommand

public SearchCommand()
Method Detail

process

public void process()
             throws javax.servlet.ServletException,
                    IOException
Processes the full text query.

The query string is parsed, decoded, checked and integrated into a SQL statement. After execution the result is being sent to the browser (if any). Exceptions regarding this process are caught and the user is informed accordingly.

Specified by:
process in class Command
Throws:
javax.servlet.ServletException - ...
IOException - ...

transformQuery

public String transformQuery(String query,
                             uk.ac.ebi.intenz.webapp.controller.SearchCommand.QueryType queryType,
                             boolean exclusion)
                      throws QueryException
Throws:
QueryException


Copyright © 2013 EMBL-EBI. All Rights Reserved.