1
|
/**
|
2
|
* '$RCSfile$'
|
3
|
* Purpose: A class represents an event for the solr indexing.
|
4
|
* Copyright: 2013 Regents of the University of California and the
|
5
|
* National Center for Ecological Analysis and Synthesis
|
6
|
* Authors: Jing Tao
|
7
|
*
|
8
|
* This program is free software; you can redistribute it and/or modify
|
9
|
* it under the terms of the GNU General Public License as published by
|
10
|
* the Free Software Foundation; either version 2 of the License, or
|
11
|
* (at your option) any later version.
|
12
|
*
|
13
|
* This program is distributed in the hope that it will be useful,
|
14
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
* GNU General Public License for more details.
|
17
|
*
|
18
|
* You should have received a copy of the GNU General Public License
|
19
|
* along with this program; if not, write to the Free Software
|
20
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
21
|
*/
|
22
|
package edu.ucsb.nceas.metacat.common.index.event;
|
23
|
|
24
|
import java.util.Date;
|
25
|
|
26
|
import org.dataone.service.types.v1.Event;
|
27
|
import org.dataone.service.types.v1.Identifier;
|
28
|
|
29
|
|
30
|
/**
|
31
|
* A class represents an event for the solr indexing.
|
32
|
* @author tao
|
33
|
*
|
34
|
*/
|
35
|
public class IndexEvent {
|
36
|
|
37
|
private Event action = null;
|
38
|
private Date date = null;
|
39
|
private Identifier identifier = null;
|
40
|
private String description = null;
|
41
|
|
42
|
/**
|
43
|
* Get the action of the event.
|
44
|
* @return the action of the event
|
45
|
*/
|
46
|
public Event getAction() {
|
47
|
return this.action;
|
48
|
}
|
49
|
|
50
|
/**
|
51
|
* Set the action of the event
|
52
|
* @param action
|
53
|
*/
|
54
|
public void setAction(Event action) {
|
55
|
this.action = action;
|
56
|
}
|
57
|
|
58
|
/**
|
59
|
* Get the date when the event happened
|
60
|
* @return
|
61
|
*/
|
62
|
public Date getDate() {
|
63
|
return date;
|
64
|
}
|
65
|
|
66
|
/**
|
67
|
* Set the date when the event happened
|
68
|
* @param date
|
69
|
*/
|
70
|
public void setDate(Date date) {
|
71
|
this.date = date;
|
72
|
}
|
73
|
|
74
|
/**
|
75
|
* Get the identifier of the data object involving the event
|
76
|
* @return
|
77
|
*/
|
78
|
public Identifier getIdentifier() {
|
79
|
return identifier;
|
80
|
}
|
81
|
|
82
|
/**
|
83
|
* Set the identifier of the data object involving the event.
|
84
|
* @param pid
|
85
|
*/
|
86
|
public void setIdentifier(Identifier pid) {
|
87
|
this.identifier = pid;
|
88
|
}
|
89
|
|
90
|
/**
|
91
|
* Get the description of the event
|
92
|
* @return
|
93
|
*/
|
94
|
public String getDescription() {
|
95
|
return description;
|
96
|
}
|
97
|
|
98
|
/**
|
99
|
* Set the description of the event
|
100
|
* @param description
|
101
|
*/
|
102
|
public void setDescription(String description) {
|
103
|
this.description = description;
|
104
|
}
|
105
|
|
106
|
|
107
|
}
|