Revision 8e602421
Added by Andreas Müller about 7 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/Reference.java | ||
---|---|---|
14 | 14 |
import java.net.URI; |
15 | 15 |
import java.util.List; |
16 | 16 |
|
17 |
import javax.persistence.Basic; |
|
17 | 18 |
import javax.persistence.Column; |
18 | 19 |
import javax.persistence.Embedded; |
19 | 20 |
import javax.persistence.Entity; |
... | ... | |
33 | 34 |
import javax.xml.bind.annotation.XmlRootElement; |
34 | 35 |
import javax.xml.bind.annotation.XmlSchemaType; |
35 | 36 |
import javax.xml.bind.annotation.XmlType; |
37 |
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; |
|
36 | 38 |
|
37 | 39 |
import org.apache.commons.lang.StringUtils; |
38 | 40 |
import org.apache.log4j.Logger; |
... | ... | |
45 | 47 |
import org.hibernate.search.annotations.Field; |
46 | 48 |
import org.hibernate.search.annotations.FieldBridge; |
47 | 49 |
import org.hibernate.search.annotations.IndexedEmbedded; |
50 |
import org.joda.time.DateTime; |
|
48 | 51 |
|
49 | 52 |
import eu.etaxonomy.cdm.common.DOI; |
53 |
import eu.etaxonomy.cdm.hibernate.search.DateTimeBridge; |
|
50 | 54 |
import eu.etaxonomy.cdm.hibernate.search.DoiBridge; |
55 |
import eu.etaxonomy.cdm.jaxb.DateTimeAdapter; |
|
51 | 56 |
import eu.etaxonomy.cdm.model.agent.Institution; |
52 | 57 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
53 | 58 |
import eu.etaxonomy.cdm.model.common.IIntextReferenceTarget; |
... | ... | |
107 | 112 |
"institution", |
108 | 113 |
"school", |
109 | 114 |
"organization", |
110 |
"inReference" |
|
115 |
"inReference", |
|
116 |
"accessed" |
|
111 | 117 |
}) |
112 | 118 |
@XmlRootElement(name = "Reference") |
113 | 119 |
@Entity |
... | ... | |
286 | 292 |
@IndexedEmbedded |
287 | 293 |
private TimePeriod datePublished = TimePeriod.NewInstance(); |
288 | 294 |
|
289 |
@XmlElement(name ="Abstract" ) |
|
295 |
//#5258 |
|
296 |
@XmlElement (name = "Accessed", type= String.class) |
|
297 |
@XmlJavaTypeAdapter(DateTimeAdapter.class) |
|
298 |
@Type(type="dateTimeUserType") |
|
299 |
@Basic(fetch = FetchType.LAZY) |
|
300 |
@Match(MatchMode.EQUAL) |
|
301 |
@FieldBridge(impl = DateTimeBridge.class) |
|
302 |
private DateTime accessed; |
|
303 |
|
|
304 |
@XmlElement(name ="Abstract" ) |
|
290 | 305 |
@Column(length=65536, name="referenceAbstract") |
291 | 306 |
@Lob |
292 | 307 |
@Field |
... | ... | |
654 | 669 |
return result; |
655 | 670 |
} |
656 | 671 |
|
672 |
|
|
673 |
@Override |
|
674 |
public DateTime getAccessed() { |
|
675 |
return accessed; |
|
676 |
} |
|
677 |
|
|
678 |
@Override |
|
679 |
public void setAccessed(DateTime accessed) { |
|
680 |
this.accessed = accessed; |
|
681 |
} |
|
682 |
|
|
657 | 683 |
/** |
658 | 684 |
* Returns the {@link eu.etaxonomy.cdm.model.agent.TeamOrPersonBase author (team)} who created the |
659 | 685 |
* content of <i>this</i> reference. |
Also available in: Unified diff
ref #5258 add accessed to Reference (WebPage)