(no commit message)
[cdmlib.git] / cdmlib-remote / src / main / java / eu / etaxonomy / cdm / remote / dto / MediaTO.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.remote.dto;
11
12 import java.util.Calendar;
13 import java.util.HashSet;
14 import java.util.Set;
15
16 import eu.etaxonomy.cdm.model.common.LanguageString;
17
18 /**
19 * @author a.kohlbecker
20 * @version 1.0
21 * @created 11.12.2007 12:13:42
22 *
23 */
24 public class MediaTO extends BaseTO implements IBaseSTO{
25
26 /**
27 * The title of the Media instance
28 */
29 private String title;
30
31 /**
32 * The description of the Media.
33 */
34 private String description;
35 /**
36 * A single medium such as a picture can have multiple representations.
37 * Common are multiple resolutions or file
38 * formats for images for example
39 */
40
41 private Set<MediaRepresentationSTO> representations = new HashSet<MediaRepresentationSTO>();
42 /**
43 * several rightTOs in the SAME language, not different languages for the SAME rights UUID
44 */
45 private Set<RightsSTO> rights;
46 private IdentifiedString artist;
47
48
49 public String getTitle() {
50 return title;
51 }
52 public void setTitle(String title) {
53 this.title = title;
54 }
55
56 public void setTitle(LanguageString title) {
57 if(title != null){
58 this.title = title.getText();
59 }
60 }
61
62 public String getDescription() {
63 return description;
64 }
65 public void setDescription(String description) {
66 this.description = description;
67 }
68
69 public void setDescription(LanguageString description) {
70 if(description != null){
71 this.description = description.getText();
72 }
73 }
74
75 public Set<MediaRepresentationSTO> getRepresentations() {
76 return representations;
77 }
78 public void setRepresentations(Set<MediaRepresentationSTO> representations) {
79 this.representations = representations;
80 }
81
82 public void addRepresenation(MediaRepresentationSTO representation){
83 representations.add(representation);
84 }
85
86 public IdentifiedString getArtist() {
87 return artist;
88 }
89 public void setArtist(IdentifiedString artist) {
90 this.artist = artist;
91 }
92 public Set<RightsSTO> getRights() {
93 return rights;
94 }
95 public void setRights(Set<RightsSTO> rights) {
96 this.rights = rights;
97 }
98
99 }