1
|
/**
|
2
|
* Copyright (C) 2018 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
|
package eu.etaxonomy.cdm.model.reference;
|
10
|
|
11
|
import javax.persistence.Transient;
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
|
14
|
import eu.etaxonomy.cdm.model.common.TimePeriod;
|
15
|
import eu.etaxonomy.cdm.model.common.VerbatimTimePeriod;
|
16
|
|
17
|
/**
|
18
|
* Interface representing all {@link Reference references} which have
|
19
|
* a {@link Reference#getType() type} allowing an authorship and
|
20
|
* a single publication date.
|
21
|
* @author a.mueller
|
22
|
* @since 20.11.2018
|
23
|
*
|
24
|
*/
|
25
|
public interface IWithAuthorAndDate {
|
26
|
|
27
|
/**
|
28
|
* Returns the references author(s)
|
29
|
*/
|
30
|
public TeamOrPersonBase getAuthorship();
|
31
|
|
32
|
/**
|
33
|
* Sets the references author(s)
|
34
|
*/
|
35
|
public void setAuthorship(TeamOrPersonBase authorship);
|
36
|
|
37
|
/**
|
38
|
* Returns the date when the reference was published as a {@link TimePeriod}
|
39
|
*/
|
40
|
public VerbatimTimePeriod getDatePublished();
|
41
|
|
42
|
/**
|
43
|
* Sets the date when the reference was published.
|
44
|
* @see #getDatePublished()
|
45
|
*/
|
46
|
public void setDatePublished(VerbatimTimePeriod datePublished);
|
47
|
|
48
|
|
49
|
/**
|
50
|
* Sets the date when the reference was published.
|
51
|
* <BR>
|
52
|
* Note: The time period will be internally converted to
|
53
|
* a VerbatimTimePeriod so later changes to it will not
|
54
|
* be reflected in the reference time period.
|
55
|
* @return the new converted VerbatimTimePeriod
|
56
|
* @param datePublished the not yet converted TimePeriod
|
57
|
* @deprecated only for compatibility with older versions
|
58
|
* but may create problems in certain contexts therefore
|
59
|
* will be removed soon.
|
60
|
*/
|
61
|
@Transient
|
62
|
@Deprecated
|
63
|
public VerbatimTimePeriod setDatePublished(TimePeriod datePublished);
|
64
|
}
|