Class IBMWatsonTranscriptionRestService

java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.transcription.ibmwatson.endpoint.IBMWatsonTranscriptionRestService

@Path("/transcripts/watson") public class IBMWatsonTranscriptionRestService extends org.opencastproject.rest.AbstractJobProducerEndpoint
  • Field Details

    • service

      protected IBMWatsonTranscriptionService service
      The transcription service
    • serviceRegistry

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

    • IBMWatsonTranscriptionRestService

      public IBMWatsonTranscriptionRestService()
  • Method Details

    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
    • setTranscriptionService

      public void setTranscriptionService(IBMWatsonTranscriptionService service)
    • setServiceRegistry

      public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry service)
    • getService

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

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

      @GET @Path("results") @Produces("text/plain") public javax.ws.rs.core.Response checkCallbackUrl(@QueryParam("challenge_string") String challengeString, @Context javax.servlet.http.HttpServletRequest request)
    • reportStatus

      @POST @Path("results") @Produces("text/plain") public javax.ws.rs.core.Response reportStatus(String body)
      { "id": "{job_id}", "event": "{recognitions_status}", "user_token": "{user_token}" } If the event is recognitions.completed_with_results, the object includes a results field that provides the results of the recognition request. The client should respond to the callback notification with status code 200.