(no commit message)
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / occurrence / Collection.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.occurrence;
11
12
13 import eu.etaxonomy.cdm.model.agent.Institution;
14 import eu.etaxonomy.cdm.model.description.Scope;
15 import eu.etaxonomy.cdm.model.media.IdentifyableMediaEntity;
16
17 import org.apache.log4j.Logger;
18 import org.hibernate.annotations.Cascade;
19 import org.hibernate.annotations.CascadeType;
20 import javax.persistence.*;
21
22 /**
23 * @author m.doering
24 * @version 1.0
25 * @created 08-Nov-2007 13:06:16
26 */
27 @Entity
28 public class Collection extends IdentifyableMediaEntity{
29 private static final Logger logger = Logger.getLogger(Collection.class);
30
31 private String code;
32 private String codeStandard;
33 private String name;
34 private String townOrLocation;
35 private Institution institute;
36 private Collection superCollection;
37
38
39 /**
40 * Factory method
41 * @return
42 */
43 public static Collection NewInstance(){
44 return new Collection();
45 }
46
47 /**
48 * Constructor
49 */
50 protected Collection() {
51 super();
52 }
53
54
55 @ManyToOne
56 @Cascade({CascadeType.SAVE_UPDATE})
57 public Institution getInstitute(){
58 return this.institute;
59 }
60
61 /**
62 *
63 * @param institute institute
64 */
65 public void setInstitute(Institution institute){
66 this.institute = institute;
67 }
68
69 public String getCode(){
70 return this.code;
71 }
72
73 /**
74 *
75 * @param code code
76 */
77 public void setCode(String code){
78 this.code = code;
79 }
80
81 public String getCodeStandard(){
82 return this.codeStandard;
83 }
84
85 /**
86 *
87 * @param codeStandard codeStandard
88 */
89 public void setCodeStandard(String codeStandard){
90 this.codeStandard = codeStandard;
91 }
92
93 public String getName(){
94 return this.name;
95 }
96
97 /**
98 *
99 * @param name name
100 */
101 public void setName(String name){
102 this.name = name;
103 }
104
105 public String getTownOrLocation(){
106 return this.townOrLocation;
107 }
108
109 /**
110 *
111 * @param townOrLocation townOrLocation
112 */
113 public void setTownOrLocation(String townOrLocation){
114 this.townOrLocation = townOrLocation;
115 }
116
117 public String generateTitle(){
118 return "";
119 }
120
121 @ManyToOne
122 @Cascade({CascadeType.SAVE_UPDATE})
123 public Collection getSuperCollection() {
124 return superCollection;
125 }
126
127 public void setSuperCollection(Collection superCollection) {
128 this.superCollection = superCollection;
129 }
130
131 }