Class TextAnalysisRestEndpoint
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.textanalyzer.impl.endpoint.TextAnalysisRestEndpoint
The REST endpoint for MediaAnalysisServices
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TextAnalyzerServiceThe text analyzerprotected ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.javax.ws.rs.core.ResponseReturns the job producer that is backing this REST endpoint.Return the service registry.protected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.protected voidsetTextAnalyzer(TextAnalyzerService textAnalyzer) Sets the text analyzerMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
The text analyzer -
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
Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
setTextAnalyzer
Sets the text analyzer- Parameters:
textAnalyzer- the text analyzer
-
getService
Returns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
- See Also:
-
getServiceRegistry
Return the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint- See Also:
-