Project

General

Profile

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

    
21
import org.apache.log4j.Logger;
22
import org.hibernate.envers.Audited;
23

    
24
/**
25
 * This (abstract) class represents isolated sections (parts, chapters or
26
 * papers) within a {@link PrintedUnitBase printed unit}.
27
 * <P>
28
 * This class corresponds, according to the TDWG ontology, to the publication type
29
 * term (from PublicationTypeTerm): "SubReference".
30
 *   
31
 * @author m.doering
32
 * @version 1.0
33
 * @created 08-Nov-2007 13:06:51
34
 */
35
@XmlAccessorType(XmlAccessType.FIELD)
36
@XmlType(name = "SectionBase", propOrder = {
37
    "pages"
38
})
39
@XmlRootElement(name = "SectionBase")
40
@Entity
41
@Audited
42
public abstract class SectionBase extends StrictReferenceBase {
43
	
44
	static Logger logger = Logger.getLogger(SectionBase.class);
45
	
46
	@XmlElement(name = "Pages")
47
	private String pages;
48

    
49
	/**
50
	 * Returns the string representing the page(s) where the content of
51
	 * <i>this</i> section is located within the {@link PrintedUnitBase printed unit}.
52
	 * 
53
	 * @return  the string with the pages corresponding to <i>this</i> section
54
	 */
55
	public String getPages(){
56
		return this.pages;
57
	}
58

    
59
	/**
60
	 * @see #getPages()
61
	 */
62
	public void setPages(String pages){
63
		this.pages = pages;
64
	}
65

    
66
	/**
67
	 * Returns the {@link PrintedUnitBase printed unit} to which <i>this</i> section
68
	 * belongs.
69
	 * 
70
	 * @return  the printed unit containing <i>this</i> section
71
	 */
72
	public PrintedUnitBase getPrintedUnit(){
73
		logger.warn("Not yet implemented");
74
		return null;
75
	}
76

    
77
//*********** CLONE **********************************/	
78
	
79

    
80
	/** 
81
	 * Clones <i>this</i> section. This is a shortcut that enables to
82
	 * create a new instance that differs only slightly from <i>this</i> section
83
	 * by modifying only some of the attributes.<BR>
84
	 * This method overrides the clone method from {@link StrictReferenceBase StrictReferenceBase}.
85
	 * 
86
	 * @see StrictReferenceBase#clone()
87
	 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
88
	 * @see java.lang.Object#clone()
89
	 */
90
	@Override
91
	public Object clone(){
92
		SectionBase result = (SectionBase)super.clone();
93
		//no changes to: pages
94
		return result;
95
	}
96
}
(23-23/28)