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 java.util.List;
|
14
|
|
15
|
import javax.persistence.Column;
|
16
|
import javax.persistence.Embedded;
|
17
|
import javax.persistence.Entity;
|
18
|
import javax.persistence.FetchType;
|
19
|
import javax.persistence.Inheritance;
|
20
|
import javax.persistence.InheritanceType;
|
21
|
import javax.persistence.Lob;
|
22
|
import javax.persistence.ManyToOne;
|
23
|
import javax.persistence.Transient;
|
24
|
import javax.validation.constraints.Pattern;
|
25
|
import javax.xml.bind.annotation.XmlAccessType;
|
26
|
import javax.xml.bind.annotation.XmlAccessorType;
|
27
|
import javax.xml.bind.annotation.XmlAttribute;
|
28
|
import javax.xml.bind.annotation.XmlElement;
|
29
|
import javax.xml.bind.annotation.XmlIDREF;
|
30
|
import javax.xml.bind.annotation.XmlRootElement;
|
31
|
import javax.xml.bind.annotation.XmlSchemaType;
|
32
|
import javax.xml.bind.annotation.XmlType;
|
33
|
|
34
|
import org.apache.log4j.Logger;
|
35
|
import org.hibernate.annotations.Cascade;
|
36
|
import org.hibernate.annotations.CascadeType;
|
37
|
import org.hibernate.annotations.Table;
|
38
|
import org.hibernate.envers.Audited;
|
39
|
import org.hibernate.search.annotations.Field;
|
40
|
import org.hibernate.search.annotations.Index;
|
41
|
import org.hibernate.search.annotations.IndexedEmbedded;
|
42
|
import org.hibernate.validator.constraints.Length;
|
43
|
|
44
|
import eu.etaxonomy.cdm.model.agent.Institution;
|
45
|
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
|
46
|
import eu.etaxonomy.cdm.model.common.TimePeriod;
|
47
|
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
|
48
|
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
49
|
import eu.etaxonomy.cdm.strategy.cache.reference.ArticleDefaultCacheStrategy;
|
50
|
import eu.etaxonomy.cdm.strategy.cache.reference.BookDefaultCacheStrategy;
|
51
|
import eu.etaxonomy.cdm.strategy.cache.reference.BookSectionDefaultCacheStrategy;
|
52
|
import eu.etaxonomy.cdm.strategy.cache.reference.GenericDefaultCacheStrategy;
|
53
|
import eu.etaxonomy.cdm.strategy.cache.reference.INomenclaturalReferenceCacheStrategy;
|
54
|
import eu.etaxonomy.cdm.strategy.cache.reference.IReferenceBaseCacheStrategy;
|
55
|
import eu.etaxonomy.cdm.strategy.cache.reference.JournalDefaultCacheStrategy;
|
56
|
import eu.etaxonomy.cdm.strategy.cache.reference.ReferenceBaseDefaultCacheStrategy;
|
57
|
import eu.etaxonomy.cdm.strategy.match.Match;
|
58
|
import eu.etaxonomy.cdm.strategy.match.MatchMode;
|
59
|
import eu.etaxonomy.cdm.strategy.merge.Merge;
|
60
|
import eu.etaxonomy.cdm.strategy.merge.MergeMode;
|
61
|
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
|
62
|
import eu.etaxonomy.cdm.validation.Level2;
|
63
|
//import eu.etaxonomy.cdm.validation.annotation.InReference;
|
64
|
import eu.etaxonomy.cdm.validation.annotation.NullOrNotEmpty;
|
65
|
|
66
|
/**
|
67
|
* The upmost (abstract) class for references (information sources). Its two
|
68
|
* direct subclasses {@link StrictReferenceBase StrictReferenceBase} and {@link BibtexReference BibtexReference}
|
69
|
* allow either on the one side to handle different kind of references with their
|
70
|
* peculiarities or on the other side to follow the flat BibTeX format
|
71
|
* (see "http://en.wikipedia.org/wiki/BibTeX").
|
72
|
* <P>
|
73
|
* This class corresponds to: <ul>
|
74
|
* <li> PublicationCitation according to the TDWG ontology
|
75
|
* <li> Publication according to the TCS
|
76
|
* <li> Reference according to the ABCD schema
|
77
|
* </ul>
|
78
|
*
|
79
|
* @author m.doering
|
80
|
* @version 1.0
|
81
|
* @created 08-Nov-2007 13:06:47
|
82
|
*/
|
83
|
@XmlAccessorType(XmlAccessType.FIELD)
|
84
|
@XmlType(name = "Reference", propOrder = {
|
85
|
"type",
|
86
|
"uri",
|
87
|
"nomenclaturallyRelevant",
|
88
|
"authorTeam",
|
89
|
"referenceAbstract",
|
90
|
"title",
|
91
|
"editor",
|
92
|
"volume",
|
93
|
"pages",
|
94
|
"series",
|
95
|
"edition",
|
96
|
"isbn",
|
97
|
"issn",
|
98
|
"seriesPart",
|
99
|
"datePublished",
|
100
|
"publisher",
|
101
|
"placePublished",
|
102
|
"institution",
|
103
|
"school",
|
104
|
"organization",
|
105
|
"inReference"
|
106
|
// ,"fullReference",
|
107
|
// "abbreviatedReference"
|
108
|
})
|
109
|
@XmlRootElement(name = "ReferenceBase")
|
110
|
@Entity
|
111
|
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
|
112
|
@Audited
|
113
|
@javax.persistence.Table(name="Reference")
|
114
|
@Table(appliesTo="Reference", indexes = { @org.hibernate.annotations.Index(name = "ReferenceTitleCacheIndex", columnNames = { "titleCache" }) })
|
115
|
//@InReference(groups = Level2.class)
|
116
|
//public abstract class ReferenceBase<S extends IReferenceBaseCacheStrategy> extends IdentifiableMediaEntity<S> implements IParsable, IMergable, IMatchable, IArticle, IBook, IJournal, IBookSection,ICdDvd,IGeneric,IInProceedings, IProceedings, IPrintSeries, IReport, IThesis,IWebPage {
|
117
|
public class ReferenceBase<S extends IReferenceBaseCacheStrategy> extends IdentifiableMediaEntity<S> implements INomenclaturalReference, IArticle, IBook, IPatent, IDatabase, IJournal, IBookSection,ICdDvd,IGeneric,IInProceedings, IProceedings, IPrintSeries, IReport, IThesis,IWebPage, IPersonalCommunication, IReferenceBase, Cloneable {
|
118
|
private static final long serialVersionUID = -2034764545042691295L;
|
119
|
private static final Logger logger = Logger.getLogger(ReferenceBase.class);
|
120
|
|
121
|
@XmlAttribute(name ="type")
|
122
|
@Column(name="refType")
|
123
|
protected ReferenceType type;
|
124
|
|
125
|
//Title of the reference
|
126
|
@XmlElement(name ="Title" )
|
127
|
@Column(length=4096, name="title")
|
128
|
@Lob
|
129
|
@Field(index=Index.TOKENIZED)
|
130
|
@Match(MatchMode.EQUAL_REQUIRED)
|
131
|
@NullOrNotEmpty
|
132
|
@Length(max = 4096)
|
133
|
private String title;
|
134
|
|
135
|
//********************************************************/
|
136
|
|
137
|
|
138
|
@XmlElement(name = "Editor")
|
139
|
@Field(index=Index.TOKENIZED)
|
140
|
@NullOrNotEmpty
|
141
|
@Length(max = 255)
|
142
|
protected String editor;
|
143
|
|
144
|
@XmlElement(name = "Series")
|
145
|
@Field(index=Index.TOKENIZED)
|
146
|
@NullOrNotEmpty
|
147
|
@Length(max = 255)
|
148
|
protected String series;
|
149
|
|
150
|
@XmlElement(name = "Volume")
|
151
|
@Field(index=Index.TOKENIZED)
|
152
|
@NullOrNotEmpty
|
153
|
@Length(max = 255)
|
154
|
protected String volume;
|
155
|
|
156
|
@XmlElement(name = "Pages")
|
157
|
@Field(index=Index.TOKENIZED)
|
158
|
@NullOrNotEmpty
|
159
|
@Length(max = 255)
|
160
|
protected String pages;
|
161
|
|
162
|
@XmlElement(name = "Edition")
|
163
|
@Field(index=Index.TOKENIZED)
|
164
|
@NullOrNotEmpty
|
165
|
@Length(max = 255)
|
166
|
protected String edition;
|
167
|
|
168
|
@XmlElement(name = "ISBN")
|
169
|
@Field(index=Index.TOKENIZED)
|
170
|
@NullOrNotEmpty
|
171
|
@Length(max = 255)
|
172
|
@Pattern(regexp = "(?=.{13}$)\\d{1,5}([- ])\\d{1,7}\\1\\d{1,6}\\1(\\d|X)$", groups = Level2.class, message = "{eu.etaxonomy.cdm.model.reference.ReferenceBase.isbn.message}")
|
173
|
protected String isbn;
|
174
|
|
175
|
@XmlElement(name = "ISSN")
|
176
|
@Field(index=Index.TOKENIZED)
|
177
|
@NullOrNotEmpty
|
178
|
@Length(max = 255)
|
179
|
@Pattern(regexp = "(?=.{9}$)\\d{4}([- ])\\d{4} (\\d|X)$", groups = Level2.class, message = "{eu.etaxonomy.cdm.model.reference.ReferenceBase.issn.message}")
|
180
|
protected String issn;
|
181
|
|
182
|
@XmlElement(name = "SeriesPart")
|
183
|
@Field(index=Index.TOKENIZED)
|
184
|
@NullOrNotEmpty
|
185
|
@Length(max = 255)
|
186
|
protected String seriesPart;
|
187
|
|
188
|
@XmlElement(name = "Organization")
|
189
|
@Field(index=Index.TOKENIZED)
|
190
|
@NullOrNotEmpty
|
191
|
@Length(max = 255)
|
192
|
protected String organization;
|
193
|
|
194
|
@XmlElement(name = "Publisher")
|
195
|
@Field(index=Index.TOKENIZED)
|
196
|
@NullOrNotEmpty
|
197
|
@Length(max = 255)
|
198
|
protected String publisher;
|
199
|
|
200
|
|
201
|
@XmlElement(name = "PlacePublished")
|
202
|
@Field(index=Index.TOKENIZED)
|
203
|
@NullOrNotEmpty
|
204
|
@Length(max = 255)
|
205
|
protected String placePublished;
|
206
|
|
207
|
@XmlElement(name = "Institution")
|
208
|
@XmlIDREF
|
209
|
@XmlSchemaType(name = "IDREF")
|
210
|
@ManyToOne(fetch = FetchType.LAZY)
|
211
|
@IndexedEmbedded
|
212
|
@Cascade(CascadeType.SAVE_UPDATE)
|
213
|
protected Institution institution;
|
214
|
|
215
|
@XmlElement(name = "School")
|
216
|
@XmlIDREF
|
217
|
@XmlSchemaType(name = "IDREF")
|
218
|
@ManyToOne(fetch = FetchType.LAZY)
|
219
|
@IndexedEmbedded
|
220
|
@Cascade(CascadeType.SAVE_UPDATE)
|
221
|
protected Institution school;
|
222
|
|
223
|
@XmlElement(name = "InReference")
|
224
|
@XmlIDREF
|
225
|
@XmlSchemaType(name = "IDREF")
|
226
|
@ManyToOne(fetch = FetchType.LAZY)
|
227
|
|
228
|
// @IndexedEmbedded
|
229
|
@Cascade(CascadeType.SAVE_UPDATE)
|
230
|
//@InReference(groups=Level2.class)
|
231
|
protected ReferenceBase inReference;
|
232
|
|
233
|
// @XmlElement(name = "FullReference")
|
234
|
// @XmlIDREF
|
235
|
// @XmlSchemaType(name = "IDREF")
|
236
|
// @ManyToOne(fetch = FetchType.LAZY)
|
237
|
//// @IndexedEmbedded
|
238
|
// @Cascade(CascadeType.SAVE_UPDATE)
|
239
|
// protected ReferenceBase fullReference;
|
240
|
//
|
241
|
// @XmlElement(name = "AbbreviatedReference")
|
242
|
// @XmlIDREF
|
243
|
// @XmlSchemaType(name = "IDREF")
|
244
|
// @ManyToOne(fetch = FetchType.LAZY)
|
245
|
//// @IndexedEmbedded
|
246
|
// @Cascade(CascadeType.SAVE_UPDATE)
|
247
|
// protected ReferenceBase abbreviatedReference;
|
248
|
|
249
|
|
250
|
//********************************************************/
|
251
|
|
252
|
//The date range assigned to the reference. ISO Date range like. Flexible, year can be left out, etc
|
253
|
@XmlElement(name ="DatePublished" )
|
254
|
@Embedded
|
255
|
@IndexedEmbedded
|
256
|
private TimePeriod datePublished = TimePeriod.NewInstance();
|
257
|
|
258
|
@XmlElement(name ="Abstract" )
|
259
|
@Column(length=65536, name="referenceAbstract")
|
260
|
@Lob
|
261
|
@Field(index=Index.TOKENIZED)
|
262
|
@NullOrNotEmpty
|
263
|
@Length(max = 65536)
|
264
|
private String referenceAbstract; //abstract is a reserved term in Java
|
265
|
|
266
|
//URIs like DOIs, LSIDs or Handles for this reference
|
267
|
@XmlElement(name = "URI")
|
268
|
@Field(index=org.hibernate.search.annotations.Index.UN_TOKENIZED)
|
269
|
@NullOrNotEmpty
|
270
|
@Length(max = 255)
|
271
|
@Pattern(regexp = "^([a-z0-9+.-]+):(?://(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(\\d*))?(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?|(/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?)(?:\\?((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?$", groups = Level2.class, message = "{eu.etaxonomy.cdm.model.reference.ReferenceBase.uri.message}")
|
272
|
private String uri;
|
273
|
|
274
|
//flag to subselect only references that could be useful for nomenclatural citations. If a reference is used as a
|
275
|
//nomenclatural reference in a name this flag should be automatically set
|
276
|
@XmlElement(name = "IsNomenclaturallyRelevant")
|
277
|
@Merge(MergeMode.OR)
|
278
|
private boolean nomenclaturallyRelevant;
|
279
|
|
280
|
@XmlElement(name = "AuthorTeam")
|
281
|
@XmlIDREF
|
282
|
@XmlSchemaType(name = "IDREF")
|
283
|
@ManyToOne(fetch = FetchType.LAZY)
|
284
|
@IndexedEmbedded
|
285
|
@Cascade(CascadeType.SAVE_UPDATE)
|
286
|
private TeamOrPersonBase authorTeam;
|
287
|
|
288
|
// @XmlElement(name = "ReferenceIdentity")
|
289
|
// @XmlIDREF
|
290
|
// @XmlSchemaType(name = "IDREF")
|
291
|
// @ManyToOne(fetch = FetchType.LAZY)
|
292
|
// //@IndexedEmbedded
|
293
|
// @Cascade(CascadeType.SAVE_UPDATE)
|
294
|
// @Transient
|
295
|
// private ReferenceIdentity referenceIdentity;
|
296
|
|
297
|
@XmlAttribute
|
298
|
@Match(MatchMode.IGNORE)
|
299
|
private int parsingProblem = 0;
|
300
|
|
301
|
@XmlAttribute
|
302
|
@Match(MatchMode.IGNORE)
|
303
|
private int problemStarts = -1;
|
304
|
|
305
|
@XmlAttribute
|
306
|
@Match(MatchMode.IGNORE)
|
307
|
private int problemEnds = -1;
|
308
|
|
309
|
@Transient
|
310
|
@XmlAttribute
|
311
|
@Match(MatchMode.IGNORE)
|
312
|
private boolean cacheStrategyRectified = false;
|
313
|
|
314
|
protected ReferenceBase(){
|
315
|
super();
|
316
|
this.type = ReferenceType.Generic;
|
317
|
this.cacheStrategy =(S)this.type.getCacheStrategy();
|
318
|
}
|
319
|
|
320
|
protected ReferenceBase(ReferenceType type) {
|
321
|
this.type = type;
|
322
|
this.cacheStrategy =(S) type.getCacheStrategy();
|
323
|
}
|
324
|
|
325
|
|
326
|
//*************************** GETTER / SETTER ******************************************/
|
327
|
public String getEditor() {
|
328
|
return editor;
|
329
|
}
|
330
|
|
331
|
public void setEditor(String editor) {
|
332
|
this.editor = editor;
|
333
|
}
|
334
|
|
335
|
public String getSeries() {
|
336
|
return series;
|
337
|
}
|
338
|
|
339
|
public void setSeries(String series) {
|
340
|
this.series = series;
|
341
|
}
|
342
|
|
343
|
public String getVolume() {
|
344
|
return volume;
|
345
|
}
|
346
|
|
347
|
public void setVolume(String volume) {
|
348
|
this.volume = volume;
|
349
|
}
|
350
|
|
351
|
public String getPages() {
|
352
|
return pages;
|
353
|
}
|
354
|
|
355
|
public void setPages(String pages) {
|
356
|
this.pages = pages;
|
357
|
}
|
358
|
|
359
|
public String getEdition() {
|
360
|
return edition;
|
361
|
}
|
362
|
|
363
|
public void setEdition(String edition) {
|
364
|
this.edition = edition;
|
365
|
}
|
366
|
|
367
|
public String getIsbn() {
|
368
|
return isbn;
|
369
|
}
|
370
|
|
371
|
public void setIsbn(String isbn) {
|
372
|
this.isbn = isbn;
|
373
|
}
|
374
|
|
375
|
public String getIssn() {
|
376
|
return issn;
|
377
|
}
|
378
|
|
379
|
public void setIssn(String issn) {
|
380
|
this.issn = issn;
|
381
|
}
|
382
|
|
383
|
public String getSeriesPart() {
|
384
|
return seriesPart;
|
385
|
}
|
386
|
|
387
|
public void setSeriesPart(String seriesPart) {
|
388
|
this.seriesPart = seriesPart;
|
389
|
}
|
390
|
|
391
|
public String getOrganization() {
|
392
|
return organization;
|
393
|
}
|
394
|
|
395
|
public void setOrganization(String organization) {
|
396
|
this.organization = organization;
|
397
|
}
|
398
|
|
399
|
public String getPublisher() {
|
400
|
return publisher;
|
401
|
}
|
402
|
|
403
|
public void setPublisher(String publisher) {
|
404
|
this.publisher = publisher;
|
405
|
}
|
406
|
|
407
|
public void setPublisher(String publisher, String placePublished){
|
408
|
this.publisher = publisher;
|
409
|
this.placePublished = placePublished;
|
410
|
}
|
411
|
|
412
|
public String getPlacePublished() {
|
413
|
return placePublished;
|
414
|
}
|
415
|
|
416
|
public void setPlacePublished(String placePublished) {
|
417
|
this.placePublished = placePublished;
|
418
|
}
|
419
|
|
420
|
public Institution getInstitution() {
|
421
|
return institution;
|
422
|
}
|
423
|
|
424
|
public void setInstitution(Institution institution) {
|
425
|
this.institution = institution;
|
426
|
}
|
427
|
|
428
|
public Institution getSchool() {
|
429
|
return school;
|
430
|
}
|
431
|
|
432
|
public void setSchool(Institution school) {
|
433
|
this.school = school;
|
434
|
}
|
435
|
|
436
|
public ReferenceBase getInReference() {
|
437
|
return inReference;
|
438
|
}
|
439
|
|
440
|
public void setInReference(ReferenceBase inReference) {
|
441
|
this.inReference = inReference;
|
442
|
}
|
443
|
|
444
|
public void setType(ReferenceType type) {
|
445
|
this.setCacheStrategy((S) type.getCacheStrategy());
|
446
|
this.type = type;
|
447
|
}
|
448
|
|
449
|
/**
|
450
|
* @return the type
|
451
|
*/
|
452
|
public ReferenceType getType() {
|
453
|
return type;
|
454
|
}
|
455
|
|
456
|
/**
|
457
|
* Whether this reference is of the given type
|
458
|
*
|
459
|
* @param type
|
460
|
* @return
|
461
|
*/
|
462
|
public boolean isOfType(ReferenceType type){
|
463
|
return type == getType();
|
464
|
}
|
465
|
|
466
|
/**
|
467
|
* Returns a string representing the title of <i>this</i> reference. If a
|
468
|
* reference has different titles (for instance abbreviated and not
|
469
|
* abbreviated) then for each title a new instance must be created.
|
470
|
*
|
471
|
* @return the title string of <i>this</i> reference
|
472
|
* @see #getCitation()
|
473
|
*/
|
474
|
public String getTitle(){
|
475
|
return this.title;
|
476
|
}
|
477
|
/**
|
478
|
* @see #getTitle()
|
479
|
*/
|
480
|
public void setTitle(String title){
|
481
|
this.title = title;
|
482
|
}
|
483
|
|
484
|
/**
|
485
|
* Returns the date (mostly only the year) of publication / creation of
|
486
|
* <i>this</i> reference.
|
487
|
*/
|
488
|
public TimePeriod getDatePublished(){
|
489
|
return this.datePublished;
|
490
|
}
|
491
|
/**
|
492
|
* @see #getDatePublished()
|
493
|
*/
|
494
|
public void setDatePublished(TimePeriod datePublished){
|
495
|
this.datePublished = datePublished;
|
496
|
}
|
497
|
|
498
|
/**
|
499
|
* Returns the {@link eu.etaxonomy.cdm.model.agent.TeamOrPersonBase author (team)} who created the
|
500
|
* content of <i>this</i> reference.
|
501
|
*
|
502
|
* @return the author (team) of <i>this</i> reference
|
503
|
* @see eu.etaxonomy.cdm.model.agent.TeamOrPersonBase
|
504
|
*/
|
505
|
public TeamOrPersonBase getAuthorTeam(){
|
506
|
return this.authorTeam;
|
507
|
}
|
508
|
|
509
|
/**
|
510
|
* @see #getAuthorTeam()
|
511
|
*/
|
512
|
public void setAuthorTeam(TeamOrPersonBase authorTeam){
|
513
|
this.authorTeam = authorTeam;
|
514
|
}
|
515
|
|
516
|
/**
|
517
|
* Returns the Uniform Resource Identifier (URI) corresponding to <i>this</i>
|
518
|
* reference. An URI is a string of characters used to identify a resource
|
519
|
* on the Internet.
|
520
|
*
|
521
|
* @return the URI of <i>this</i> reference
|
522
|
*/
|
523
|
public String getUri(){
|
524
|
return this.uri;
|
525
|
}
|
526
|
/**
|
527
|
* @see #getUri()
|
528
|
*/
|
529
|
public void setUri(String uri){
|
530
|
this.uri = uri;
|
531
|
}
|
532
|
|
533
|
/**
|
534
|
* @return the referenceAbstract
|
535
|
*/
|
536
|
public String getReferenceAbstract() {
|
537
|
return referenceAbstract;
|
538
|
}
|
539
|
|
540
|
/**
|
541
|
* @param referenceAbstract the referenceAbstract to set
|
542
|
*/
|
543
|
public void setReferenceAbstract(String referenceAbstract) {
|
544
|
this.referenceAbstract = referenceAbstract;
|
545
|
}
|
546
|
|
547
|
|
548
|
|
549
|
|
550
|
/**
|
551
|
* Returns "true" if the isNomenclaturallyRelevant flag is set. This
|
552
|
* indicates that a {@link TaxonNameBase taxon name} has been originally
|
553
|
* published in <i>this</i> reference following the rules of a
|
554
|
* {@link eu.etaxonomy.cdm.model.name.NomenclaturalCode nomenclature code} and is therefore used for
|
555
|
* nomenclatural citations. This flag will be set as soon as <i>this</i>
|
556
|
* reference is used as a nomenclatural reference for any taxon name.<BR>
|
557
|
* FIXME what happens if the only taxon name referencing this reference is not
|
558
|
* any longer using this reference as a nomenclatural reference. How does the
|
559
|
* reference get informed about the fact that it is not nomenclaturally relevant
|
560
|
* anymore?
|
561
|
*/
|
562
|
public boolean isNomenclaturallyRelevant(){
|
563
|
return this.nomenclaturallyRelevant;
|
564
|
}
|
565
|
|
566
|
/**
|
567
|
* @see #isNomenclaturallyRelevant()
|
568
|
*/
|
569
|
public void setNomenclaturallyRelevant(boolean nomenclaturallyRelevant){
|
570
|
this.nomenclaturallyRelevant = nomenclaturallyRelevant;
|
571
|
}
|
572
|
|
573
|
|
574
|
// /**
|
575
|
// * Returns the full reference that belongs to this abbreviated reference. If this
|
576
|
// * reference is not abbreviated the full reference should be <code>null</code>.<BR>
|
577
|
// * A full reference should be added to a reference
|
578
|
// * which represents the abbreviated form of a reference. The full reference can be used
|
579
|
// * by publication tools to link to the unabbreviated and therefore more complete version
|
580
|
// * of the reference.
|
581
|
// *
|
582
|
// * @see #getAbbreviatedReference()
|
583
|
// * @return the full reference
|
584
|
// */
|
585
|
// public ReferenceBase getFullReference() {
|
586
|
// return fullReference;
|
587
|
// }
|
588
|
//
|
589
|
// /**
|
590
|
// * @see #getFullReference()
|
591
|
// * @param fullReference
|
592
|
// */
|
593
|
// public void setFullReference(ReferenceBase fullReference) {
|
594
|
// this.fullReference = fullReference;
|
595
|
// }
|
596
|
//
|
597
|
// /**
|
598
|
// * Returns the abbreviated reference that belongs to this full reference. If this
|
599
|
// * reference is not a full reference the abbeviated referece must be <code>null</code>.<BR>
|
600
|
// * An abbreviated reference should be added to a reference which represents the long (full)
|
601
|
// * form of a reference.
|
602
|
// * In future this may become a set or handled differently as there are multiple
|
603
|
// *
|
604
|
// * @see #getFullReference()
|
605
|
// * @return the full reference
|
606
|
// */
|
607
|
// public ReferenceBase getAbbreviatedReference() {
|
608
|
// return abbreviatedReference;
|
609
|
// }
|
610
|
//
|
611
|
// /**
|
612
|
// * @see #getAbbreviatedReference()
|
613
|
// * @param abbreviatedReference
|
614
|
// *
|
615
|
// */
|
616
|
// public void setAbbreviatedReference(ReferenceBase abbreviatedReference) {
|
617
|
// this.abbreviatedReference = abbreviatedReference;
|
618
|
// }
|
619
|
|
620
|
//**************************************************** /
|
621
|
|
622
|
// /**
|
623
|
// * Returns the string representing the name of the editor of <i>this</i>
|
624
|
// * generic reference. An editor is mostly a person (team) who assumed the
|
625
|
// * responsibility for the content of the publication as a whole without
|
626
|
// * being the author of this content.<BR>
|
627
|
// * If there is an editor then the generic reference must be some
|
628
|
// * kind of {@link PrintedUnitBase physical printed unit}.
|
629
|
// *
|
630
|
// * @return the string identifying the editor of <i>this</i>
|
631
|
// * generic reference
|
632
|
// * @see #getPublisher()
|
633
|
// */
|
634
|
// protected String getEditor(){
|
635
|
// return this.editor;
|
636
|
// }
|
637
|
//
|
638
|
// /**
|
639
|
// * @see #getEditor()
|
640
|
// */
|
641
|
// protected void setEditor(String editor){
|
642
|
// this.editor = editor;
|
643
|
// }
|
644
|
//
|
645
|
// /**
|
646
|
// * Returns the string representing the series (for instance for books or
|
647
|
// * within journals) - and series part - in which <i>this</i> generic reference
|
648
|
// * was published.<BR>
|
649
|
// * If there is a series then the generic reference must be some
|
650
|
// * kind of {@link PrintedUnitBase physical printed unit} or an {@link Article article}.
|
651
|
// *
|
652
|
// * @return the string identifying the series for <i>this</i>
|
653
|
// * generic reference
|
654
|
// */
|
655
|
// protected String getSeries(){
|
656
|
// return this.series;
|
657
|
// }
|
658
|
//
|
659
|
// /**
|
660
|
// * @see #getSeries()
|
661
|
// */
|
662
|
// protected void setSeries(String series){
|
663
|
// this.series = series;
|
664
|
// }
|
665
|
//
|
666
|
// /**
|
667
|
// * Returns the string representing the volume (for instance for books or
|
668
|
// * within journals) in which <i>this</i> generic reference was published.<BR>
|
669
|
// * If there is a volume then the generic reference must be some
|
670
|
// * kind of {@link PrintedUnitBase physical printed unit} or an {@link Article article}.
|
671
|
// *
|
672
|
// * @return the string identifying the volume for <i>this</i>
|
673
|
// * generic reference
|
674
|
// */
|
675
|
// protected String getVolume(){
|
676
|
// return this.volume;
|
677
|
// }
|
678
|
//
|
679
|
// /**
|
680
|
// * @see #getVolume()
|
681
|
// */
|
682
|
// protected void setVolume(String volume){
|
683
|
// this.volume = volume;
|
684
|
// }
|
685
|
//
|
686
|
// /**
|
687
|
// * Returns the string representing the page(s) where the content of
|
688
|
// * <i>this</i> generic reference is located.<BR>
|
689
|
// * If there is a pages information then the generic reference must be some
|
690
|
// * kind of {@link PrintedUnitBase physical printed unit} or an {@link Article article}.
|
691
|
// *
|
692
|
// * @return the string containing the pages corresponding to <i>this</i>
|
693
|
// * generic reference
|
694
|
// */
|
695
|
// protected String getPages(){
|
696
|
// return this.pages;
|
697
|
// }
|
698
|
//
|
699
|
// /**
|
700
|
// * @see #getPages()
|
701
|
// */
|
702
|
// protected void setPages(String pages){
|
703
|
// this.pages = pages;
|
704
|
// }
|
705
|
|
706
|
|
707
|
/**
|
708
|
* Returns a formatted string containing the entire reference citation,
|
709
|
* including authors, corresponding to <i>this</i> reference.
|
710
|
*
|
711
|
* @see #generateTitle()
|
712
|
*/
|
713
|
// TODO implement
|
714
|
@Transient
|
715
|
public String getCitation(){
|
716
|
rectifyCacheStrategy();
|
717
|
if (cacheStrategy == null){
|
718
|
logger.warn("No CacheStrategy defined for "+ this.getClass() + ": " + this.getUuid());
|
719
|
return null;
|
720
|
}else{
|
721
|
return cacheStrategy.getTitleCache(this);
|
722
|
}
|
723
|
}
|
724
|
|
725
|
/* (non-Javadoc)
|
726
|
* @see eu.etaxonomy.cdm.model.common.IdentifiableEntity#generateTitle()
|
727
|
*/
|
728
|
public String generateTitle() {
|
729
|
rectifyCacheStrategy();
|
730
|
return super.generateTitle();
|
731
|
}
|
732
|
|
733
|
/**
|
734
|
* Returns a string representation for the year of publication / creation
|
735
|
* of <i>this</i> reference. The string is obtained by transformation of
|
736
|
* the {@link #getDatePublished() datePublished} attribute.
|
737
|
*/
|
738
|
@Transient
|
739
|
public String getYear(){
|
740
|
TimePeriod datePublished = this.getDatePublished();
|
741
|
if (datePublished != null ){
|
742
|
return getDatePublished().getYear();
|
743
|
}else{
|
744
|
return null;
|
745
|
}
|
746
|
}
|
747
|
|
748
|
|
749
|
|
750
|
/* (non-Javadoc)
|
751
|
* @see eu.etaxonomy.cdm.model.common.IParsable#getHasProblem()
|
752
|
*/
|
753
|
public int getParsingProblem(){
|
754
|
return this.parsingProblem;
|
755
|
}
|
756
|
|
757
|
/* (non-Javadoc)
|
758
|
* @see eu.etaxonomy.cdm.model.common.IParsable#setHasProblem(boolean)
|
759
|
*/
|
760
|
public void setParsingProblem(int parsingProblem){
|
761
|
this.parsingProblem = parsingProblem;
|
762
|
}
|
763
|
|
764
|
/* (non-Javadoc)
|
765
|
* @see eu.etaxonomy.cdm.model.common.IParsable#hasProblem()
|
766
|
*/
|
767
|
public boolean hasProblem(){
|
768
|
return parsingProblem != 0;
|
769
|
}
|
770
|
|
771
|
/* (non-Javadoc)
|
772
|
* @see eu.etaxonomy.cdm.model.common.IParsable#hasProblem(eu.etaxonomy.cdm.strategy.parser.ParserProblem)
|
773
|
*/
|
774
|
public boolean hasProblem(ParserProblem problem) {
|
775
|
return getParsingProblems().contains(problem);
|
776
|
}
|
777
|
|
778
|
|
779
|
/* (non-Javadoc)
|
780
|
* @see eu.etaxonomy.cdm.model.common.IParsable#problemStarts()
|
781
|
*/
|
782
|
public int getProblemStarts(){
|
783
|
return this.problemStarts;
|
784
|
}
|
785
|
|
786
|
/* (non-Javadoc)
|
787
|
* @see eu.etaxonomy.cdm.model.common.IParsable#setProblemStarts(int)
|
788
|
*/
|
789
|
public void setProblemStarts(int start) {
|
790
|
this.problemStarts = start;
|
791
|
}
|
792
|
|
793
|
/* (non-Javadoc)
|
794
|
* @see eu.etaxonomy.cdm.model.common.IParsable#problemEnds()
|
795
|
*/
|
796
|
public int getProblemEnds(){
|
797
|
return this.problemEnds;
|
798
|
}
|
799
|
|
800
|
/* (non-Javadoc)
|
801
|
* @see eu.etaxonomy.cdm.model.common.IParsable#setProblemEnds(int)
|
802
|
*/
|
803
|
public void setProblemEnds(int end) {
|
804
|
this.problemEnds = end;
|
805
|
}
|
806
|
|
807
|
/* (non-Javadoc)
|
808
|
* @see eu.etaxonomy.cdm.model.common.IParsable#addProblem(eu.etaxonomy.cdm.strategy.parser.NameParserWarning)
|
809
|
*/
|
810
|
public void addParsingProblem(ParserProblem warning){
|
811
|
parsingProblem = ParserProblem.addProblem(parsingProblem, warning);
|
812
|
}
|
813
|
|
814
|
/* (non-Javadoc)
|
815
|
* @see eu.etaxonomy.cdm.model.common.IParsable#removeParsingProblem(eu.etaxonomy.cdm.strategy.parser.ParserProblem)
|
816
|
*/
|
817
|
public void removeParsingProblem(ParserProblem problem) {
|
818
|
parsingProblem = ParserProblem.removeProblem(parsingProblem, problem);
|
819
|
}
|
820
|
|
821
|
/* (non-Javadoc)
|
822
|
* @see eu.etaxonomy.cdm.model.common.IParsable#getParsingProblems()
|
823
|
*/
|
824
|
@Transient
|
825
|
public List<ParserProblem> getParsingProblems() {
|
826
|
return ParserProblem.warningList(this.parsingProblem);
|
827
|
}
|
828
|
|
829
|
|
830
|
/**
|
831
|
* Generates, according to the {@link eu.etaxonomy.cdm.strategy.strategy.cache.reference.IReferenceBaseCacheStrategy cache strategy}
|
832
|
* assigned to <i>this</i> reference, a string that identifies <i>this</i>
|
833
|
* reference and returns it. This string may be stored in the inherited
|
834
|
* {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity#getTitleCache() titleCache} attribute.<BR>
|
835
|
* This method overrides the generic and inherited generateTitle method
|
836
|
* from {@link eu.etaxonomy.cdm.model.common.IdentifiableEntity IdentifiableEntity}.
|
837
|
*
|
838
|
* @return the string identifying <i>this</i> reference
|
839
|
* @see #getCitation()
|
840
|
* @see eu.etaxonomy.cdm.model.common.IdentifiableEntity#getTitleCache()
|
841
|
* @see eu.etaxonomy.cdm.model.common.IdentifiableEntity#generateTitle()
|
842
|
* @see eu.etaxonomy.cdm.strategy.strategy.cache.common.IIdentifiableEntityCacheStrategy#getTitleCache()
|
843
|
*/
|
844
|
// @Override
|
845
|
// public String generateTitle(){
|
846
|
// if (cacheStrategy == null){
|
847
|
// logger.warn("No CacheStrategy defined for ReferenceBase: " + this.getUuid());
|
848
|
// return null;
|
849
|
// }else{
|
850
|
// return cacheStrategy.getTitleCache(this);
|
851
|
// }
|
852
|
// }
|
853
|
|
854
|
//**************************** CLONE *********************************/
|
855
|
|
856
|
|
857
|
// /**
|
858
|
// * Returns the reference identity object
|
859
|
// * @return the referenceIdentity
|
860
|
// */
|
861
|
// public ReferenceIdentity getReferenceIdentity() {
|
862
|
// return referenceIdentity;
|
863
|
// }
|
864
|
//
|
865
|
// /**
|
866
|
// * For bidirectional use only
|
867
|
// * @param referenceIdentity the referenceIdentity to set
|
868
|
// */
|
869
|
// protected void setReferenceIdentity(ReferenceIdentity referenceIdentity) {
|
870
|
// this.referenceIdentity = referenceIdentity;
|
871
|
// }
|
872
|
//
|
873
|
// /**
|
874
|
// * Returns the set of all identical references. Same as getReferenceIdentity().getReferences()
|
875
|
// * @return
|
876
|
// */
|
877
|
// public Set<ReferenceBase> identicalReferences(){
|
878
|
// return referenceIdentity.getReferences();
|
879
|
// }
|
880
|
|
881
|
//*********************** CLONE ********************************************************/
|
882
|
|
883
|
/**
|
884
|
* Clones <i>this</i> reference. This is a shortcut that enables to create
|
885
|
* a new instance that differs only slightly from <i>this</i> reference by
|
886
|
* modifying only some of the attributes.
|
887
|
*
|
888
|
* @see eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity#clone()
|
889
|
* @see java.lang.Object#clone()
|
890
|
*/
|
891
|
@Override
|
892
|
public Object clone() {
|
893
|
try {
|
894
|
ReferenceBase result = (ReferenceBase)super.clone();
|
895
|
result.setDatePublished(datePublished != null? (TimePeriod)datePublished.clone(): null);
|
896
|
//no changes to: title, authorTeam, hasProblem, nomenclaturallyRelevant, uri
|
897
|
return result;
|
898
|
} catch (CloneNotSupportedException e) {
|
899
|
logger.warn("Object does not implement cloneable");
|
900
|
e.printStackTrace();
|
901
|
return null;
|
902
|
}
|
903
|
}
|
904
|
|
905
|
/* Casting methods */
|
906
|
|
907
|
public IArticle castReferenceToArticle(){
|
908
|
((IArticle) this).setCacheStrategy(ArticleDefaultCacheStrategy.NewInstance());
|
909
|
this.type = ReferenceType.Article;
|
910
|
|
911
|
return (IArticle) this;
|
912
|
}
|
913
|
|
914
|
public IBook castReferenceToBook(){
|
915
|
((IBook) this).setCacheStrategy(BookDefaultCacheStrategy.NewInstance());
|
916
|
this.type = ReferenceType.Book;
|
917
|
return (IBook) this;
|
918
|
}
|
919
|
|
920
|
public IBookSection castReferenceToBookSection(){
|
921
|
((IBookSection) this).setCacheStrategy(BookSectionDefaultCacheStrategy.NewInstance());
|
922
|
this.type = ReferenceType.BookSection;
|
923
|
|
924
|
return (IBookSection) this;
|
925
|
}
|
926
|
|
927
|
public ICdDvd castReferenceToCdDvd(){
|
928
|
((ICdDvd) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
929
|
this.type = ReferenceType.CdDvd;
|
930
|
return (ICdDvd) this;
|
931
|
}
|
932
|
|
933
|
public IDatabase castReferenceToDatabase(){
|
934
|
((IDatabase) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
935
|
this.type = ReferenceType.Database;
|
936
|
return (IDatabase) this;
|
937
|
}
|
938
|
|
939
|
public IGeneric castReferenceToGeneric(){
|
940
|
((IGeneric) this).setCacheStrategy(GenericDefaultCacheStrategy.NewInstance());
|
941
|
this.type = ReferenceType.Generic;
|
942
|
return (IGeneric) this;
|
943
|
}
|
944
|
|
945
|
public IInProceedings castReferenceToInProceedings(){
|
946
|
((IInProceedings) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
947
|
this.type = ReferenceType.InProceedings;
|
948
|
return (IInProceedings) this;
|
949
|
}
|
950
|
|
951
|
public IJournal castReferenceToJournal(){
|
952
|
((IJournal) this).setCacheStrategy(JournalDefaultCacheStrategy.NewInstance());
|
953
|
this.type = ReferenceType.Journal;
|
954
|
IJournal test = this;
|
955
|
return (IJournal) test;
|
956
|
}
|
957
|
|
958
|
public IMap castReferenceToMap(ReferenceBase ref){
|
959
|
((IMap) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
960
|
this.type = ReferenceType.Map;
|
961
|
return (IMap) ref;
|
962
|
}
|
963
|
|
964
|
public IPatent castReferenceToPatent(ReferenceBase ref){
|
965
|
((IPatent) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
966
|
this.type = ReferenceType.Patent;
|
967
|
return (IPatent) ref;
|
968
|
}
|
969
|
|
970
|
public IPersonalCommunication castReferenceToPersonalCommunication(ReferenceBase ref){
|
971
|
((IPersonalCommunication) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
972
|
this.type = ReferenceType.PersonalCommunication;
|
973
|
return (IPersonalCommunication) ref;
|
974
|
}
|
975
|
|
976
|
public IPrintSeries castReferenceToPrintSeries(ReferenceBase ref){
|
977
|
((IPrintSeries) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
978
|
this.type = ReferenceType.PrintSeries;
|
979
|
return (IPrintSeries) ref;
|
980
|
}
|
981
|
|
982
|
public IWebPage castReferenceToWebPage(ReferenceBase ref){
|
983
|
((IWebPage) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
984
|
this.type = ReferenceType.WebPage;
|
985
|
return (IWebPage) ref;
|
986
|
}
|
987
|
|
988
|
public IProceedings castReferenceToProceedings(ReferenceBase ref){
|
989
|
((IProceedings) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
990
|
this.type = ReferenceType.Proceedings;
|
991
|
return (IProceedings) ref;
|
992
|
}
|
993
|
|
994
|
public IReport castReferenceToReport(ReferenceBase ref){
|
995
|
((IReport) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
996
|
this.type = ReferenceType.Report;
|
997
|
|
998
|
return (IReport) ref;
|
999
|
}
|
1000
|
|
1001
|
public IThesis castReferenceToThesis(ReferenceBase ref){
|
1002
|
((IThesis) this).setCacheStrategy(ReferenceBaseDefaultCacheStrategy.NewInstance());
|
1003
|
this.type = ReferenceType.Thesis;
|
1004
|
return (IThesis) ref;
|
1005
|
}
|
1006
|
|
1007
|
|
1008
|
public String getNomenclaturalCitation(String microReference) {
|
1009
|
rectifyCacheStrategy();
|
1010
|
String typeName = this.getType()== null ? "(no type defined)" : this.getType().getMessage();
|
1011
|
if (cacheStrategy == null){
|
1012
|
logger.warn("No CacheStrategy defined for "+ typeName + ": " + this.getUuid());
|
1013
|
return null;
|
1014
|
}else{
|
1015
|
if (cacheStrategy instanceof INomenclaturalReferenceCacheStrategy){
|
1016
|
return ((INomenclaturalReferenceCacheStrategy)cacheStrategy).getNomenclaturalCitation(this,microReference);
|
1017
|
}else {
|
1018
|
logger.warn("No INomenclaturalReferenceCacheStrategy defined for "+ typeName + ": " + this.getUuid());
|
1019
|
return null;
|
1020
|
}
|
1021
|
}
|
1022
|
}
|
1023
|
|
1024
|
/**
|
1025
|
* The type property of this class is mapped on the field level to the data base column, so
|
1026
|
* Hibernate will consequently use the {@link org.hibernate.property.DirectPropertyAccessor}
|
1027
|
* to set the property. This PropertyAccessor directly sets the field instead of using the according setter so
|
1028
|
* the CacheStrategy is not correctly set after the initialization of the bean. Thus we need to
|
1029
|
* validate the CacheStrategy before it is to be used.
|
1030
|
*/
|
1031
|
private void rectifyCacheStrategy() {
|
1032
|
if(!cacheStrategyRectified ){
|
1033
|
setType(getType());
|
1034
|
cacheStrategyRectified = true;
|
1035
|
}
|
1036
|
}
|
1037
|
|
1038
|
public IJournal getInJournal() {
|
1039
|
IJournal journal = this.inReference;
|
1040
|
return journal;
|
1041
|
}
|
1042
|
|
1043
|
public void setInJournal(IJournal journal) {
|
1044
|
this.inReference = (ReferenceBase<JournalDefaultCacheStrategy<ReferenceBase>>) journal;
|
1045
|
|
1046
|
}
|
1047
|
|
1048
|
public IPrintSeries getInSeries() {
|
1049
|
IPrintSeries printSeries = this.inReference;
|
1050
|
return printSeries;
|
1051
|
}
|
1052
|
|
1053
|
public void setInSeries(IPrintSeries inSeries) {
|
1054
|
this.inReference = (ReferenceBase<IReferenceBaseCacheStrategy<ReferenceBase>>) inSeries;
|
1055
|
|
1056
|
}
|
1057
|
|
1058
|
public IBook getInBook() {
|
1059
|
IBook book = this.inReference;
|
1060
|
return book;
|
1061
|
}
|
1062
|
|
1063
|
public void setInBook(IBook book) {
|
1064
|
this.inReference = (ReferenceBase<BookDefaultCacheStrategy<ReferenceBase>>) book;
|
1065
|
|
1066
|
}
|
1067
|
|
1068
|
public IProceedings getInProceedings() {
|
1069
|
IProceedings proceedings = this.inReference;
|
1070
|
return proceedings;
|
1071
|
}
|
1072
|
|
1073
|
public void setInProceedings(IProceedings proceeding) {
|
1074
|
this.inReference = (ReferenceBase<BookDefaultCacheStrategy<ReferenceBase>>) proceeding;
|
1075
|
}
|
1076
|
|
1077
|
//public void setCacheStrategy(S cacheStrategy){
|
1078
|
// this.cacheStrategy = cacheStrategy;
|
1079
|
//}
|
1080
|
|
1081
|
public void setCacheStrategy(IReferenceBaseCacheStrategy iReferenceBaseCacheStrategy) {
|
1082
|
this.cacheStrategy = (S) iReferenceBaseCacheStrategy;
|
1083
|
|
1084
|
}
|
1085
|
|
1086
|
public void setCacheStrategy(ArticleDefaultCacheStrategy cacheStrategy) {
|
1087
|
this.cacheStrategy = (S) cacheStrategy;
|
1088
|
}
|
1089
|
|
1090
|
public void setCacheStrategy(BookDefaultCacheStrategy cacheStrategy) {
|
1091
|
this.cacheStrategy = (S) cacheStrategy;
|
1092
|
}
|
1093
|
|
1094
|
public void setCacheStrategy(JournalDefaultCacheStrategy cacheStrategy) {
|
1095
|
this.cacheStrategy = (S) cacheStrategy;
|
1096
|
}
|
1097
|
|
1098
|
public void setCacheStrategy(BookSectionDefaultCacheStrategy cacheStrategy) {
|
1099
|
this.cacheStrategy = (S) cacheStrategy;
|
1100
|
}
|
1101
|
|
1102
|
public void setCacheStrategy(GenericDefaultCacheStrategy cacheStrategy) {
|
1103
|
this.cacheStrategy = (S) cacheStrategy;
|
1104
|
}
|
1105
|
|
1106
|
public void setCacheStrategy(ReferenceBaseDefaultCacheStrategy cacheStrategy) {
|
1107
|
this.cacheStrategy = (S)cacheStrategy;
|
1108
|
|
1109
|
}
|
1110
|
}
|
1111
|
|