View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  package org.opencastproject.transcription.persistence;
22  
23  import java.util.Date;
24  
25  public class TranscriptionJobControl {
26  
27    public enum Status {
28      InProgress, Canceled, Error, TranscriptionComplete, Closed, Retry
29    }
30  
31    // Media package id
32    private String mediaPackageId;
33    // Id of audio track element sent to service
34    private String trackId;
35    // This is the name of the submitted google speech operation(job)
36    private String transcriptionJobId;
37    // Transcription status, only completed after workflow to attach transcripts is dispatched
38    private String status;
39    // Date/time of google speech job creation
40    private Date dateCreated;
41    // Date/time that the transcription job is expected to be complete
42    private Date dateExpected;
43    // Date/time of google speech job completion
44    private Date dateCompleted;
45    // Duration of track
46    private long trackDuration;
47    // Transcription provider Id
48    private long providerId;
49  
50    public TranscriptionJobControl(String mediaPackageId, String trackId, String transcriptionJobId, Date dateCreated,
51            Date dateExpected, Date dateCompleted, String status, long trackDuration, long providerId) {
52      super();
53      this.mediaPackageId = mediaPackageId;
54      this.trackId = trackId;
55      this.transcriptionJobId = transcriptionJobId;
56      this.dateCreated = dateCreated;
57      this.dateExpected = dateExpected;
58      this.dateCompleted = dateCompleted;
59      this.status = status;
60      this.trackDuration = trackDuration;
61      this.providerId = providerId;
62    }
63  
64    public String getMediaPackageId() {
65      return mediaPackageId;
66    }
67  
68    public void setMediaPackageId(String mediaPackageId) {
69      this.mediaPackageId = mediaPackageId;
70    }
71  
72    public String getTrackId() {
73      return trackId;
74    }
75  
76    public void setTrackId(String trackId) {
77      this.trackId = trackId;
78    }
79  
80    public String getTranscriptionJobId() {
81      return transcriptionJobId;
82    }
83  
84    public void setTranscriptionJobId(String transcriptionJobId) {
85      this.transcriptionJobId = transcriptionJobId;
86    }
87  
88    public Date getDateCreated() {
89      return dateCreated;
90    }
91  
92    public void setDateCreated(Date dateCreated) {
93      this.dateCreated = dateCreated;
94    }
95  
96    public Date getDateExpected() {
97      return dateExpected;
98    }
99  
100   public void setDateExpected(Date dateExpected) {
101     this.dateExpected = dateExpected;
102   }
103 
104   public Date getDateCompleted() {
105     return dateCompleted;
106   }
107 
108   public void setDateCompleted(Date dateCompleted) {
109     this.dateCompleted = dateCompleted;
110   }
111 
112   public String getStatus() {
113     return status;
114   }
115 
116   public void setStatus(String status) {
117     this.status = status;
118   }
119 
120   public long getTrackDuration() {
121     return trackDuration;
122   }
123 
124   public void setTrackDuration(long trackDuration) {
125     this.trackDuration = trackDuration;
126   }
127 
128   public long getProviderId() {
129     return providerId;
130   }
131 
132   public void setProviderId(long providerId) {
133     this.providerId = providerId;
134   }
135 
136 }