Project

General

Profile

« Previous | Next » 

Revision 53702

update for the zenodo community associated to the RCD community

View differences:

modules/dnet-openaire-exporter/trunk/src/main/java/eu/dnetlib/openaire/community/CommunityConstants.java
18 18
	// id suffixes
19 19
	public final static String PROJECTS_ID_SUFFIX = ID_SEPARATOR + "projects";
20 20
	public final static String CONTENTPROVIDERS_ID_SUFFIX = ID_SEPARATOR + "contentproviders";
21
	public final static String ZENODOCOMMUNITY_ID_SUFFIX = ID_SEPARATOR + "zenodocommunities";
21 22

  
22 23
	// community summary
23 24
	public final static String CSUMMARY_DESCRIPTION = "description";
......
25 26
	public final static String CSUMMARY_STATUS = "status";
26 27
	public final static String CSUMMARY_NAME = "name";
27 28
	public final static String CSUMMARY_MANAGER = "manager";
29
	public final static String CSUMMARY_ZENODOC = "zenodoCommunity";
28 30

  
29 31
	// community profile
30 32
	public final static String CPROFILE_SUBJECT = "subject";
......
39 41
	public final static String CCONTENTPROVIDER_NAME = "name";
40 42
	public final static String CCONTENTPROVIDER_OFFICIALNAME = "officialname";
41 43

  
44
	//community zenodo community
45
	public final static String CZENODOCOMMUNITY_NAME = "zenodoid";
46

  
47

  
42 48
}
modules/dnet-openaire-exporter/trunk/src/main/java/eu/dnetlib/openaire/community/CommunityMappingUtils.java
43 43
		if (params.containsKey(CSUMMARY_MANAGER)) {
44 44
			summary.setManagers(splitValues(asValues(params.get(CSUMMARY_MANAGER)), CSV_DELIMITER));
45 45
		}
46
		if (params.containsKey(CSUMMARY_ZENODOC)) {
47
			summary.setName(asCsv(params.get(CSUMMARY_ZENODOC)));
48
		}
46 49

  
47 50
		return summary;
48 51
	}
modules/dnet-openaire-exporter/trunk/src/main/java/eu/dnetlib/openaire/community/CommunitySummary.java
35 35
	@ApiModelProperty("status of the community, drives its visibility")
36 36
	protected CommunityStatus status;
37 37

  
38
	@ApiModelProperty("Zenodo community associated to this community")
39
	protected String zenodoCommunity;
40

  
38 41
	public CommunitySummary() {
39 42
	}
40 43

  
......
47 50
			final String description,
48 51
			final List<String> managers,
49 52
			final String logoUrl,
50
			final CommunityStatus status) {
53
			final CommunityStatus status,
54
			final String zenodoCommunity) {
51 55
		this.id = id;
52 56
		this.queryId = queryId;
53 57
		this.type = type;
......
57 61
		this.managers = managers;
58 62
		this.logoUrl = logoUrl;
59 63
		this.status = status;
64
		this.zenodoCommunity = zenodoCommunity;
60 65
	}
61 66

  
62 67
	public CommunitySummary(final CommunitySummary summary) {
......
68 73
				summary.getDescription(),
69 74
				summary.getManagers(),
70 75
				summary.getLogoUrl(),
71
				summary.getStatus());
76
				summary.getStatus(),
77
				summary.getZenodoCommunity());
72 78
	}
73 79

  
74 80
	public String getId() {
......
143 149
		this.status = status;
144 150
	}
145 151

  
152
	public String getZenodoCommunity() { return zenodoCommunity; }
153

  
154
	public void setZenodoCommunity(String zenodoCommunity) { this.zenodoCommunity = zenodoCommunity; }
155

  
156

  
146 157
}
modules/dnet-openaire-exporter/trunk/src/main/java/eu/dnetlib/openaire/community/CommunityApiCore.java
56 56
		isClient.updateContextParam(id, CSUMMARY_DESCRIPTION, details.getDescription());
57 57
		isClient.updateContextParam(id, CSUMMARY_LOGOURL, details.getLogoUrl());
58 58
		isClient.updateContextParam(id, CSUMMARY_STATUS, details.getStatus().name());
59
		isClient.updateContextParam(id, CSUMMARY_ZENODOC, details.getZenodoCommunity());
59 60

  
60 61
		if (details.getManagers() != null) {
61 62
			isClient.updateContextParam(id, CSUMMARY_MANAGER, Joiner.on(CSV_DELIMITER).join(details.getManagers()));
modules/dnet-openaire-exporter/trunk/src/main/java/eu/dnetlib/openaire/community/CommunityWritableProperties.java
29 29
	@ApiModelProperty("status of the community, drives its visibility")
30 30
	private CommunityStatus status;
31 31

  
32
	@ApiModelProperty("Zenodo community associated to this community")
33
	protected String zenodoCommunity;
34

  
32 35
	public static CommunityWritableProperties fromDetails(final CommunityDetails details) {
33 36
		CommunityWritableProperties p = new CommunityWritableProperties();
34 37
		p.setName(details.getName());
......
38 41
		p.setManagers(details.getManagers());
39 42
		p.setSubjects(details.getSubjects());
40 43
		p.setStatus(details.getStatus());
44
		p.setZenodoCommunity(details.getZenodoCommunity());
41 45
		return p;
42 46
	}
43 47

  
......
96 100
	public void setStatus(final CommunityStatus status) {
97 101
		this.status = status;
98 102
	}
103

  
104
	public String getZenodoCommunity() {return zenodoCommunity;	}
105

  
106
	public void setZenodoCommunity(String zenodoCommunity) {this.zenodoCommunity = zenodoCommunity;	}
99 107
}

Also available in: Unified diff