Class AmberscriptTranscriptionService
java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.transcription.amberscript.AmberscriptTranscriptionService
- All Implemented Interfaces:
org.opencastproject.job.api.JobProducer,org.opencastproject.transcription.api.TranscriptionService
public class AmberscriptTranscriptionService
extends org.opencastproject.job.api.AbstractJobProducer
implements org.opencastproject.transcription.api.TranscriptionService
-
Field Summary
FieldsFields inherited from class org.opencastproject.job.api.AbstractJobProducer
ACCEPT_JOB_LOADS_EXCEEDING_PROPERTY, acceptJobLoadsExeedingMaxLoad, DEFAULT_ACCEPT_JOB_LOADS_EXCEEDING, executor, jobType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) voidprotected voiddeleteStorageFile(String filename) org.opencastproject.mediapackage.MediaPackageElementgetGeneratedTranscription(String mpId, String jobId, org.opencastproject.mediapackage.MediaPackageElement.Type type) intprotected org.opencastproject.security.api.OrganizationDirectoryServicegetReturnValues(String mpId, String jobId) protected org.opencastproject.security.api.SecurityServiceprotected org.opencastproject.serviceregistry.api.ServiceRegistrygetTranscriptionStatus(String mpId) Get mediapackage transcription statusprotected org.opencastproject.security.api.UserDirectoryServiceprotected org.apache.http.impl.client.CloseableHttpClientCreates a closable http client with default configuration.protected org.apache.http.impl.client.CloseableHttpClientmakeHttpClient(int socketTimeout) Creates a closable http client.protected Stringprocess(org.opencastproject.job.api.Job job) voidsetAssetManager(org.opencastproject.assetmanager.api.AssetManager service) voidsetDatabase(org.opencastproject.transcription.persistence.TranscriptionDatabase service) voidsetOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService) voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) voidsetUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) voidsetWorkflowService(org.opencastproject.workflow.api.WorkflowService service) voidsetWorkingFileRepository(org.opencastproject.workingfilerepository.api.WorkingFileRepository wfr) voidsetWorkspace(org.opencastproject.workspace.api.Workspace ws) org.opencastproject.job.api.JobstartTranscription(String mpId, org.opencastproject.mediapackage.Track track) org.opencastproject.job.api.JobstartTranscription(String mpId, org.opencastproject.mediapackage.Track track, String... args) voidtranscriptionDone(String mpId, Object results) voidtranscriptionError(String mpId, Object obj) Methods inherited from class org.opencastproject.job.api.AbstractJobProducer
acceptJob, countJobs, finallyUpdateJob, getJobType, incident, isReadyToAccept, isReadyToAcceptJobs
-
Field Details
-
SUBMISSION_COLLECTION
- See Also:
-
-
Constructor Details
-
AmberscriptTranscriptionService
public AmberscriptTranscriptionService()
-
-
Method Details
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) - Overrides:
activatein classorg.opencastproject.job.api.AbstractJobProducer
-
deactivate
public void deactivate() -
startTranscription
public org.opencastproject.job.api.Job startTranscription(String mpId, org.opencastproject.mediapackage.Track track) throws org.opencastproject.transcription.api.TranscriptionServiceException - Specified by:
startTranscriptionin interfaceorg.opencastproject.transcription.api.TranscriptionService- Throws:
org.opencastproject.transcription.api.TranscriptionServiceException
-
startTranscription
public org.opencastproject.job.api.Job startTranscription(String mpId, org.opencastproject.mediapackage.Track track, String... args) throws org.opencastproject.transcription.api.TranscriptionServiceException - Specified by:
startTranscriptionin interfaceorg.opencastproject.transcription.api.TranscriptionService- Throws:
org.opencastproject.transcription.api.TranscriptionServiceException
-
transcriptionDone
- Specified by:
transcriptionDonein interfaceorg.opencastproject.transcription.api.TranscriptionService
-
transcriptionError
public void transcriptionError(String mpId, Object obj) throws org.opencastproject.transcription.api.TranscriptionServiceException - Specified by:
transcriptionErrorin interfaceorg.opencastproject.transcription.api.TranscriptionService- Throws:
org.opencastproject.transcription.api.TranscriptionServiceException
-
getReturnValues
public Map<String,Object> getReturnValues(String mpId, String jobId) throws org.opencastproject.transcription.api.TranscriptionServiceException - Specified by:
getReturnValuesin interfaceorg.opencastproject.transcription.api.TranscriptionService- Throws:
org.opencastproject.transcription.api.TranscriptionServiceException
-
getLanguage
- Specified by:
getLanguagein interfaceorg.opencastproject.transcription.api.TranscriptionService
-
getAmberscriptJobType
-
getNumberOfSpeakers
public int getNumberOfSpeakers() -
getTranscriptionType
-
getGlossary
-
getTranscriptionStyle
-
getTargetLanguage
-
process
- Specified by:
processin classorg.opencastproject.job.api.AbstractJobProducer- Throws:
Exception
-
getGeneratedTranscription
public org.opencastproject.mediapackage.MediaPackageElement getGeneratedTranscription(String mpId, String jobId, org.opencastproject.mediapackage.MediaPackageElement.Type type) throws org.opencastproject.transcription.api.TranscriptionServiceException - Specified by:
getGeneratedTranscriptionin interfaceorg.opencastproject.transcription.api.TranscriptionService- Throws:
org.opencastproject.transcription.api.TranscriptionServiceException
-
getTranscriptionStatus
public String getTranscriptionStatus(String mpId) throws org.opencastproject.transcription.api.TranscriptionServiceException Get mediapackage transcription status- Parameters:
mpId- , mediapackage id- Returns:
- transcription status
- Throws:
org.opencastproject.transcription.api.TranscriptionServiceException
-
makeHttpClient
protected org.apache.http.impl.client.CloseableHttpClient makeHttpClient()Creates a closable http client with default configuration.- Returns:
- closable http client
-
makeHttpClient
protected org.apache.http.impl.client.CloseableHttpClient makeHttpClient(int socketTimeout) Creates a closable http client.- Parameters:
socketTimeout- http socket timeout value in milliseconds
-
deleteStorageFile
-
setServiceRegistry
public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) -
setSecurityService
public void setSecurityService(org.opencastproject.security.api.SecurityService securityService) -
setUserDirectoryService
public void setUserDirectoryService(org.opencastproject.security.api.UserDirectoryService userDirectoryService) -
setOrganizationDirectoryService
public void setOrganizationDirectoryService(org.opencastproject.security.api.OrganizationDirectoryService organizationDirectoryService) -
setWorkspace
public void setWorkspace(org.opencastproject.workspace.api.Workspace ws) -
setWorkingFileRepository
public void setWorkingFileRepository(org.opencastproject.workingfilerepository.api.WorkingFileRepository wfr) -
setDatabase
public void setDatabase(org.opencastproject.transcription.persistence.TranscriptionDatabase service) -
setAssetManager
public void setAssetManager(org.opencastproject.assetmanager.api.AssetManager service) -
setWorkflowService
public void setWorkflowService(org.opencastproject.workflow.api.WorkflowService service) -
getServiceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.opencastproject.job.api.AbstractJobProducer
-
getSecurityService
protected org.opencastproject.security.api.SecurityService getSecurityService()- Specified by:
getSecurityServicein classorg.opencastproject.job.api.AbstractJobProducer
-
getUserDirectoryService
protected org.opencastproject.security.api.UserDirectoryService getUserDirectoryService()- Specified by:
getUserDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer
-
getOrganizationDirectoryService
protected org.opencastproject.security.api.OrganizationDirectoryService getOrganizationDirectoryService()- Specified by:
getOrganizationDirectoryServicein classorg.opencastproject.job.api.AbstractJobProducer
-