Project

General

Profile

« Previous | Next » 

Revision 43784

do not invent the funding program in the info:eu string if there is no funding program (e.g. MZOS)

View differences:

Project.java
37 37
	}
38 38

  
39 39
	public String getIdnamespace() {
40
		String res = INFO_EU_REPO_GRANT_AGREEMENT + getFunder();
40
		String res = INFO_EU_REPO_GRANT_AGREEMENT + getFunder()+"/";
41 41
		final String fundingProgram = asFundingProgram(getFundingpathid());
42 42
		if (StringUtils.isNotBlank(fundingProgram)) {
43
			res += "/" + fundingProgram;
43
			res += fundingProgram;
44 44
		}
45 45
		res += "/" + escapeCode(getCode());
46 46
		if (StringUtils.isNotBlank(getJurisdiction())) {
......
93 93
	private String asFundingProgram(final String fundingpathid) {
94 94
		final ArrayList<String> strings = Lists.newArrayList(Splitter.on("::").split(fundingpathid));
95 95
		if(strings.size() <= 1) throw new IllegalStateException("Unexpected funding id: "+fundingpathid);
96
		if(strings.size() == 2) return replaceSlash(strings.get(1));
96
		if(strings.size() == 2) return "";
97 97
		else return replaceSlash(strings.get(2));
98 98
	}
99 99

  

Also available in: Unified diff