Source code: com/flexstor/common/data/ejb/disguiserecord/AudioRoleData.java
1 /*
2 * AudioRoleData.java
3 *
4 * Copyright $Date: 2003/08/11 02:22:28 $ FLEXSTOR.net Inc.
5 *
6 * This work is licensed for use and distribution under license terms found at
7 * http://www.flexstor.org/license.html
8 *
9 */
10
11 package com.flexstor.common.data.ejb.disguiserecord;
12
13 /**
14 * The AssetRoleData object specific for Video assets.
15 */
16 public class AudioRoleData
17 extends AssetRoleData
18 {
19 static final long serialVersionUID = -7085666715532084724L;
20 /**
21 * Enconding
22 */
23 protected String sEnconding = "";
24 /**
25 * Number of Channels
26 */
27 protected int nNumbOfChannels = 0;
28 /**
29 * Sampling Rate
30 */
31 protected int nSamplingRate = 0;
32 /**
33 * Sample Size
34 */
35 protected int nSampleSize = 0;
36 /**
37 * Compression Type
38 */
39 protected String sCompType = "";
40 /**
41 * Duration of Audio (in seconds)
42 */
43 protected int nAudioDuration = 0;
44 /**
45 * Description
46 */
47 protected String sDesc = "";
48 /**
49 * Comments
50 */
51 protected String sComments = "";
52
53 public AudioRoleData()
54 {
55 this.nAssetRoleId = com.flexstor.common.constants.AssetRolesI.AUDIO;
56 }
57
58 public void setEnconding( String sEnconding )
59 {
60 this.sEnconding = sEnconding;
61 }
62
63 public String getEnconding()
64 {
65 return sEnconding;
66 }
67
68 public void setNumbOfChannels( int nNumbOfChannels )
69 {
70 this.nNumbOfChannels = nNumbOfChannels;
71 }
72
73 public int getNumbOfChannels()
74 {
75 return nNumbOfChannels;
76 }
77
78 public void setSamplingRate( int nSamplingRate )
79 {
80 this.nSamplingRate = nSamplingRate;
81 }
82
83 public int getSamplingRate()
84 {
85 return nSamplingRate;
86 }
87
88 public void setSampleSize( int nSampleSize )
89 {
90 this.nSampleSize = nSampleSize;
91 }
92
93 public int getSampleSize()
94 {
95 return nSampleSize;
96 }
97
98 public void setCompressionType( String sCompType )
99 {
100 this.sCompType = sCompType;
101 }
102
103 public String getCompressionType()
104 {
105 return sCompType;
106 }
107
108 public void setAudioDuration( int nAudioDuration )
109 {
110 this.nAudioDuration = nAudioDuration;
111 }
112
113 public int getAudioDuration()
114 {
115 return nAudioDuration;
116 }
117
118 public void setDescription( String sDesc )
119 {
120 this.sDesc = sDesc;
121 }
122
123 public String getDescription()
124 {
125 return sDesc;
126 }
127
128 public void setComments( String sComments )
129 {
130 this.sComments = sComments;
131 }
132
133 public String getComments()
134 {
135 return sComments;
136 }
137
138 /**
139 * Creates a String[] with all the values for all fields in this object
140 */
141 public String[] gatherData()
142 {
143 String[] values = new String[9];
144
145 values[0] = getAssetFileType();
146 values[1] = getEnconding();
147 values[2] = String.valueOf( getNumbOfChannels() );
148 values[3] = String.valueOf( getSamplingRate() );
149 values[4] = String.valueOf( getSampleSize() );
150 values[5] = getCompressionType();
151 values[6] = String.valueOf( getAudioDuration() );
152 values[7] = getDescription();
153 values[8] = getComments();
154
155 return values;
156 }
157
158 /**
159 * Returns a cloned version of this AudioRoleData object
160 */
161 public Object cloneRole()
162 {
163 AudioRoleData clonedObject = new AudioRoleData();
164 clonedObject.setEnconding( sEnconding );
165 clonedObject.setNumbOfChannels( nNumbOfChannels );
166 clonedObject.setSamplingRate( nSamplingRate );
167 clonedObject.setSampleSize( nSampleSize );
168 clonedObject.setCompressionType( sCompType );
169 clonedObject.setAudioDuration( nAudioDuration );
170 clonedObject.setDescription( sDesc );
171 clonedObject.setComments( sComments );
172
173 return clonedObject;
174 }
175 }
176