com.languagecomputer.api
Class BaseAnnotationWebServiceImpl

java.lang.Object
  extended by com.languagecomputer.api.BaseWebServiceImpl
      extended by com.languagecomputer.api.BaseAnnotationWebServiceImpl
All Implemented Interfaces:
BaseWebService
Direct Known Subclasses:
AttributeWebServiceImpl, CoreferenceWebServiceImpl, EntityWebServiceImpl, EventWebServiceImpl, QuestionAnswerPairWebServiceImpl, SpatialWebServiceImpl, TemporalWebServiceImpl

public abstract class BaseAnnotationWebServiceImpl
extends BaseWebServiceImpl

Generic implementation of a BaseWebServiceImpl for annotation-based services.

Since:
1.0
Author:
Kirk Roberts

Field Summary
protected  DocumentXML xmlConverter
           
 
Fields inherited from class com.languagecomputer.api.BaseWebServiceImpl
sessionManager
 
Constructor Summary
BaseAnnotationWebServiceImpl(SessionManager sessionManager)
          Creates a new BaseAnnotationWebServiceImpl using the given sessionManager.
 
Method Summary
protected abstract  AnnotationService getAnnotationService(String sessionID)
          Returns the AnnotationService to use for document processing.
protected abstract  AnnotationType getAnnotationType()
          Returns the AnnotationType to use for gathering annotations.
 String process(String sessionID, String document, String format)
          
 
Methods inherited from class com.languagecomputer.api.BaseWebServiceImpl
registerSession, unregisterSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlConverter

protected DocumentXML xmlConverter
Constructor Detail

BaseAnnotationWebServiceImpl

public BaseAnnotationWebServiceImpl(SessionManager sessionManager)
Creates a new BaseAnnotationWebServiceImpl using the given sessionManager.

Parameters:
sessionManager - The SessionManager to use for Session control.
Method Detail

getAnnotationService

protected abstract AnnotationService getAnnotationService(String sessionID)
                                                   throws Exception
Returns the AnnotationService to use for document processing.

Parameters:
sessionID - Session ID needed to obtain the AnnotationService.
Returns:
The AnnotationService that will be used by this BaseAnnotationWebServiceImpl for Document processing.
Throws:
Exception - If an error occurs retrieving the service.

getAnnotationType

protected abstract AnnotationType getAnnotationType()
Returns the AnnotationType to use for gathering annotations.

Returns:
The AnnotationType that is used to get the newly created Text objects off the Document.

process

public String process(String sessionID,
                      String document,
                      String format)
               throws Exception

Throws:
Exception


Copyright © 2009. All Rights Reserved.