2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.model
.reference
;
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
;
21 import org
.apache
.log4j
.Logger
;
22 import org
.hibernate
.envers
.Audited
;
23 import org
.hibernate
.search
.annotations
.Field
;
24 import org
.hibernate
.search
.annotations
.Index
;
25 import org
.hibernate
.search
.annotations
.Indexed
;
27 import eu
.etaxonomy
.cdm
.strategy
.cache
.reference
.IReferenceBaseCacheStrategy
;
30 * This (abstract) class represents isolated sections (parts, chapters or
31 * papers) within a {@link PrintedUnitBase printed unit}.
33 * This class corresponds, according to the TDWG ontology, to the publication type
34 * term (from PublicationTypeTerm): "SubReference".
38 * @created 08-Nov-2007 13:06:51
40 @XmlAccessorType(XmlAccessType
.FIELD
)
41 @XmlType(name
= "SectionBase", propOrder
= {
44 @XmlRootElement(name
= "SectionBase")
46 @Indexed(index
= "eu.etaxonomy.cdm.model.reference.ReferenceBase")
48 public abstract class SectionBase
<S
extends IReferenceBaseCacheStrategy
> extends StrictReferenceBase
<S
> {
50 static Logger logger
= Logger
.getLogger(SectionBase
.class);
52 @XmlElement(name
= "Pages")
53 @Field(index
=Index
.TOKENIZED
)
57 * Returns the string representing the page(s) where the content of
58 * <i>this</i> section is located within the {@link PrintedUnitBase printed unit}.
60 * @return the string with the pages corresponding to <i>this</i> section
62 public String
getPages(){
69 public void setPages(String pages
){
74 * Returns the {@link PrintedUnitBase printed unit} to which <i>this</i> section
77 * @return the printed unit containing <i>this</i> section
80 public PrintedUnitBase
getPrintedUnit(){
81 logger
.warn("Not yet implemented");
85 //*********** CLONE **********************************/
89 * Clones <i>this</i> section. This is a shortcut that enables to
90 * create a new instance that differs only slightly from <i>this</i> section
91 * by modifying only some of the attributes.<BR>
92 * This method overrides the clone method from {@link StrictReferenceBase StrictReferenceBase}.
94 * @see StrictReferenceBase#clone()
95 * @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
96 * @see java.lang.Object#clone()
99 public Object
clone(){
100 SectionBase result
= (SectionBase
)super.clone();
101 //no changes to: pages