Project

General

Profile

Download (3.51 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 javax.persistence.Entity;
14
import javax.xml.bind.annotation.XmlAccessType;
15
import javax.xml.bind.annotation.XmlAccessorType;
16
import javax.xml.bind.annotation.XmlElement;
17
import javax.xml.bind.annotation.XmlRootElement;
18
import javax.xml.bind.annotation.XmlType;
19

    
20
import org.apache.log4j.Logger;
21
import org.hibernate.envers.Audited;
22
import org.hibernate.search.annotations.Field;
23
import org.hibernate.search.annotations.Index;
24
import org.hibernate.search.annotations.Indexed;
25
import org.springframework.beans.factory.annotation.Configurable;
26

    
27
import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy;
28
import eu.etaxonomy.cdm.strategy.cache.reference.JournalDefaultCacheStrategy;
29

    
30
/**
31
 * This class represents journals. A journal is a periodical {@link PublicationBase publication}
32
 * containing several {@link Article articles}.
33
 * <P>
34
 * This class corresponds, according to the TDWG ontology, to the publication type
35
 * term (from PublicationTypeTerm): "Journal".
36
 * 
37
 * @author m.doering
38
 * @version 1.0
39
 * @created 08-Nov-2007 13:06:31
40
 */
41
@XmlAccessorType(XmlAccessType.FIELD)
42
@XmlType(name = "Journal", propOrder = {
43
    "issn"
44
})
45
@XmlRootElement(name = "Journal")
46
@Entity
47
@Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
48
@Audited
49
@Configurable
50
public class Journal extends PublicationBase<IReferenceBaseCacheStrategy<Journal>> implements Cloneable {
51
	static Logger logger = Logger.getLogger(Journal.class);
52
	
53
	@XmlElement(name = "ISSN")
54
	@Field(index=Index.TOKENIZED)
55
	private String issn;
56

    
57
	
58
	/** 
59
	 * Class constructor: creates a new empty journal instance
60
	 * only containing the {@link eu.etaxonomy.cdm.strategy.cache.reference.JournalDefaultCacheStrategy default cache strategy}.
61
	 * 
62
	 * @see eu.etaxonomy.cdm.strategy.cache.reference.JournalDefaultCacheStrategy
63
	 */
64
	protected Journal(){
65
		super();
66
		cacheStrategy = JournalDefaultCacheStrategy.NewInstance();
67
	}
68
	
69

    
70
	/** 
71
	 * Creates a new empty journal instance
72
	 * only containing the {@link eu.etaxonomy.cdm.strategy.cache.reference.JournalDefaultCacheStrategy default cache strategy}.
73
	 * 
74
	 * @see #Journal()
75
	 * @see eu.etaxonomy.cdm.strategy.cache.reference.JournalDefaultCacheStrategy
76
	 */
77
	public static Journal NewInstance(){
78
		Journal result = new Journal();
79
		return result;
80
	}
81
	
82
	/**
83
	 * Returns the string representing the ISSN (International Standard Serial
84
	 * Number, a unique eight-digit number used to identify a periodical
85
	 * publication) of <i>this</i> journal.
86
	 * 
87
	 * @return  the string representing the ISSN
88
	 */
89
	public String getIssn(){
90
		return this.issn;
91
	}
92

    
93
	/**
94
	 * @see #getIssn()
95
	 */
96
	public void setIssn(String issn){
97
		this.issn = issn;
98
	}
99

    
100
	
101
//*********** CLONE **********************************/	
102
	
103
	/** 
104
	 * Clones <i>this</i> journal instance. This is a shortcut that enables to
105
	 * create a new instance that differs only slightly from <i>this</i>
106
	 * journal instance by modifying only some of the attributes.<BR>
107
	 * This method overrides the clone method from {@link StrictReferenceBase StrictReferenceBase}.
108
	 * 
109
	 * @see StrictReferenceBase#clone()
110
	 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
111
	 * @see java.lang.Object#clone()
112
	 */
113
	@Override
114
	public Journal clone(){
115
		return (Journal)super.clone();
116
	}
117

    
118
}
(12-12/28)