Class TextAnalysisRestEndpoint


  • @Path("")
    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 service
      The text analyzer
      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The service registry
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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 getService()
      org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()
      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
    • Field Detail

      • service

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

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

      • TextAnalysisRestEndpoint

        public TextAnalysisRestEndpoint()
    • Method Detail

      • 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()