Project

General

Profile

Download (1.77 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
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
package eu.etaxonomy.cdm.model.media;
11

    
12
import java.net.URI;
13

    
14
import javax.persistence.Entity;
15
import javax.xml.bind.annotation.XmlAccessType;
16
import javax.xml.bind.annotation.XmlAccessorType;
17
import javax.xml.bind.annotation.XmlElement;
18
import javax.xml.bind.annotation.XmlRootElement;
19
import javax.xml.bind.annotation.XmlType;
20

    
21
import org.apache.log4j.Logger;
22
import org.hibernate.envers.Audited;
23

    
24
/**
25
 * @author m.doering
26
 * @created 08-Nov-2007 13:06:11
27
 */
28
@XmlAccessorType(XmlAccessType.FIELD)
29
@XmlType(name = "AudioFile", propOrder = {
30
    "duration"
31
})
32
@XmlRootElement(name = "AudioFile")
33
@Entity
34
@Audited
35
public class AudioFile extends MediaRepresentationPart {
36
	private static final long serialVersionUID = 2327736023969971196L;
37
	private static final Logger logger = Logger.getLogger(AudioFile.class);
38

    
39
	//length of recording in seconds
40
	@XmlElement(name = "Duration")
41
	private int duration;
42

    
43

    
44
// *************** FACTORY METHOD *********************************/
45

    
46
	public static AudioFile NewInstance(URI uri, Integer size){
47
		logger.debug("NewInstance");
48
		return new AudioFile(uri, size);
49
	}
50
	public static AudioFile NewInstance(){
51
		return new AudioFile();
52
	}
53

    
54
// ********************** CONSTRUCTOR ***************************/
55
	protected AudioFile() {
56
		super();
57
	}
58

    
59
	protected AudioFile(URI uri, Integer size) {
60
		super(uri, size);
61
	}
62

    
63
// ******************** GETTER / SETTER *************************/
64
	public int getDuration(){
65
		return this.duration;
66
	}
67
	public void setDuration(int duration){
68
		this.duration = duration;
69
	}
70

    
71
}
(1-1/13)