Project

General

Profile

1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: A class that gets Accession Number, check for uniqueness
4
 *             and register it into db
5
 *  Copyright: 2000 Regents of the University of California and the
6
 *             National Center for Ecological Analysis and Synthesis
7
 *    Authors: Jivka Bojilova, Matt Jones
8
 *
9
 *   '$Author: leinfelder $'
10
 *     '$Date: 2011-11-02 20:40:12 -0700 (Wed, 02 Nov 2011) $'
11
 * '$Revision: 6595 $'
12
 *
13
 * This program is free software; you can redistribute it and/or modify
14
 * it under the terms of the GNU General Public License as published by
15
 * the Free Software Foundation; either version 2 of the License, or
16
 * (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 */
27
package edu.ucsb.nceas.metacat.index.event;
28

    
29
import java.util.Date;
30

    
31
import org.dataone.service.types.v1.Identifier;
32

    
33

    
34
/**
35
 * A class represents an event for solr index.
36
 * @author tao
37
 *
38
 */
39
public class IndexEvent {
40
    
41
    public static final int SUCCESSINSERT = 0;
42
    public static final int FAILUREINSERT = 6;
43
    public static final int SUCCESSDELETE = 12;
44
    public static final int FAILUREDELETE = 18;
45
    public static final int STARTTIMEDINDEX = 24;
46
    public static final int FINISHTIMEDINDEX = 30;
47
    private int type = -1;
48
    private Date date = null;
49
    private Identifier pid = null;
50
    private String description = null;
51
    
52
    
53
    
54
    /**
55
     * Get the type of the event.
56
     * @return the type of the event
57
     */
58
    public int getType() {
59
        return this.type;
60
    }
61
    
62
    /**
63
     * Set the type of the event
64
     * @param type
65
     */
66
    public void setType(int type) {
67
        this.type = type;
68
    }
69
    
70
    /**
71
     * Get the date when the event happened
72
     * @return
73
     */
74
    public Date getDate() {
75
        return date;
76
    }
77
    
78
    /**
79
     * Set the date when the event happened
80
     * @param date
81
     */
82
    public void setDate(Date date) {
83
        this.date = date;
84
    }
85
    
86
    /**
87
     * Get the identifier of the data object involving the event
88
     * @return
89
     */
90
    public Identifier getPid() {
91
        return pid;
92
    }
93
    
94
    /**
95
     * Set the identifier of the data object involving the event.
96
     * @param pid
97
     */
98
    public void setPid(Identifier pid) {
99
        this.pid = pid;
100
    }
101
    
102
    /**
103
     * Get the description of the event
104
     * @return
105
     */
106
    public String getDescription() {
107
        return description;
108
    }
109
    
110
    /**
111
     * Set the description of the event
112
     * @param description
113
     */
114
    public void setDescription(String description) {
115
        this.description = description;
116
    }
117
}
(1-1/3)