Project

General

Profile

Download (1.99 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.reference;
11

    
12

    
13
import eu.etaxonomy.cdm.model.agent.Agent;
14
import eu.etaxonomy.cdm.model.media.IdentifyableMediaEntity;
15

    
16
import org.apache.log4j.Logger;
17
import org.hibernate.annotations.Cascade;
18
import org.hibernate.annotations.CascadeType;
19
import javax.persistence.*;
20

    
21
/**
22
 * A year() method is required to get the year of publication out of the
23
 * datePublished field
24
 * @author m.doering
25
 * @version 1.0
26
 * @created 08-Nov-2007 13:06:47
27
 */
28
@Entity
29
public abstract class ReferenceBase extends IdentifyableMediaEntity{
30
	static Logger logger = Logger.getLogger(ReferenceBase.class);
31
	//URIs like DOIs, LSIDs or Handles for this reference
32
	private String uri;
33
	//flag to subselect only references that could be useful for nomenclatural citations. If a reference is used as a
34
	//nomenclatural reference in a name this flag should be automatically set
35
	private boolean isNomenclaturallyRelevant;
36
	private Agent authorTeam;
37
	
38
	@ManyToOne
39
	@Cascade({CascadeType.SAVE_UPDATE})
40
	public Agent getAuthorTeam(){
41
		return this.authorTeam;
42
	}
43

    
44
	public void setAuthorTeam(Agent authorTeam){
45
		this.authorTeam = authorTeam;
46
	}
47

    
48
	public String getUri(){
49
		return this.uri;
50
	}
51
	public void setUri(String uri){
52
		this.uri = uri;
53
	}
54

    
55
	public boolean isNomenclaturallyRelevant(){
56
		return this.isNomenclaturallyRelevant;
57
	}
58

    
59
	/**
60
	 * 
61
	 * @param isNomenclaturallyRelevant    isNomenclaturallyRelevant
62
	 */
63
	public void setNomenclaturallyRelevant(boolean isNomenclaturallyRelevant){
64
		this.isNomenclaturallyRelevant = isNomenclaturallyRelevant;
65
	}
66

    
67
	/**
68
	 * returns a formatted string containing the entire reference citation including
69
	 * authors
70
	 */
71
	@Transient
72
	public String getCitation(){
73
		return "";
74
	}
75
	
76
	@Transient
77
	public abstract String getYear();
78

    
79
}
(20-20/26)