Project

General

Profile

« Previous | Next » 

Revision 54988

added method to filter out Zenodo communities from context

View differences:

modules/dnet-directindex-api/trunk/src/main/java/eu/dnetlib/openaire/directindex/objects/ResultEntry.java
7 7
import java.util.List;
8 8
import java.util.Map;
9 9
import java.util.concurrent.TimeUnit;
10
import java.util.stream.Collectors;
11
import java.util.stream.Stream;
10 12

  
11 13
import org.apache.commons.lang.StringUtils;
12 14
import org.apache.commons.logging.Log;
......
203 205
		this.contexts = contexts;
204 206
	}
205 207

  
208
	public void filterContexts(){
209
		contexts = contexts.stream().filter(c -> !c.contains("https://zenodo.org/communities/")).collect(Collectors.toList());
210
	}
211

  
206 212
	@ApiModelProperty(value = "E.g. info:eu-repo/grantAgreement/EC/FP7/283595/EU//OpenAIREplus")
207 213
	public List<String> getLinksToProjects() {
208 214
		return linksToProjects;

Also available in: Unified diff