Revision 29312
Added by Eri Katsari over 10 years ago
modules/dnet-openaire-stats/trunk/src/main/java/eu/dnetlib/data/mapreduce/hbase/statsExport/utils/Serializer.java | ||
---|---|---|
144 | 144 |
|
145 | 145 |
if (metadata.getLanguage().getClassname() != null && !metadata.getLanguage().getClassname().isEmpty()) { |
146 | 146 |
|
147 |
buffs.add(metadata.getLanguage().getClassname()); |
|
147 |
buffs.add(metadata.getLanguage().getClassname()+NEWLINE);
|
|
148 | 148 |
} |
149 | 149 |
rels.put("resultLanguage", buffs); |
150 | 150 |
return rels; |
... | ... | |
159 | 159 |
|
160 | 160 |
for (Instance instance : (result.getInstanceList())) { |
161 | 161 |
|
162 |
buffs.add(getStringField(instance.getInstancetype().getClassname())); |
|
162 |
buffs.add(getStringField(instance.getInstancetype().getClassname() +NEWLINE));
|
|
163 | 163 |
} |
164 | 164 |
rels.put("resultClassification", buffs); |
165 | 165 |
return rels; |
... | ... | |
174 | 174 |
|
175 | 175 |
for (eu.dnetlib.data.proto.ResultProtos.Result.Context context : result.getMetadata().getContextList()) { |
176 | 176 |
|
177 |
buffs.add(getStringField(context.getId())); |
|
177 |
buffs.add(getStringField(context.getId()+NEWLINE));
|
|
178 | 178 |
|
179 | 179 |
} |
180 | 180 |
rels.put("resultConcept", buffs); |
... | ... | |
192 | 192 |
String hostedBy = null; |
193 | 193 |
|
194 | 194 |
hostedBy = instance.getHostedby().getKey(); |
195 |
hostedBy = this.cleanId(hostedBy);
|
|
195 |
hostedBy = Serializer.cleanId(hostedBy);
|
|
196 | 196 |
|
197 |
buffs.add((getStringField(hostedBy))); |
|
197 |
buffs.add((getStringField(hostedBy)+NEWLINE));
|
|
198 | 198 |
} |
199 | 199 |
rels.put("resultDatasource", buffs); |
200 | 200 |
return rels; |
... | ... | |
213 | 213 |
String buff = new String(); |
214 | 214 |
if (topic.getValue() != null && !topic.getValue().isEmpty()) { |
215 | 215 |
buff += topic.getValue(); |
216 |
buffs.add(buff); |
|
216 |
buffs.add(buff+NEWLINE);
|
|
217 | 217 |
} |
218 | 218 |
} |
219 | 219 |
|
... | ... | |
387 | 387 |
if (buff.endsWith(getStringField(full_id))) { |
388 | 388 |
return null; |
389 | 389 |
} |
390 |
return buff; |
|
390 |
return buff+NEWLINE;
|
|
391 | 391 |
|
392 | 392 |
} |
393 | 393 |
|
Also available in: Unified diff