Project

General

Profile

« Previous | Next » 

Revision 43550

moved to :literature-broker-service/dnet-openaire-broker-common.git

View differences:

modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/Instance.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class Instance {
9

  
10
	private String url;
11

  
12
	private String license;
13

  
14
	private String hostedby;
15

  
16
	private String instancetype;
17

  
18
	public Instance() {
19
	}
20

  
21
	public String getUrl() {
22
		return url;
23
	}
24

  
25
	public Instance setUrl(final String url) {
26
		this.url = url;
27
		return this;
28
	}
29

  
30
	public String getLicense() {
31
		return license;
32
	}
33

  
34
	public Instance setLicense(final String license) {
35
		this.license = license;
36
		return this;
37
	}
38

  
39
	public String getHostedby() {
40
		return hostedby;
41
	}
42

  
43
	public Instance setHostedby(final String hostedby) {
44
		this.hostedby = hostedby;
45
		return this;
46
	}
47

  
48
	public String getInstancetype() {
49
		return instancetype;
50
	}
51

  
52
	public Instance setInstancetype(final String instancetype) {
53
		this.instancetype = instancetype;
54
		return this;
55
	}
56

  
57
	@Override
58
	public int hashCode() {
59
		return Objects.hash(getLicense(), getUrl(), getInstancetype(), getHostedby());
60
	}
61
}
modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/Publication.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.List;
4
import java.util.Set;
5

  
6
/**
7
 * Created by claudio on 22/07/16.
8
 */
9
public class Publication {
10

  
11
	private String originalId;
12

  
13
	private Set<String> titles;
14

  
15
	private Set<String> abstracts;
16

  
17
	private String language;
18

  
19
	private Set<String> subjects;
20

  
21
	private Set<String> creators;
22

  
23
	private String publicationdate;
24

  
25
	private String publisher;
26

  
27
	private String embargoenddate;
28

  
29
	private Set<String> contributor;
30

  
31
	private Journal journal;
32

  
33
	private Set<String> collectedFrom;
34

  
35
	private Set<Pid> pids;
36

  
37
	private Set<Instance> instances;
38

  
39
	private Set<ExternalReference> externalReferences;
40

  
41
	public Publication() {
42
	}
43

  
44
	public Set<String> getTitles() {
45
		return titles;
46
	}
47

  
48
	public Publication setTitles(final Set<String> titles) {
49
		this.titles = titles;
50
		return this;
51
	}
52

  
53
	public Set<String> getAbstracts() {
54
		return abstracts;
55
	}
56

  
57
	public Publication setAbstracts(final Set<String> abstracts) {
58
		this.abstracts = abstracts;
59
		return this;
60
	}
61

  
62
	public String getLanguage() {
63
		return language;
64
	}
65

  
66
	public Publication setLanguage(final String language) {
67
		this.language = language;
68
		return this;
69
	}
70

  
71
	public Set<String> getSubjects() {
72
		return subjects;
73
	}
74

  
75
	public Publication setSubjects(final Set<String> subjects) {
76
		this.subjects = subjects;
77
		return this;
78
	}
79

  
80
	public Set<String> getCreators() {
81
		return creators;
82
	}
83

  
84
	public Publication setCreators(final Set<String> creators) {
85
		this.creators = creators;
86
		return this;
87
	}
88

  
89
	public String getPublicationdate() {
90
		return publicationdate;
91
	}
92

  
93
	public Publication setPublicationdate(final String publicationdate) {
94
		this.publicationdate = publicationdate;
95
		return this;
96
	}
97

  
98
	public String getPublisher() {
99
		return publisher;
100
	}
101

  
102
	public Publication setPublisher(final String publisher) {
103
		this.publisher = publisher;
104
		return this;
105
	}
106

  
107
	public String getEmbargoenddate() {
108
		return embargoenddate;
109
	}
110

  
111
	public Publication setEmbargoenddate(final String embargoenddate) {
112
		this.embargoenddate = embargoenddate;
113
		return this;
114
	}
115

  
116
	public Set<String> getContributor() {
117
		return contributor;
118
	}
119

  
120
	public Publication setContributor(final Set<String> contributor) {
121
		this.contributor = contributor;
122
		return this;
123
	}
124

  
125
	public Journal getJournal() {
126
		return journal;
127
	}
128

  
129
	public Publication setJournal(final Journal journal) {
130
		this.journal = journal;
131
		return this;
132
	}
133

  
134
	public Set<String> getCollectedFrom() {
135
		return collectedFrom;
136
	}
137

  
138
	public Publication setCollectedFrom(final Set<String> collectedFrom) {
139
		this.collectedFrom = collectedFrom;
140
		return this;
141
	}
142

  
143
	public Set<Pid> getPids() {
144
		return pids;
145
	}
146

  
147
	public Publication setPids(final Set<Pid> pids) {
148
		this.pids = pids;
149
		return this;
150
	}
151

  
152
	public Set<Instance> getInstances() {
153
		return instances;
154
	}
155

  
156
	public Publication setInstances(final Set<Instance> instances) {
157
		this.instances = instances;
158
		return this;
159
	}
160

  
161
	public Set<ExternalReference> getExternalReferences() {
162
		return externalReferences;
163
	}
164

  
165
	public Publication setExternalReferences(final Set<ExternalReference> externalReferences) {
166
		this.externalReferences = externalReferences;
167
		return this;
168
	}
169

  
170
	public String getOriginalId() {
171
		return originalId;
172
	}
173

  
174
	public Publication setOriginalId(final String originalId) {
175
		this.originalId = originalId;
176
		return this;
177
	}
178
}
modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/Journal.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class Journal {
9

  
10
	private String name;
11

  
12
	private String issn;
13

  
14
	private String eissn;
15

  
16
	private String lissn;
17

  
18
	public Journal() {
19
	}
20

  
21
	public String getName() {
22
		return name;
23
	}
24

  
25
	public Journal setName(final String name) {
26
		this.name = name;
27
		return this;
28
	}
29

  
30
	public String getIssn() {
31
		return issn;
32
	}
33

  
34
	public Journal setIssn(final String issn) {
35
		this.issn = issn;
36
		return this;
37
	}
38

  
39
	public String getEissn() {
40
		return eissn;
41
	}
42

  
43
	public Journal setEissn(final String eissn) {
44
		this.eissn = eissn;
45
		return this;
46
	}
47

  
48
	public String getLissn() {
49
		return lissn;
50
	}
51

  
52
	public Journal setLissn(final String lissn) {
53
		this.lissn = lissn;
54
		return this;
55
	}
56

  
57
	@Override
58
	public int hashCode() {
59
		return Objects.hash(getName(), getIssn(), getEissn(), getLissn());
60
	}
61
}
modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/Pid.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class Pid {
9

  
10
	private String value;
11

  
12
	private String type;
13

  
14
	public Pid() {
15
	}
16

  
17
	public String getValue() {
18
		return value;
19
	}
20

  
21
	public Pid setValue(final String value) {
22
		this.value = value;
23
		return this;
24
	}
25

  
26
	public String getType() {
27
		return type;
28
	}
29

  
30
	public Pid setType(final String type) {
31
		this.type = type;
32
		return this;
33
	}
34

  
35
	@Override
36
	public int hashCode() {
37
		return Objects.hash(getValue(), getType());
38
	}
39
}
modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/OpenAireEventPayload.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import com.google.gson.GsonBuilder;
4

  
5
/**
6
 * Created by claudio on 11/07/16.
7
 */
8
public class OpenAireEventPayload {
9

  
10
	private Publication publication;
11

  
12
	private Publication highlight;
13

  
14
	private Provenance provenance;
15

  
16
	public OpenAireEventPayload() {}
17

  
18
	public Publication getPublication() {
19
		return publication;
20
	}
21

  
22
	public OpenAireEventPayload setPublication(final Publication publication) {
23
		this.publication = publication;
24
		return this;
25
	}
26

  
27
	public OpenAireEventPayload setHighlight(final Publication highlight) {
28
		this.highlight = highlight;
29
		return this;
30
	}
31

  
32
	public Publication getHighlight() {
33
		return highlight;
34
	}
35

  
36
	public Provenance getProvenance() {
37
		return provenance;
38
	}
39

  
40
	public OpenAireEventPayload setProvenance(final Provenance provenance) {
41
		this.provenance = provenance;
42
		return this;
43
	}
44

  
45
	public static OpenAireEventPayload fromJSON(final String json) {
46
		final GsonBuilder b = new GsonBuilder();
47
		return b.create().fromJson(json, OpenAireEventPayload.class);
48
	}
49

  
50
	public String toJSON() {
51
		final GsonBuilder b = new GsonBuilder();
52
		return b.create().toJson(this);
53
	}
54

  
55
}
modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/Provenance.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 26/07/16.
7
 */
8
public class Provenance {
9

  
10
	private String repositoryName;
11

  
12
	private String url;
13

  
14
	private String id;
15

  
16
	public Provenance() {
17
	}
18

  
19
	public String getRepositoryName() {
20
		return repositoryName;
21
	}
22

  
23
	public Provenance setRepositoryName(final String repositoryName) {
24
		this.repositoryName = repositoryName;
25
		return this;
26
	}
27

  
28
	public String getUrl() {
29
		return url;
30
	}
31

  
32
	public Provenance setUrl(final String url) {
33
		this.url = url;
34
		return this;
35
	}
36

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

  
41
	public Provenance setId(final String id) {
42
		this.id = id;
43
		return this;
44
	}
45

  
46
	@Override
47
	public int hashCode() {
48
		return Objects.hash(getRepositoryName(), getUrl(), getId());
49
	}
50
}
modules/dnet-openaire-broker/trunk/src/main/java/eu/dnetlib/data/broker/model/openaire/ExternalReference.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class ExternalReference {
9

  
10
	private String url;
11

  
12
	private String sitename;
13

  
14
	private String type;
15

  
16
	private String refidentifier;
17

  
18
	public ExternalReference() {
19
	}
20

  
21
	public String getUrl() {
22
		return url;
23
	}
24

  
25
	public ExternalReference setUrl(final String url) {
26
		this.url = url;
27
		return this;
28
	}
29

  
30
	public String getSitename() {
31
		return sitename;
32
	}
33

  
34
	public ExternalReference setSitename(final String sitename) {
35
		this.sitename = sitename;
36
		return this;
37
	}
38

  
39
	public String getType() {
40
		return type;
41
	}
42

  
43
	public ExternalReference setType(final String type) {
44
		this.type = type;
45
		return this;
46
	}
47

  
48
	public String getRefidentifier() {
49
		return refidentifier;
50
	}
51

  
52
	public ExternalReference setRefidentifier(final String refidentifier) {
53
		this.refidentifier = refidentifier;
54
		return this;
55
	}
56

  
57
	@Override
58
	public int hashCode() {
59
		return Objects.hash(getUrl(), getSitename(), getType(), getRefidentifier());
60
	}
61
}
modules/dnet-openaire-broker/trunk/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
	<parent>
4
		<groupId>eu.dnetlib</groupId>
5
		<artifactId>dnet-parent</artifactId>
6
		<version>1.0.0</version>
7
		<relativePath />
8
	</parent>
9
	<modelVersion>4.0.0</modelVersion>
10
	<groupId>eu.dnetlib</groupId>
11
	<artifactId>dnet-openaire-broker</artifactId>
12
	<packaging>jar</packaging>
13
	<version>1.0.2-SNAPSHOT</version>
14
	<scm>
15
		<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-openaire-broker/trunk</developerConnection>
16
	</scm>
17
	<dependencies>
18

  
19
		<dependency>
20
			<groupId>com.google.code.gson</groupId>
21
			<artifactId>gson</artifactId>
22
			<version>${google.gson.version}</version>
23
		</dependency>
24
		<dependency>
25
			<groupId>junit</groupId>
26
			<artifactId>junit</artifactId>
27
			<version>${junit.version}</version>
28
			<scope>test</scope>
29
		</dependency>
30

  
31
	</dependencies>
32
</project>
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/src/main/java/eu/dnetlib/data/broker/model/openaire/Pid.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
/**
4
 * Created by claudio on 22/07/16.
5
 */
6
public class Pid {
7

  
8
	private String value;
9

  
10
	private String type;
11

  
12
	public Pid() {
13
	}
14

  
15
	public String getValue() {
16
		return value;
17
	}
18

  
19
	public Pid setValue(final String value) {
20
		this.value = value;
21
		return this;
22
	}
23

  
24
	public String getType() {
25
		return type;
26
	}
27

  
28
	public Pid setType(final String type) {
29
		this.type = type;
30
		return this;
31
	}
32
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/src/main/java/eu/dnetlib/data/broker/model/openaire/OpenAireEventPayload.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import com.google.gson.GsonBuilder;
4

  
5
/**
6
 * Created by claudio on 11/07/16.
7
 */
8
public class OpenAireEventPayload {
9

  
10
	private Publication publication;
11

  
12
	private Publication highlight;
13

  
14
	public OpenAireEventPayload() {}
15

  
16
	public Publication getPublication() {
17
		return publication;
18
	}
19

  
20
	public OpenAireEventPayload setPublication(final Publication publication) {
21
		this.publication = publication;
22
		return this;
23
	}
24

  
25
	public OpenAireEventPayload setHighlight(final Publication highlight) {
26
		this.highlight = highlight;
27
		return this;
28
	}
29

  
30
	public Publication getHighlight() {
31
		return highlight;
32
	}
33

  
34
	public static OpenAireEventPayload fromJSON(final String json) {
35
		final GsonBuilder b = new GsonBuilder();
36
		return b.create().fromJson(json, OpenAireEventPayload.class);
37
	}
38

  
39
	public String toJSON() {
40
		final GsonBuilder b = new GsonBuilder();
41
		return b.create().toJson(this);
42
	}
43

  
44
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/src/main/java/eu/dnetlib/data/broker/model/openaire/ExternalReference.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
/**
4
 * Created by claudio on 22/07/16.
5
 */
6
public class ExternalReference {
7

  
8
	private String url;
9

  
10
	private String sitename;
11

  
12
	private String type;
13

  
14
	private String refidentifier;
15

  
16
	public ExternalReference() {
17
	}
18

  
19
	public String getUrl() {
20
		return url;
21
	}
22

  
23
	public ExternalReference setUrl(final String url) {
24
		this.url = url;
25
		return this;
26
	}
27

  
28
	public String getSitename() {
29
		return sitename;
30
	}
31

  
32
	public ExternalReference setSitename(final String sitename) {
33
		this.sitename = sitename;
34
		return this;
35
	}
36

  
37
	public String getType() {
38
		return type;
39
	}
40

  
41
	public ExternalReference setType(final String type) {
42
		this.type = type;
43
		return this;
44
	}
45

  
46
	public String getRefidentifier() {
47
		return refidentifier;
48
	}
49

  
50
	public ExternalReference setRefidentifier(final String refidentifier) {
51
		this.refidentifier = refidentifier;
52
		return this;
53
	}
54
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/src/main/java/eu/dnetlib/data/broker/model/openaire/Instance.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
/**
4
 * Created by claudio on 22/07/16.
5
 */
6
public class Instance {
7

  
8
	private String url;
9

  
10
	private String license;
11

  
12
	private String hostedby;
13

  
14
	private String instancetype;
15

  
16
	public Instance() {
17
	}
18

  
19
	public String getUrl() {
20
		return url;
21
	}
22

  
23
	public Instance setUrl(final String url) {
24
		this.url = url;
25
		return this;
26
	}
27

  
28
	public String getLicense() {
29
		return license;
30
	}
31

  
32
	public Instance setLicense(final String license) {
33
		this.license = license;
34
		return this;
35
	}
36

  
37
	public String getHostedby() {
38
		return hostedby;
39
	}
40

  
41
	public Instance setHostedby(final String hostedby) {
42
		this.hostedby = hostedby;
43
		return this;
44
	}
45

  
46
	public String getInstancetype() {
47
		return instancetype;
48
	}
49

  
50
	public Instance setInstancetype(final String instancetype) {
51
		this.instancetype = instancetype;
52
		return this;
53
	}
54
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/src/main/java/eu/dnetlib/data/broker/model/openaire/Publication.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.List;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class Publication {
9

  
10
	private List<String> titles;
11

  
12
	private List<String> abstracts;
13

  
14
	private String language;
15

  
16
	private List<String> subjects;
17

  
18
	private List<String> creators;
19

  
20
	private String publicationdate;
21

  
22
	private String publisher;
23

  
24
	private String embargoenddate;
25

  
26
	private List<String> contributor;
27

  
28
	private Journal journal;
29

  
30
	private List<String> collectedFrom;
31

  
32
	private List<Pid> pids;
33

  
34
	private List<Instance> instances;
35

  
36
	private List<ExternalReference> externalReferences;
37

  
38
	public Publication() {
39
	}
40

  
41
	public List<String> getTitles() {
42
		return titles;
43
	}
44

  
45
	public Publication setTitles(final List<String> titles) {
46
		this.titles = titles;
47
		return this;
48
	}
49

  
50
	public List<String> getAbstracts() {
51
		return abstracts;
52
	}
53

  
54
	public Publication setAbstracts(final List<String> abstracts) {
55
		this.abstracts = abstracts;
56
		return this;
57
	}
58

  
59
	public String getLanguage() {
60
		return language;
61
	}
62

  
63
	public Publication setLanguage(final String language) {
64
		this.language = language;
65
		return this;
66
	}
67

  
68
	public List<String> getSubjects() {
69
		return subjects;
70
	}
71

  
72
	public Publication setSubjects(final List<String> subjects) {
73
		this.subjects = subjects;
74
		return this;
75
	}
76

  
77
	public List<String> getCreators() {
78
		return creators;
79
	}
80

  
81
	public Publication setCreators(final List<String> creators) {
82
		this.creators = creators;
83
		return this;
84
	}
85

  
86
	public String getPublicationdate() {
87
		return publicationdate;
88
	}
89

  
90
	public Publication setPublicationdate(final String publicationdate) {
91
		this.publicationdate = publicationdate;
92
		return this;
93
	}
94

  
95
	public String getPublisher() {
96
		return publisher;
97
	}
98

  
99
	public Publication setPublisher(final String publisher) {
100
		this.publisher = publisher;
101
		return this;
102
	}
103

  
104
	public String getEmbargoenddate() {
105
		return embargoenddate;
106
	}
107

  
108
	public Publication setEmbargoenddate(final String embargoenddate) {
109
		this.embargoenddate = embargoenddate;
110
		return this;
111
	}
112

  
113
	public List<String> getContributor() {
114
		return contributor;
115
	}
116

  
117
	public Publication setContributor(final List<String> contributor) {
118
		this.contributor = contributor;
119
		return this;
120
	}
121

  
122
	public Journal getJournal() {
123
		return journal;
124
	}
125

  
126
	public Publication setJournal(final Journal journal) {
127
		this.journal = journal;
128
		return this;
129
	}
130

  
131
	public List<String> getCollectedFrom() {
132
		return collectedFrom;
133
	}
134

  
135
	public Publication setCollectedFrom(final List<String> collectedFrom) {
136
		this.collectedFrom = collectedFrom;
137
		return this;
138
	}
139

  
140
	public List<Pid> getPids() {
141
		return pids;
142
	}
143

  
144
	public Publication setPids(final List<Pid> pids) {
145
		this.pids = pids;
146
		return this;
147
	}
148

  
149
	public List<Instance> getInstances() {
150
		return instances;
151
	}
152

  
153
	public Publication setInstances(final List<Instance> instances) {
154
		this.instances = instances;
155
		return this;
156
	}
157

  
158
	public List<ExternalReference> getExternalReferences() {
159
		return externalReferences;
160
	}
161

  
162
	public Publication setExternalReferences(final List<ExternalReference> externalReferences) {
163
		this.externalReferences = externalReferences;
164
		return this;
165
	}
166
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/src/main/java/eu/dnetlib/data/broker/model/openaire/Journal.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
/**
4
 * Created by claudio on 22/07/16.
5
 */
6
public class Journal {
7

  
8
	private String name;
9

  
10
	private String issn;
11

  
12
	private String eissn;
13

  
14
	private String lissn;
15

  
16
	public Journal() {
17
	}
18

  
19
	public String getName() {
20
		return name;
21
	}
22

  
23
	public Journal setName(final String name) {
24
		this.name = name;
25
		return this;
26
	}
27

  
28
	public String getIssn() {
29
		return issn;
30
	}
31

  
32
	public Journal setIssn(final String issn) {
33
		this.issn = issn;
34
		return this;
35
	}
36

  
37
	public String getEissn() {
38
		return eissn;
39
	}
40

  
41
	public Journal setEissn(final String eissn) {
42
		this.eissn = eissn;
43
		return this;
44
	}
45

  
46
	public String getLissn() {
47
		return lissn;
48
	}
49

  
50
	public Journal setLissn(final String lissn) {
51
		this.lissn = lissn;
52
		return this;
53
	}
54
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3
	<parent>
4
		<groupId>eu.dnetlib</groupId>
5
		<artifactId>dnet-parent</artifactId>
6
		<version>1.0.0</version>
7
		<relativePath />
8
	</parent>
9
	<modelVersion>4.0.0</modelVersion>
10
	<groupId>eu.dnetlib</groupId>
11
	<artifactId>dnet-openaire-broker</artifactId>
12
	<packaging>jar</packaging>
13
	<version>1.0.0</version>
14
	<scm>
15
		<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.0</developerConnection>
16
	</scm>
17
	<dependencies>
18

  
19
		<dependency>
20
			<groupId>com.google.code.gson</groupId>
21
			<artifactId>gson</artifactId>
22
			<version>${google.gson.version}</version>
23
		</dependency>
24
		<dependency>
25
			<groupId>junit</groupId>
26
			<artifactId>junit</artifactId>
27
			<version>${junit.version}</version>
28
			<scope>test</scope>
29
		</dependency>
30

  
31
	</dependencies>
32
</project>
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.1/src/main/java/eu/dnetlib/data/broker/model/openaire/OpenAireEventPayload.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import com.google.gson.GsonBuilder;
4

  
5
/**
6
 * Created by claudio on 11/07/16.
7
 */
8
public class OpenAireEventPayload {
9

  
10
	private Publication publication;
11

  
12
	private Publication highlight;
13

  
14
	private Provenance provenance;
15

  
16
	public OpenAireEventPayload() {}
17

  
18
	public Publication getPublication() {
19
		return publication;
20
	}
21

  
22
	public OpenAireEventPayload setPublication(final Publication publication) {
23
		this.publication = publication;
24
		return this;
25
	}
26

  
27
	public OpenAireEventPayload setHighlight(final Publication highlight) {
28
		this.highlight = highlight;
29
		return this;
30
	}
31

  
32
	public Publication getHighlight() {
33
		return highlight;
34
	}
35

  
36
	public Provenance getProvenance() {
37
		return provenance;
38
	}
39

  
40
	public OpenAireEventPayload setProvenance(final Provenance provenance) {
41
		this.provenance = provenance;
42
		return this;
43
	}
44

  
45
	public static OpenAireEventPayload fromJSON(final String json) {
46
		final GsonBuilder b = new GsonBuilder();
47
		return b.create().fromJson(json, OpenAireEventPayload.class);
48
	}
49

  
50
	public String toJSON() {
51
		final GsonBuilder b = new GsonBuilder();
52
		return b.create().toJson(this);
53
	}
54

  
55
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.1/src/main/java/eu/dnetlib/data/broker/model/openaire/Provenance.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 26/07/16.
7
 */
8
public class Provenance {
9

  
10
	private String repositoryName;
11

  
12
	private String url;
13

  
14
	private String id;
15

  
16
	public Provenance() {
17
	}
18

  
19
	public String getRepositoryName() {
20
		return repositoryName;
21
	}
22

  
23
	public Provenance setRepositoryName(final String repositoryName) {
24
		this.repositoryName = repositoryName;
25
		return this;
26
	}
27

  
28
	public String getUrl() {
29
		return url;
30
	}
31

  
32
	public Provenance setUrl(final String url) {
33
		this.url = url;
34
		return this;
35
	}
36

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

  
41
	public Provenance setId(final String id) {
42
		this.id = id;
43
		return this;
44
	}
45

  
46
	@Override
47
	public int hashCode() {
48
		return Objects.hash(getRepositoryName(), getUrl(), getId());
49
	}
50
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.1/src/main/java/eu/dnetlib/data/broker/model/openaire/ExternalReference.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class ExternalReference {
9

  
10
	private String url;
11

  
12
	private String sitename;
13

  
14
	private String type;
15

  
16
	private String refidentifier;
17

  
18
	public ExternalReference() {
19
	}
20

  
21
	public String getUrl() {
22
		return url;
23
	}
24

  
25
	public ExternalReference setUrl(final String url) {
26
		this.url = url;
27
		return this;
28
	}
29

  
30
	public String getSitename() {
31
		return sitename;
32
	}
33

  
34
	public ExternalReference setSitename(final String sitename) {
35
		this.sitename = sitename;
36
		return this;
37
	}
38

  
39
	public String getType() {
40
		return type;
41
	}
42

  
43
	public ExternalReference setType(final String type) {
44
		this.type = type;
45
		return this;
46
	}
47

  
48
	public String getRefidentifier() {
49
		return refidentifier;
50
	}
51

  
52
	public ExternalReference setRefidentifier(final String refidentifier) {
53
		this.refidentifier = refidentifier;
54
		return this;
55
	}
56

  
57
	@Override
58
	public int hashCode() {
59
		return Objects.hash(getUrl(), getSitename(), getType(), getRefidentifier());
60
	}
61
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.1/src/main/java/eu/dnetlib/data/broker/model/openaire/Instance.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.Objects;
4

  
5
/**
6
 * Created by claudio on 22/07/16.
7
 */
8
public class Instance {
9

  
10
	private String url;
11

  
12
	private String license;
13

  
14
	private String hostedby;
15

  
16
	private String instancetype;
17

  
18
	public Instance() {
19
	}
20

  
21
	public String getUrl() {
22
		return url;
23
	}
24

  
25
	public Instance setUrl(final String url) {
26
		this.url = url;
27
		return this;
28
	}
29

  
30
	public String getLicense() {
31
		return license;
32
	}
33

  
34
	public Instance setLicense(final String license) {
35
		this.license = license;
36
		return this;
37
	}
38

  
39
	public String getHostedby() {
40
		return hostedby;
41
	}
42

  
43
	public Instance setHostedby(final String hostedby) {
44
		this.hostedby = hostedby;
45
		return this;
46
	}
47

  
48
	public String getInstancetype() {
49
		return instancetype;
50
	}
51

  
52
	public Instance setInstancetype(final String instancetype) {
53
		this.instancetype = instancetype;
54
		return this;
55
	}
56

  
57
	@Override
58
	public int hashCode() {
59
		return Objects.hash(getLicense(), getUrl(), getInstancetype(), getHostedby());
60
	}
61
}
modules/dnet-openaire-broker/tags/dnet-openaire-broker-1.0.1/src/main/java/eu/dnetlib/data/broker/model/openaire/Publication.java
1
package eu.dnetlib.data.broker.model.openaire;
2

  
3
import java.util.List;
4
import java.util.Set;
5

  
6
/**
7
 * Created by claudio on 22/07/16.
8
 */
9
public class Publication {
10

  
11
	private String originalId;
12

  
13
	private Set<String> titles;
14

  
15
	private Set<String> abstracts;
16

  
17
	private String language;
18

  
19
	private Set<String> subjects;
20

  
21
	private Set<String> creators;
22

  
23
	private String publicationdate;
24

  
25
	private String publisher;
26

  
27
	private String embargoenddate;
28

  
29
	private Set<String> contributor;
30

  
31
	private Journal journal;
32

  
33
	private Set<String> collectedFrom;
34

  
35
	private Set<Pid> pids;
36

  
37
	private Set<Instance> instances;
38

  
39
	private Set<ExternalReference> externalReferences;
40

  
41
	public Publication() {
42
	}
43

  
44
	public Set<String> getTitles() {
45
		return titles;
46
	}
47

  
48
	public Publication setTitles(final Set<String> titles) {
49
		this.titles = titles;
50
		return this;
51
	}
52

  
53
	public Set<String> getAbstracts() {
54
		return abstracts;
55
	}
56

  
57
	public Publication setAbstracts(final Set<String> abstracts) {
58
		this.abstracts = abstracts;
59
		return this;
60
	}
61

  
62
	public String getLanguage() {
63
		return language;
64
	}
65

  
66
	public Publication setLanguage(final String language) {
67
		this.language = language;
68
		return this;
69
	}
70

  
71
	public Set<String> getSubjects() {
72
		return subjects;
73
	}
74

  
75
	public Publication setSubjects(final Set<String> subjects) {
76
		this.subjects = subjects;
77
		return this;
78
	}
79

  
80
	public Set<String> getCreators() {
81
		return creators;
82
	}
83

  
84
	public Publication setCreators(final Set<String> creators) {
85
		this.creators = creators;
86
		return this;
87
	}
88

  
89
	public String getPublicationdate() {
90
		return publicationdate;
91
	}
92

  
93
	public Publication setPublicationdate(final String publicationdate) {
94
		this.publicationdate = publicationdate;
95
		return this;
96
	}
97

  
98
	public String getPublisher() {
99
		return publisher;
100
	}
101

  
102
	public Publication setPublisher(final String publisher) {
103
		this.publisher = publisher;
104
		return this;
105
	}
106

  
107
	public String getEmbargoenddate() {
108
		return embargoenddate;
109
	}
110

  
111
	public Publication setEmbargoenddate(final String embargoenddate) {
112
		this.embargoenddate = embargoenddate;
113
		return this;
114
	}
115

  
116
	public Set<String> getContributor() {
117
		return contributor;
118
	}
119

  
120
	public Publication setContributor(final Set<String> contributor) {
121
		this.contributor = contributor;
122
		return this;
123
	}
124

  
125
	public Journal getJournal() {
126
		return journal;
127
	}
128

  
129
	public Publication setJournal(final Journal journal) {
130
		this.journal = journal;
131
		return this;
132
	}
133

  
134
	public Set<String> getCollectedFrom() {
135
		return collectedFrom;
136
	}
137

  
138
	public Publication setCollectedFrom(final Set<String> collectedFrom) {
139
		this.collectedFrom = collectedFrom;
140
		return this;
141
	}
142

  
143
	public Set<Pid> getPids() {
144
		return pids;
145
	}
146

  
147
	public Publication setPids(final Set<Pid> pids) {
148
		this.pids = pids;
149
		return this;
150
	}
151

  
152
	public Set<Instance> getInstances() {
153
		return instances;
154
	}
155

  
156
	public Publication setInstances(final Set<Instance> instances) {
157
		this.instances = instances;
158
		return this;
159
	}
160

  
161
	public Set<ExternalReference> getExternalReferences() {
162
		return externalReferences;
163
	}
164

  
165
	public Publication setExternalReferences(final Set<ExternalReference> externalReferences) {
166
		this.externalReferences = externalReferences;
167
		return this;
168
	}
169

  
170
	public String getOriginalId() {
171
		return originalId;
172
	}
173

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff