Class VinciAnalysisEngineService_impl

java.lang.Object
org.apache.vinci.transport.VinciServableAdapter
org.apache.uima.adapter.vinci.VinciAnalysisEngineService_impl
All Implemented Interfaces:
org.apache.vinci.transport.TransportableFactory, org.apache.vinci.transport.VinciServable

public class VinciAnalysisEngineService_impl extends org.apache.vinci.transport.VinciServableAdapter
Main class for a Vinci Analysis Engine service. This class can also be used to deploy CAS Consumers as Vinci services. The main method takes one argument - the path to the service deployment descriptor.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiate Analysis Engine service from a given descriptor.
    VinciAnalysisEngineService_impl(String serviceConfigPath, boolean debug)
    Instantiate Analysis Engine service from a given descriptor - possibly in debug mode.
    VinciAnalysisEngineService_impl(String serviceConfigPath, boolean debug, String instanceId)
    Instantiate Analysis Engine from a given descriptor, debug mode, and instance Id.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.vinci.transport.Transportable
    eval(org.apache.vinci.transport.Transportable doc)
    Main method called by the Vinci Service Layer.
    Gets the descriptor.
    static void
    main(String[] args)
    The main method.
    org.apache.vinci.transport.Transportable
    Make transportable.
    protected void
    Starts this service and associates a ShutdownHook to handle gracefull shutdown.
    void
    Terminate this service.

    Methods inherited from class org.apache.vinci.transport.VinciServableAdapter

    cleanExit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VinciAnalysisEngineService_impl

      public VinciAnalysisEngineService_impl(String serviceConfigPath, boolean debug, String instanceId) throws Exception
      Instantiate Analysis Engine from a given descriptor, debug mode, and instance Id.
      Parameters:
      serviceConfigPath - descriptor location
      debug - the debug
      instanceId - the instance id
      Throws:
      Exception - passthru
    • VinciAnalysisEngineService_impl

      public VinciAnalysisEngineService_impl(String serviceConfigPath, boolean debug) throws Exception
      Instantiate Analysis Engine service from a given descriptor - possibly in debug mode.
      Parameters:
      serviceConfigPath - descriptor location
      debug - the debug
      Throws:
      Exception - the exception
    • VinciAnalysisEngineService_impl

      public VinciAnalysisEngineService_impl(String serviceConfigPath) throws Exception
      Instantiate Analysis Engine service from a given descriptor.
      Parameters:
      serviceConfigPath - descriptor location
      Throws:
      Exception - the exception
  • Method Details

    • getDescriptor

      public Descriptor getDescriptor()
      Gets the descriptor.
      Returns:
      the descriptor
    • eval

      public org.apache.vinci.transport.Transportable eval(org.apache.vinci.transport.Transportable doc) throws org.apache.vinci.transport.ServiceException
      Main method called by the Vinci Service Layer. All requests coming in from clients go through this method. Each request comes in as a VinciFrame and is expected to contain a valid VINCI:COMMAND. Currently, two such operations are supported: 1) Annotate - triggers document analysis 2) GetData - triggers return of the AE meta data ( descriptor)
      Specified by:
      eval in interface org.apache.vinci.transport.VinciServable
      Specified by:
      eval in class org.apache.vinci.transport.VinciServableAdapter
      Parameters:
      doc - Transportable - a VinciFrame containing client request
      Returns:
      Transportable - a VinciFrame containg result of performing the service
      Throws:
      org.apache.vinci.transport.ServiceException - the service exception
    • start

      protected void start()
      Starts this service and associates a ShutdownHook to handle gracefull shutdown.
    • stop

      public void stop()
      Terminate this service.
    • main

      public static void main(String[] args)
      The main method.
      Parameters:
      args - the arguments
    • makeTransportable

      public org.apache.vinci.transport.Transportable makeTransportable()
      Make transportable.
      Specified by:
      makeTransportable in interface org.apache.vinci.transport.TransportableFactory
      Overrides:
      makeTransportable in class org.apache.vinci.transport.VinciServableAdapter
      Returns:
      the transportable
      See Also:
      • TransportableFactory.makeTransportable()