Project

General

Profile

« Previous | Next » 

Revision 49489

Let's remove the control chars as well

View differences:

modules/dnet-parthenos-publisher/trunk/src/main/java/eu/dnetlib/parthenos/registry/FacetWriter.java
3 3
import java.io.IOException;
4 4

  
5 5
import com.fasterxml.jackson.core.JsonGenerator;
6
import com.google.common.base.CharMatcher;
6 7
import eu.dnetlib.parthenos.CRM;
7 8
import eu.dnetlib.parthenos.CRMpe;
8 9
import org.apache.commons.lang3.StringUtils;
......
194 195

  
195 196
	protected String getDescriptionFromRDFResource(final Resource resource) {
196 197
		if (resource.hasProperty(CRM.P3_has_note)) {
197
			return resource.getProperty(CRM.P3_has_note).getString().replace('"', '\"');
198
			return CharMatcher.javaIsoControl().removeFrom(resource.getProperty(CRM.P3_has_note).getString().replace('"', '\"'));
198 199
		} else return "";
199 200
	}
200 201

  
201 202
	protected String getLabelFromRDFResource(final Resource resource) {
202 203
		if (resource.hasProperty(RDFS.label)) {
203
			return resource.getProperty(RDFS.label).getString().replace('"', '\"');
204
			return CharMatcher.javaIsoControl().removeFrom(resource.getProperty(RDFS.label).getString().replace('"', '\"'));
204 205
		} else return "";
205 206
	}
206 207

  

Also available in: Unified diff