Class TextAnalysisRestEndpoint

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.textanalyzer.impl.endpoint.TextAnalysisRestEndpoint

@Path("/analysis/text") public class TextAnalysisRestEndpoint extends org.opencastproject.rest.AbstractJobProducerEndpoint
The REST endpoint for MediaAnalysisServices
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.textanalyzer.api.TextAnalyzerService
    The text analyzer
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The service registry
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activate(org.osgi.service.component.ComponentContext cc)
    Callback from OSGi that is called when this service is activated.
    javax.ws.rs.core.Response
    analyze(String image)
     
    org.opencastproject.job.api.JobProducer
    org.opencastproject.serviceregistry.api.ServiceRegistry
    protected void
    setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
    Callback from the OSGi declarative services to set the service registry.
    protected void
    setTextAnalyzer(org.opencastproject.textanalyzer.api.TextAnalyzerService textAnalyzer)
    Sets the text analyzer

    Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint

    checkHeartbeat, dispatchJob

    Methods inherited from class java.lang.Object

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

    • service

      protected org.opencastproject.textanalyzer.api.TextAnalyzerService service
      The text analyzer
    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The service registry
  • Constructor Details

    • TextAnalysisRestEndpoint

      public TextAnalysisRestEndpoint()
  • Method Details

    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Callback from OSGi that is called when this service is activated.
      Parameters:
      cc - OSGi component context
    • analyze

      @POST @Produces("text/xml") @Path("") public javax.ws.rs.core.Response analyze(@FormParam("image") String image)
    • setServiceRegistry

      protected void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Callback from the OSGi declarative services to set the service registry.
      Parameters:
      serviceRegistry - the service registry
    • setTextAnalyzer

      protected void setTextAnalyzer(org.opencastproject.textanalyzer.api.TextAnalyzerService textAnalyzer)
      Sets the text analyzer
      Parameters:
      textAnalyzer - the text analyzer
    • getService

      public org.opencastproject.job.api.JobProducer getService()
      Specified by:
      getService in class org.opencastproject.rest.AbstractJobProducerEndpoint
      See Also:
      • AbstractJobProducerEndpoint.getService()
    • getServiceRegistry

      public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      Specified by:
      getServiceRegistry in class org.opencastproject.rest.AbstractJobProducerEndpoint
      See Also:
      • AbstractJobProducerEndpoint.getServiceRegistry()