Project

General

Profile

1
package eu.dnetlib.openaire.blacklist;
2

    
3
import java.util.List;
4

    
5
import com.google.common.collect.Lists;
6
import com.google.gson.Gson;
7
import eu.dnetlib.openaire.blacklist.BlacklistManager.IIS_STATUS;
8
import eu.dnetlib.openaire.blacklist.BlacklistManager.STATUS;
9

    
10
public class BlacklistEntry {
11

    
12

    
13
    private int id;
14
    /**
15
     * The user who reported the wrong link
16
     **/
17
    private String user = "unknown";
18
    /**
19
     * A note regarding the reported 'wrong' relationship
20
     **/
21
    private String note = "";
22
    /**
23
     * The id of the ticket associated to this entry
24
     **/
25
    private String ticketId = "unknown";
26
    /**
27
     * Provenance of the relationship. 'iis' when the relationship is inferred. 'crosswalk' if it is aggregated. 'claim' if it is a claim.
28
     **/
29
    private String provenance;
30
	/**
31
	 * Relationship label: 'resultProject_outcome_isProducedBy' for result-project relationships.
32
	 */
33
	private String relationship;
34

    
35
    /**
36
     * The inference module that generated the relationship. 'iis::document_referencedProjects' for result-project relationships. Blank if provenance is not 'iis'.
37
     **/
38
    private String iisModule = "";
39

    
40
    /**
41
     * Status of the report
42
     **/
43
    private STATUS status = STATUS.PENDING;
44
    /**
45
     * Status of the issue from the pov of IIS. Blank if provenance is not 'iis'.
46
     **/
47
    private IIS_STATUS iisStatus = null;
48

    
49
    private String creationDate, lastUpdateDate;
50

    
51
    /**
52
     * OpenAIRE ids of the objects linked by the 'wrong' relationship
53
     **/
54
    private String sourceObject, targetObject;
55
    /**
56
     * Type of the source and target objects.
57
     **/
58
    private String sourceType, targetType;
59
    /**
60
     * If the source or the target are representatives, then the following strings are not empty and contain the json strings with the ids of the merged objects
61
     **/
62
    private List<String> originalSourceObjects = Lists.newArrayList(), originalTargetObjects = Lists.newArrayList();
63

    
64
    @Override
65
    public String toString() {
66
        Gson gson = new Gson();
67
        return gson.toJson(this);
68
    }
69

    
70
	public String getRelationship() {
71
		return relationship;
72
	}
73

    
74
	public void setRelationship(final String relationship) {
75
		this.relationship = relationship;
76
	}
77

    
78
	public String getSourceType() {
79
		return sourceType;
80
	}
81

    
82
    public void setSourceType(final String sourceType) {
83
        this.sourceType = sourceType;
84
    }
85

    
86
    public String getTargetType() {
87
        return targetType;
88
    }
89

    
90
    public void setTargetType(final String targetType) {
91
        this.targetType = targetType;
92
    }
93

    
94
    public int getId() {
95
        return id;
96
    }
97

    
98
    public void setId(int id) {
99
        this.id = id;
100
    }
101

    
102
    public String getUser() {
103
        return user;
104
    }
105

    
106
    public void setUser(final String user) {
107
        this.user = user;
108
    }
109

    
110
    public String getNote() {
111
        return note;
112
    }
113

    
114
    public void setNote(final String note) {
115
        this.note = note;
116
    }
117

    
118
    public String getTicketId() {
119
        return ticketId;
120
    }
121

    
122
    public void setTicketId(final String ticketId) {
123
        this.ticketId = ticketId;
124
    }
125

    
126
    public String getProvenance() {
127
        return provenance;
128
    }
129

    
130
    public void setProvenance(final String provenance) {
131
        this.provenance = provenance;
132
    }
133

    
134
    public String getIisModule() {
135
        return iisModule;
136
    }
137

    
138
    public void setIisModule(final String iisModule) {
139
        this.iisModule = iisModule;
140
    }
141

    
142
    public STATUS getStatus() {
143
        return status;
144
    }
145

    
146
    public void setStatus(final STATUS status) {
147
        this.status = status;
148
    }
149

    
150
    public IIS_STATUS getIisStatus() {
151
        return iisStatus;
152
    }
153

    
154
    public void setIisStatus(final IIS_STATUS iisStatus) {
155
        this.iisStatus = iisStatus;
156
    }
157

    
158
    public String getCreationDate() {
159
        return creationDate;
160
    }
161

    
162
    public void setCreationDate(final String creationDate) {
163
        this.creationDate = creationDate;
164
    }
165

    
166
    public String getLastUpdateDate() {
167
        return lastUpdateDate;
168
    }
169

    
170
    public void setLastUpdateDate(final String lastUpdateDate) {
171
        this.lastUpdateDate = lastUpdateDate;
172
    }
173

    
174
    public String getSourceObject() {
175
        return sourceObject;
176
    }
177

    
178
    public void setSourceObject(final String sourceObject) {
179
        this.sourceObject = sourceObject;
180
    }
181

    
182
    public String getTargetObject() {
183
        return targetObject;
184
    }
185

    
186
    public void setTargetObject(final String targetObject) {
187
        this.targetObject = targetObject;
188
    }
189

    
190
    public List<String> getOriginalSourceObjects() {
191
        return originalSourceObjects;
192
    }
193

    
194
    public void setOriginalSourceObjects(final List<String> originalSourceObjects) {
195
        this.originalSourceObjects = originalSourceObjects;
196
    }
197

    
198
    public List<String> getOriginalTargetObjects() {
199
        return originalTargetObjects;
200
    }
201

    
202
    public void setOriginalTargetObjects(final List<String> originalTargetObjects) {
203
        this.originalTargetObjects = originalTargetObjects;
204
    }
205

    
206
}
(1-1/3)