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
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.textanalyzer.api.TextAnalyzerServiceThe text analyzerprotected org.opencastproject.serviceregistry.api.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.Responseorg.opencastproject.job.api.JobProducerorg.opencastproject.serviceregistry.api.ServiceRegistryprotected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.protected voidsetTextAnalyzer(org.opencastproject.textanalyzer.api.TextAnalyzerService textAnalyzer) Sets the text analyzerMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
protected org.opencastproject.textanalyzer.api.TextAnalyzerService serviceThe text analyzer -
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe 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:
getServicein classorg.opencastproject.rest.AbstractJobProducerEndpoint- See Also:
-
getServiceRegistry
public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.opencastproject.rest.AbstractJobProducerEndpoint- See Also:
-