Project

General

Profile

1
package eu.dnetlib.data.claims.migration;
2

    
3
import java.text.SimpleDateFormat;
4
import java.util.Date;
5

    
6
/**
7
 * Created by kiatrop on 20/11/2015.
8
 */
9
public class Claim {
10
    private OpenaireEntity target;
11
    private OpenaireEntity source;
12

    
13
    private String id;
14
    private String userMail;
15
    private Date date;
16
    private String sourceType;
17
    private String targetType;
18
    private boolean claimStatus;
19

    
20
    public OpenaireEntity getTarget() {
21
        return target;
22
    }
23

    
24
    public void setTarget(Result target) {
25
        this.target = target;
26
    }
27

    
28
    public OpenaireEntity getSource() {
29
        return source;
30
    }
31

    
32
    public void setSource(OpenaireEntity source) {
33
        this.source = source;
34
    }
35

    
36
    public String getId() {
37
        return id;
38
    }
39

    
40
    public void setId(String id) {
41
        this.id = id;
42
    }
43

    
44
    public String getUserMail() {
45
        return userMail;
46
    }
47

    
48
    public void setUserMail(String userMail) {
49
        this.userMail = userMail;
50
    }
51

    
52
    public Date getDate() {
53
        return date;
54
    }
55

    
56
    public void setDate(Date date) {
57
        this.date = date;
58
    }
59

    
60
    public void getClaimFromDB() {
61
        //query rel2action
62
        //parse to get ids;
63
    }
64
    public String getSourceType() {
65
        return sourceType;
66
    }
67

    
68
    public void setSourceType(String sourceType) {
69
        this.sourceType = sourceType;
70
    }
71

    
72
    public String getTargetType() {
73
        return targetType;
74
    }
75

    
76
    public void setTargetType(String targetType) {
77
        this.targetType = targetType;
78
    }
79

    
80

    
81
    @Override
82
    public String toString() {
83
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
84
        return "Claim{" +
85
                "\ntarget={" + target.toString() +
86
                "},\n source={" + source.toString() +
87
                "},\n id='" + id + '\'' +
88
                ", userMail='" + userMail + '\'' +
89
                ", date=" + format.format(date)+
90
                '}';
91
    }
92
}
(1-1/9)