com.languagecomputer.api
Class AnnotationMetaWebServiceImpl

java.lang.Object
  extended by com.languagecomputer.api.BaseWebServiceImpl
      extended by com.languagecomputer.api.AnnotationMetaWebServiceImpl
All Implemented Interfaces:
AnnotationMetaWebService, BaseWebService

public class AnnotationMetaWebServiceImpl
extends BaseWebServiceImpl
implements AnnotationMetaWebService

Implementation of AnnotationMetaWebService.

Since:
1.0
Author:
Kirk Roberts

Field Summary
 
Fields inherited from class com.languagecomputer.api.BaseWebServiceImpl
sessionManager
 
Constructor Summary
AnnotationMetaWebServiceImpl(SessionManager sessionManager)
          Creates a new AnnotationMetaWebServiceImpl using the given sessionManager.
 
Method Summary
 String annotate(String sessionID, String document, String format, List<String> services)
          Annotates the document with the provided services.
 String process(String sessionID, String url, String type, String format, List<String> services)
          Processes and annotations a document at a specific URL by downloading it and ingesting it.
 
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
 
Methods inherited from interface com.languagecomputer.api.BaseWebService
registerSession, unregisterSession
 

Constructor Detail

AnnotationMetaWebServiceImpl

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

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

process

public String process(String sessionID,
                      String url,
                      String type,
                      String format,
                      List<String> services)
               throws Exception
Processes and annotations a document at a specific URL by downloading it and ingesting it. Strips extraneous markup and normalizes the text. Then annotates it with the provided services.

Specified by:
process in interface AnnotationMetaWebService
Parameters:
sessionID - The unique identifier String for the session for this operation.
format - The format in which the given document is in. Defaults to XML.
services - List of services to run across the document.
Returns:
The identified annotations in the format requested.
Throws:
Exception - If there was an error indexing the document.

annotate

public String annotate(String sessionID,
                       String document,
                       String format,
                       List<String> services)
                throws Exception
Annotates the document with the provided services.

Specified by:
annotate in interface AnnotationMetaWebService
Parameters:
sessionID - The unique identifier String for the session for this operation.
document - The document in the format described in the format parameter.
format - The format in which the given document is in. Defaults to XML.
services - List of services to run across the document.
Returns:
The identified annotations in the format requested.
Throws:
Exception - If there was an error indexing the document.


Copyright © 2009. All Rights Reserved.