Revision 9a963f43
Added by Andreas Müller over 11 years ago
.gitattributes | ||
---|---|---|
671 | 671 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/MediaRepresentationPart.java -text |
672 | 672 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/MediaUtils.java -text |
673 | 673 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/MovieFile.java -text |
674 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/ReferencedMedia.java -text |
|
674 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/ReferencedMediaBase.java -text
|
|
675 | 675 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/Rights.java -text |
676 | 676 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/RightsTerm.java -text |
677 | 677 |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/package-info.java -text |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/Figure.java | ||
---|---|---|
18 | 18 |
import eu.etaxonomy.cdm.model.media.ImageFile; |
19 | 19 |
import eu.etaxonomy.cdm.model.media.Media; |
20 | 20 |
import eu.etaxonomy.cdm.model.media.MediaRepresentation; |
21 |
import eu.etaxonomy.cdm.model.media.ReferencedMedia; |
|
21 |
import eu.etaxonomy.cdm.model.media.ReferencedMediaBase;
|
|
22 | 22 |
|
23 | 23 |
import javax.persistence.*; |
24 | 24 |
import javax.xml.bind.annotation.XmlAccessType; |
... | ... | |
34 | 34 |
@XmlType(name = "Figure") |
35 | 35 |
@Entity |
36 | 36 |
@Audited |
37 |
public class Figure extends ReferencedMedia { |
|
37 |
public class Figure extends ReferencedMediaBase {
|
|
38 | 38 |
private static final long serialVersionUID = -1712467725277327725L; |
39 | 39 |
@SuppressWarnings("unused") |
40 | 40 |
private static final Logger logger = Logger.getLogger(Figure.class); |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/ReferencedMedia.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.media; |
|
11 |
|
|
12 |
|
|
13 |
import javax.persistence.Entity; |
|
14 |
import javax.persistence.FetchType; |
|
15 |
import javax.persistence.ManyToOne; |
|
16 |
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.XmlIDREF; |
|
20 |
import javax.xml.bind.annotation.XmlRootElement; |
|
21 |
import javax.xml.bind.annotation.XmlSchemaType; |
|
22 |
import javax.xml.bind.annotation.XmlType; |
|
23 |
|
|
24 |
import org.apache.log4j.Logger; |
|
25 |
import org.hibernate.annotations.Cascade; |
|
26 |
import org.hibernate.annotations.CascadeType; |
|
27 |
import org.hibernate.envers.Audited; |
|
28 |
|
|
29 |
import eu.etaxonomy.cdm.model.common.IReferencedEntity; |
|
30 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
31 |
|
|
32 |
/** |
|
33 |
* @author m.doering |
|
34 |
* @version 1.0 |
|
35 |
* @created 08-Nov-2007 13:06:48 |
|
36 |
*/ |
|
37 |
@XmlAccessorType(XmlAccessType.FIELD) |
|
38 |
@XmlType(name = "ReferencedMedia", propOrder = { |
|
39 |
"citationMicroReference", |
|
40 |
"citation" |
|
41 |
}) |
|
42 |
@XmlRootElement(name = "ReferencedMedia") |
|
43 |
@Entity |
|
44 |
@Audited |
|
45 |
public abstract class ReferencedMedia extends Media implements IReferencedEntity { |
|
46 |
|
|
47 |
static Logger logger = Logger.getLogger(ReferencedMedia.class); |
|
48 |
|
|
49 |
@XmlElement(name = "CitationMicroReference") |
|
50 |
private String citationMicroReference; |
|
51 |
|
|
52 |
@XmlElement(name = "Citation") |
|
53 |
@XmlIDREF |
|
54 |
@XmlSchemaType(name = "IDREF") |
|
55 |
@ManyToOne(fetch = FetchType.LAZY) |
|
56 |
@Cascade(CascadeType.SAVE_UPDATE) |
|
57 |
private Reference citation; |
|
58 |
|
|
59 |
public Reference getCitation(){ |
|
60 |
return this.citation; |
|
61 |
} |
|
62 |
|
|
63 |
public void setCitation(Reference citation){ |
|
64 |
this.citation = citation; |
|
65 |
} |
|
66 |
|
|
67 |
public String getCitationMicroReference(){ |
|
68 |
return this.citationMicroReference; |
|
69 |
} |
|
70 |
|
|
71 |
public void setCitationMicroReference(String citationMicroReference){ |
|
72 |
this.citationMicroReference = citationMicroReference; |
|
73 |
} |
|
74 |
|
|
75 |
} |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/media/ReferencedMediaBase.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.media; |
|
11 |
|
|
12 |
|
|
13 |
import javax.persistence.Entity; |
|
14 |
import javax.persistence.FetchType; |
|
15 |
import javax.persistence.ManyToOne; |
|
16 |
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.XmlIDREF; |
|
20 |
import javax.xml.bind.annotation.XmlRootElement; |
|
21 |
import javax.xml.bind.annotation.XmlSchemaType; |
|
22 |
import javax.xml.bind.annotation.XmlType; |
|
23 |
|
|
24 |
import org.apache.log4j.Logger; |
|
25 |
import org.hibernate.annotations.Cascade; |
|
26 |
import org.hibernate.annotations.CascadeType; |
|
27 |
import org.hibernate.envers.Audited; |
|
28 |
|
|
29 |
import eu.etaxonomy.cdm.model.common.IReferencedEntity; |
|
30 |
import eu.etaxonomy.cdm.model.reference.Reference; |
|
31 |
|
|
32 |
/** |
|
33 |
* @author m.doering |
|
34 |
* @version 1.0 |
|
35 |
* @created 08-Nov-2007 13:06:48 |
|
36 |
*/ |
|
37 |
@XmlAccessorType(XmlAccessType.FIELD) |
|
38 |
@XmlType(name = "ReferencedMedia", propOrder = { |
|
39 |
"citationMicroReference", |
|
40 |
"citation" |
|
41 |
}) |
|
42 |
@XmlRootElement(name = "ReferencedMedia") |
|
43 |
@Entity |
|
44 |
@Audited |
|
45 |
public abstract class ReferencedMediaBase extends Media implements IReferencedEntity { |
|
46 |
private static final long serialVersionUID = 4118655992311004088L; |
|
47 |
static Logger logger = Logger.getLogger(ReferencedMediaBase.class); |
|
48 |
|
|
49 |
@XmlElement(name = "CitationMicroReference") |
|
50 |
private String citationMicroReference; |
|
51 |
|
|
52 |
@XmlElement(name = "Citation") |
|
53 |
@XmlIDREF |
|
54 |
@XmlSchemaType(name = "IDREF") |
|
55 |
@ManyToOne(fetch = FetchType.LAZY) |
|
56 |
@Cascade(CascadeType.SAVE_UPDATE) |
|
57 |
private Reference<?> citation; |
|
58 |
|
|
59 |
public Reference<?> getCitation(){ |
|
60 |
return this.citation; |
|
61 |
} |
|
62 |
|
|
63 |
public void setCitation(Reference<?> citation){ |
|
64 |
this.citation = citation; |
|
65 |
} |
|
66 |
|
|
67 |
public String getCitationMicroReference(){ |
|
68 |
return this.citationMicroReference; |
|
69 |
} |
|
70 |
|
|
71 |
public void setCitationMicroReference(String citationMicroReference){ |
|
72 |
this.citationMicroReference = citationMicroReference; |
|
73 |
} |
|
74 |
|
|
75 |
} |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/molecular/PhylogeneticTree.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.cdm.model.molecular; |
11 | 11 |
|
12 | 12 |
|
13 |
import eu.etaxonomy.cdm.model.media.ReferencedMedia; |
|
13 |
import eu.etaxonomy.cdm.model.media.ReferencedMediaBase;
|
|
14 | 14 |
|
15 | 15 |
import org.apache.log4j.Logger; |
16 | 16 |
import org.hibernate.envers.Audited; |
... | ... | |
42 | 42 |
@Entity |
43 | 43 |
@Indexed(index = "eu.etaxonomy.cdm.model.media.Media") |
44 | 44 |
@Audited |
45 |
public class PhylogeneticTree extends ReferencedMedia implements Cloneable{ |
|
45 |
public class PhylogeneticTree extends ReferencedMediaBase implements Cloneable{
|
|
46 | 46 |
private static final long serialVersionUID = -7020182117362324067L; |
47 | 47 |
private static final Logger logger = Logger.getLogger(PhylogeneticTree.class); |
48 | 48 |
|
cdmlib-persistence/src/main/resources/eu/etaxonomy/cdm/hibernate.cfg.xml | ||
---|---|---|
131 | 131 |
<mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/> |
132 | 132 |
<mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/> |
133 | 133 |
<mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/> |
134 |
<mapping class="eu.etaxonomy.cdm.model.media.ReferencedMedia"/> |
|
134 |
<mapping class="eu.etaxonomy.cdm.model.media.ReferencedMediaBase"/>
|
|
135 | 135 |
<mapping class="eu.etaxonomy.cdm.model.media.Rights"/> |
136 | 136 |
<mapping class="eu.etaxonomy.cdm.model.media.RightsTerm"/> |
137 | 137 |
<!-- Molecular Package --> |
cdmlib-persistence/src/test/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/CdmGenericDaoImplTest.java | ||
---|---|---|
104 | 104 |
import eu.etaxonomy.cdm.model.media.MediaRepresentation; |
105 | 105 |
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart; |
106 | 106 |
import eu.etaxonomy.cdm.model.media.MovieFile; |
107 |
import eu.etaxonomy.cdm.model.media.ReferencedMedia; |
|
107 |
import eu.etaxonomy.cdm.model.media.ReferencedMediaBase;
|
|
108 | 108 |
import eu.etaxonomy.cdm.model.media.Rights; |
109 | 109 |
import eu.etaxonomy.cdm.model.media.RightsTerm; |
110 | 110 |
import eu.etaxonomy.cdm.model.molecular.DnaSample; |
... | ... | |
404 | 404 |
MediaRepresentation.class, |
405 | 405 |
MediaRepresentationPart.class, |
406 | 406 |
MovieFile.class, |
407 |
ReferencedMedia.class, |
|
407 |
ReferencedMediaBase.class,
|
|
408 | 408 |
Rights.class, |
409 | 409 |
RightsTerm.class, |
410 | 410 |
DnaSample.class, |
Also available in: Unified diff
change name of ReferencedMedia to ReferencedMediaBase (#2381)