2 * Copyright (C) 2018 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.
9 package eu
.etaxonomy
.cdm
.model
.reference
;
11 import javax
.persistence
.Transient
;
13 import eu
.etaxonomy
.cdm
.model
.agent
.TeamOrPersonBase
;
14 import eu
.etaxonomy
.cdm
.model
.common
.TimePeriod
;
15 import eu
.etaxonomy
.cdm
.model
.common
.VerbatimTimePeriod
;
18 * Interface representing all {@link Reference references} which have
19 * a {@link Reference#getType() type} allowing an authorship and
20 * a single publication date.
25 public interface IWithAuthorAndDate
{
28 * Returns the references author(s)
30 public TeamOrPersonBase
getAuthorship();
33 * Sets the references author(s)
35 public void setAuthorship(TeamOrPersonBase authorship
);
40 * Returns the date when the reference was published as a {@link TimePeriod}
42 public VerbatimTimePeriod
getDatePublished();
45 * Sets the date when the reference was published.
47 public void setDatePublished(VerbatimTimePeriod datePublished
);
51 * Sets the date when the reference was published.
53 * Note: The time period will be internally converted to
54 * a VerbatimTimePeriod so later changes to it will not
55 * be reflected in the reference time period.
56 * @return the new converted VerbatimTimePeriod
57 * @param datePublished the not yet converted TimePeriod
58 * @deprecated only for compatibility with older versions
59 * but may create problems in certain contexts therefore
60 * will be removed soon.
64 public VerbatimTimePeriod
setDatePublished(TimePeriod datePublished
);