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 Summary
FieldsModifier and TypeFieldDescriptionprotected IBMWatsonTranscriptionServiceThe transcription serviceprotected org.opencastproject.serviceregistry.api.ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) javax.ws.rs.core.ResponsecheckCallbackUrl(String challengeString, javax.servlet.http.HttpServletRequest request) org.opencastproject.job.api.JobProducerorg.opencastproject.serviceregistry.api.ServiceRegistryjavax.ws.rs.core.ResponsereportStatus(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.voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry service) voidMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
The transcription service -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe service registry
-
-
Constructor Details
-
IBMWatsonTranscriptionRestService
public IBMWatsonTranscriptionRestService()
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) -
setTranscriptionService
-
setServiceRegistry
public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry service) -
getService
public org.opencastproject.job.api.JobProducer getService()- Specified by:
getServicein classorg.opencastproject.rest.AbstractJobProducerEndpoint
-
getServiceRegistry
public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.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.
-