Class AmberscriptTranscriptionService
java.lang.Object
org.opencastproject.job.api.AbstractJobProducer
org.opencastproject.transcription.amberscript.AmberscriptTranscriptionService
- All Implemented Interfaces:
JobProducer,TranscriptionService
public class AmberscriptTranscriptionService
extends AbstractJobProducer
implements 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) OSGI activate method.voidprotected voiddeleteStorageFile(String filename) getGeneratedTranscription(String mpId, String jobId, MediaPackageElement.Type type) intprotected OrganizationDirectoryServiceReturns a reference to the organization directory service.getReturnValues(String mpId, String jobId) protected SecurityServiceReturns a reference to the security serviceprotected ServiceRegistryReturns a reference to the service registry.getTranscriptionStatus(String mpId) Get mediapackage transcription statusprotected UserDirectoryServiceReturns a reference to the user directory serviceprotected 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 StringAsks the overriding class to process the arguments using the given operation.voidsetAssetManager(AssetManager service) voidsetDatabase(TranscriptionDatabase service) voidsetOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService) voidsetSecurityService(SecurityService securityService) voidsetServiceRegistry(ServiceRegistry serviceRegistry) voidsetUserDirectoryService(UserDirectoryService userDirectoryService) voidsetWorkflowService(WorkflowService service) voidvoidstartTranscription(String mpId, Track track) startTranscription(String mpId, 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) Description copied from class:AbstractJobProducerOSGI activate method.- Overrides:
activatein classAbstractJobProducer- Parameters:
cc- OSGI component context
-
deactivate
public void deactivate() -
startTranscription
- Specified by:
startTranscriptionin interfaceTranscriptionService- Throws:
TranscriptionServiceException
-
startTranscription
public Job startTranscription(String mpId, Track track, String... args) throws TranscriptionServiceException - Specified by:
startTranscriptionin interfaceTranscriptionService- Throws:
TranscriptionServiceException
-
transcriptionDone
- Specified by:
transcriptionDonein interfaceTranscriptionService
-
transcriptionError
- Specified by:
transcriptionErrorin interfaceTranscriptionService- Throws:
TranscriptionServiceException
-
getReturnValues
public Map<String,Object> getReturnValues(String mpId, String jobId) throws TranscriptionServiceException - Specified by:
getReturnValuesin interfaceTranscriptionService- Throws:
TranscriptionServiceException
-
getLanguage
- Specified by:
getLanguagein interfaceTranscriptionService
-
getAmberscriptJobType
-
getNumberOfSpeakers
public int getNumberOfSpeakers() -
getTranscriptionType
-
getGlossary
-
getTranscriptionStyle
-
getTargetLanguage
-
process
Description copied from class:AbstractJobProducerAsks the overriding class to process the arguments using the given operation. The result will be added to the associated job as the payload.- Specified by:
processin classAbstractJobProducer- Parameters:
job- the job to process- Returns:
- the operation result
- Throws:
Exception
-
getGeneratedTranscription
public MediaPackageElement getGeneratedTranscription(String mpId, String jobId, MediaPackageElement.Type type) throws TranscriptionServiceException - Specified by:
getGeneratedTranscriptionin interfaceTranscriptionService- Throws:
TranscriptionServiceException
-
getTranscriptionStatus
Get mediapackage transcription status- Parameters:
mpId- , mediapackage id- Returns:
- transcription status
- Throws:
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
-
setSecurityService
-
setUserDirectoryService
-
setOrganizationDirectoryService
public void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectoryService) -
setWorkspace
-
setWorkingFileRepository
-
setDatabase
-
setAssetManager
-
setWorkflowService
-
getServiceRegistry
Description copied from class:AbstractJobProducerReturns a reference to the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducer- Returns:
- the service registry
-
getSecurityService
Description copied from class:AbstractJobProducerReturns a reference to the security service- Specified by:
getSecurityServicein classAbstractJobProducer- Returns:
- the security service
-
getUserDirectoryService
Description copied from class:AbstractJobProducerReturns a reference to the user directory service- Specified by:
getUserDirectoryServicein classAbstractJobProducer- Returns:
- the user directory service
-
getOrganizationDirectoryService
Description copied from class:AbstractJobProducerReturns a reference to the organization directory service.- Specified by:
getOrganizationDirectoryServicein classAbstractJobProducer- Returns:
- the organization directory service
-