ed0c03003bb63fbb631f8487fe279425fe6d3099
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / reference / SectionBase.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.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.XmlRootElement;
17 import javax.xml.bind.annotation.XmlType;
18
19 import org.apache.log4j.Logger;
20 import org.hibernate.envers.Audited;
21 import org.hibernate.search.annotations.Indexed;
22
23 import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy;
24
25 /**
26 * This (abstract) class represents isolated sections (parts, chapters or
27 * papers) within a {@link PrintedUnitBase printed unit}.
28 * <P>
29 * This class corresponds, according to the TDWG ontology, to the publication type
30 * term (from PublicationTypeTerm): "SubReference".
31 *
32 * @author m.doering
33 * @version 1.0
34 * @created 08-Nov-2007 13:06:51
35 */
36 @XmlAccessorType(XmlAccessType.FIELD)
37 @XmlType(name = "SectionBase", propOrder = {
38 // "pages"
39 })
40 @XmlRootElement(name = "SectionBase")
41 @Entity
42 @Indexed(index = "eu.etaxonomy.cdm.model.reference.ReferenceBase")
43 @Audited
44 @Deprecated
45 public abstract class SectionBase<S extends IReferenceBaseCacheStrategy> extends ReferenceBase<S> {
46 private static final long serialVersionUID = -2430228069266443975L;
47 @SuppressWarnings("unused")
48 private static final Logger logger = Logger.getLogger(SectionBase.class);
49
50 // @XmlElement(name = "Pages")
51 // @Field(index=Index.TOKENIZED)
52 // private String pages;
53
54 /**
55 * Returns the string representing the page(s) where the content of
56 * <i>this</i> section is located within the {@link PrintedUnitBase printed unit}.
57 *
58 * @return the string with the pages corresponding to <i>this</i> section
59 */
60 public String getPages(){
61 return this.pages;
62 }
63
64 /**
65 * @see #getPages()
66 */
67 public void setPages(String pages){
68 this.pages = pages;
69 }
70
71
72
73
74
75 /**
76 * Clones <i>this</i> section. This is a shortcut that enables to
77 * create a new instance that differs only slightly from <i>this</i> section
78 * by modifying only some of the attributes.<BR>
79 * This method overrides the clone method from {@link StrictReferenceBase StrictReferenceBase}.
80 *
81 * @see StrictReferenceBase#clone()
82 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
83 * @see java.lang.Object#clone()
84 */
85 @Override
86 public Object clone(){
87 SectionBase result = (SectionBase)super.clone();
88 //no changes to: pages
89 return result;
90 }
91 }