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
|
|
16
|
import org.apache.log4j.Logger;
|
17
|
|
18
|
/**
|
19
|
* This (abstract) class represents isolated sections (parts, chapters or
|
20
|
* papers) within a {@link PrintedUnitBase printed unit}.
|
21
|
* <P>
|
22
|
* This class corresponds, according to the TDWG ontology, to the publication type
|
23
|
* term (from PublicationTypeTerm): "SubReference".
|
24
|
*
|
25
|
* @author m.doering
|
26
|
* @version 1.0
|
27
|
* @created 08-Nov-2007 13:06:51
|
28
|
*/
|
29
|
@Entity
|
30
|
public abstract class SectionBase extends StrictReferenceBase {
|
31
|
static Logger logger = Logger.getLogger(SectionBase.class);
|
32
|
private String pages;
|
33
|
|
34
|
/**
|
35
|
* Returns the string representing the page(s) where the content of
|
36
|
* <i>this</i> section is located within the {@link PrintedUnitBase printed unit}.
|
37
|
*
|
38
|
* @return the string with the pages corresponding to <i>this</i> section
|
39
|
*/
|
40
|
public String getPages(){
|
41
|
return this.pages;
|
42
|
}
|
43
|
|
44
|
/**
|
45
|
* @see #getPages()
|
46
|
*/
|
47
|
public void setPages(String pages){
|
48
|
this.pages = pages;
|
49
|
}
|
50
|
|
51
|
/**
|
52
|
* Returns the {@link PrintedUnitBase printed unit} to which <i>this</i> section
|
53
|
* belongs.
|
54
|
*
|
55
|
* @return the printed unit containing <i>this</i> section
|
56
|
*/
|
57
|
@Transient
|
58
|
public PrintedUnitBase getPrintedUnit(){
|
59
|
logger.warn("Not yet implemented");
|
60
|
return null;
|
61
|
}
|
62
|
|
63
|
//*********** CLONE **********************************/
|
64
|
|
65
|
|
66
|
/**
|
67
|
* Clones <i>this</i> section. This is a shortcut that enables to
|
68
|
* create a new instance that differs only slightly from <i>this</i> section
|
69
|
* by modifying only some of the attributes.<BR>
|
70
|
* This method overrides the {@link StrictReferenceBase#clone() method} from StrictReferenceBase.
|
71
|
*
|
72
|
* @see StrictReferenceBase#clone()
|
73
|
* @see media.IdentifyableMediaEntity#clone()
|
74
|
* @see java.lang.Object#clone()
|
75
|
*/
|
76
|
@Override
|
77
|
public Object clone(){
|
78
|
SectionBase result = (SectionBase)super.clone();
|
79
|
//no changes to: pages
|
80
|
return result;
|
81
|
}
|
82
|
}
|