(no commit message)
[cdmlib.git] / cdmlibrary / src / main / java / eu / etaxonomy / cdm / model / common / MediaInstance.java
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.common;
11
12
13 import org.apache.log4j.Logger;
14
15 import java.util.*;
16 import javax.persistence.*;
17
18 /**
19 * metadata for an external file such as images, phylogenetic trees, or audio
20 * recordings available through the location attribute!
21 * @author m.doering
22 * @version 1.0
23 * @created 08-Nov-2007 13:06:34
24 */
25 @Entity
26 @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
27 public class MediaInstance extends VersionableEntity {
28 static Logger logger = Logger.getLogger(MediaInstance.class);
29 //http://www.iana.org/assignments/media-types
30 private String mimeType;
31 //filename suffix defining the media-type as an alternative to the proper MIME type
32 private String suffix;
33 //where the media file is stored
34 private String uri;
35 //in bytes
36 private int size;
37
38
39 public String getMimeType(){
40 return this.mimeType;
41 }
42
43 /**
44 *
45 * @param mimeType mimeType
46 */
47 public void setMimeType(String mimeType){
48 this.mimeType = mimeType;
49 }
50
51 public String getSuffix(){
52 return this.suffix;
53 }
54
55 /**
56 *
57 * @param suffix suffix
58 */
59 public void setSuffix(String suffix){
60 this.suffix = suffix;
61 }
62
63 public String getUri(){
64 return this.uri;
65 }
66
67 /**
68 *
69 * @param uri uri
70 */
71 public void setUri(String uri){
72 this.uri = uri;
73 }
74
75 public int getSize(){
76 return this.size;
77 }
78
79 /**
80 *
81 * @param size size
82 */
83 public void setSize(int size){
84 this.size = size;
85 }
86
87 }