Project

General

Profile

Download (1.7 KB) Statistics
| Branch: | Tag: | Revision:
1 9479da48 Andreas Müller
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy 
4
* http://www.e-taxonomy.eu
5
* 
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
10 ca21f846 Andreas Müller
package eu.etaxonomy.cdm.model.media;
11 9479da48 Andreas Müller
12
import org.apache.log4j.Logger;
13 ee91bcd9 ben.clark
import org.hibernate.envers.Audited;
14 9479da48 Andreas Müller
15
import javax.persistence.*;
16 b824294c a.babadshanjan
import javax.xml.bind.annotation.XmlAccessType;
17
import javax.xml.bind.annotation.XmlAccessorType;
18
import javax.xml.bind.annotation.XmlElement;
19
import javax.xml.bind.annotation.XmlRootElement;
20
import javax.xml.bind.annotation.XmlType;
21 9479da48 Andreas Müller
22
/**
23
 * @author m.doering
24
 * @version 1.0
25
 * @created 08-Nov-2007 13:06:11
26
 */
27 b824294c a.babadshanjan
@XmlAccessorType(XmlAccessType.FIELD)
28
@XmlType(name = "AudioFile", propOrder = {
29
    "duration"
30
})
31
@XmlRootElement(name = "AudioFile")
32 9479da48 Andreas Müller
@Entity
33 ee91bcd9 ben.clark
@Audited
34 d5e92940 Andreas Müller
public class AudioFile extends MediaRepresentationPart {
35 b3730261 Andreas Müller
	private static final long serialVersionUID = 2327736023969971196L;
36 fa1ba092 Andreas Müller
	private static final Logger logger = Logger.getLogger(AudioFile.class);
37
	
38 9479da48 Andreas Müller
	//length of recording in seconds
39 b824294c a.babadshanjan
	@XmlElement(name = "Duration")
40 9479da48 Andreas Müller
	private int duration;
41 dbee9ee3 Andreas Müller
42
	public static AudioFile NewInstance(String uri, Integer size){
43 b3730261 Andreas Müller
		logger.debug("NewInstance");
44 dbee9ee3 Andreas Müller
		return new AudioFile(uri, size);
45
	}
46
47 fa1ba092 Andreas Müller
	/**
48
	 * Factory method
49
	 * @return
50
	 */
51
	public static AudioFile NewInstance(){
52
		return new AudioFile();
53
	}
54
	
55
	/**
56
	 * Constructor
57
	 */
58
	protected AudioFile() {
59
		super();
60
	}
61
	
62 dbee9ee3 Andreas Müller
	/**
63
	 * Constructor
64
	 */
65
	protected AudioFile(String uri, Integer size) {
66
		super(uri, size);
67
	}
68
	
69 9479da48 Andreas Müller
	public int getDuration(){
70
		return this.duration;
71
	}
72
73
	/**
74
	 * 
75
	 * @param duration    duration
76
	 */
77
	public void setDuration(int duration){
78
		this.duration = duration;
79
	}
80
81
}