Version: 1.1.1

ca.ucalgary.services
Class CGIService

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.biomoby.service.MobyServlet
              extended by ca.ucalgary.services.LegacyService
                  extended by ca.ucalgary.services.WrapperService<XHTMLForm>
                      extended by ca.ucalgary.services.CGIService
All Implemented Interfaces:
Serializable, Remote, javax.servlet.Servlet, javax.servlet.ServletConfig

public class CGIService
extends WrapperService<XHTMLForm>

In this class, we reshape an XHTML form into a Moby description of a service, which then uses the standard MobyServlet mechanism for service signature creation, meta-data publishing, etc. The service description fetching, and the command invocation are overridden.

See Also:
Serialized Form

Field Summary
static String CGISERVICE_USERAGENT_NAME
           
static String HTML_FORM_URL_PARAM
           
 
Fields inherited from class ca.ucalgary.services.LegacyService
MOBY_RULES_DEFAULT_RESOURCE, MOBY_RULES_LOCATION_PARAM, TEXT_RULES_DEFAULT_RESOURCE, TEXT_RULES_LOCATION_PARAM
 
Fields inherited from class org.biomoby.service.MobyServlet
ADMIN_MODE, INIT_OUTPUT_BUFFER_SIZE, MOBY_AUTHORITATIVE_PARAM, MOBY_CENTRAL_URL_PARAM, MOBY_CONTACT_PARAM, MOBY_INPUT_PARAM, MOBY_OUTPUT_PARAM, MOBY_PROVIDER_URI_PARAM, MOBY_SECONDARYINPUT_PARAM, MOBY_SERVICE_DESC_PARAM, MOBY_SERVICENAME_PARAM, MOBY_SERVICETYPE_PARAM, MODE_HTTP_PARAM, RDF_MODE
 
Constructor Summary
CGIService()
           
 
Method Summary
 String createInputSpecString(XHTMLForm form)
           
 String createOutputSpecString(XHTMLForm form)
           
 String createSecondarySpecString(XHTMLForm form)
           
 MobyService createServiceFromConfig(javax.servlet.http.HttpServletRequest request)
           
 void init()
          If you override this method, be sure to call super.init()
 void processRequest(MobyDataJob request, MobyDataJob result)
          The real worker method: implementing classes must override this method to do something useful.
 
Methods inherited from class ca.ucalgary.services.WrapperService
createServiceFromConfig, getSpecURL
 
Methods inherited from class org.biomoby.service.MobyServlet
destroy, doGet, doPost, getCentralImpl, getMobyContents, getServiceName, log, log, main, processRequests, setCoCInitParameter, setMainTerminationExit, stringToPrimaryDataTemplate, stringToSecondaryDataTemplate, validateArguments
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTML_FORM_URL_PARAM

public static final String HTML_FORM_URL_PARAM
See Also:
Constant Field Values

CGISERVICE_USERAGENT_NAME

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

CGIService

public CGIService()
Method Detail

init

public void init()
Description copied from class: MobyServlet
If you override this method, be sure to call super.init()

Overrides:
init in class MobyServlet

processRequest

public void processRequest(MobyDataJob request,
                           MobyDataJob result)
                    throws Exception
Description copied from class: MobyServlet
The real worker method: implementing classes must override this method to do something useful. By default, nothing is done. If a ServiceException is thrown in this method, it is copied verbatim into the MOBY response. Any other exceptions thrown will be automatically wrapped in a ServiceException of severity ERROR and type INTERNAL_PROCESSING_ERROR. To add any other type of non-fatal error (e.g. a WARN), call addException() explicitly, rather than throwing a Java Exception which stops the job's execution.

Overrides:
processRequest in class MobyServlet
Parameters:
request - the request to process, with params guaranteed to be of the type specified in the mobyService annotation, or values overriding the annjotation in a WAR file's WEB-INF/web.xml
Throws:
Exception

createServiceFromConfig

public MobyService createServiceFromConfig(javax.servlet.http.HttpServletRequest request)
                                    throws Exception
Overrides:
createServiceFromConfig in class LegacyService
Throws:
Exception

createInputSpecString

public String createInputSpecString(XHTMLForm form)
Specified by:
createInputSpecString in class WrapperService<XHTMLForm>

createOutputSpecString

public String createOutputSpecString(XHTMLForm form)
Specified by:
createOutputSpecString in class WrapperService<XHTMLForm>

createSecondarySpecString

public String createSecondarySpecString(XHTMLForm form)
Specified by:
createSecondarySpecString in class WrapperService<XHTMLForm>

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010