Revision 56483
Added by Antonis Lempesis over 4 years ago
Serializer.java | ||
---|---|---|
396 | 396 |
|
397 | 397 |
Result.Metadata metadata = oaf.getEntity().getResult().getMetadata(); |
398 | 398 |
|
399 |
String titleString = new String(); |
|
400 |
|
|
401 |
for (int i = 0; i < metadata.getTitleList().size(); i++) { |
|
402 |
StructuredProperty title = metadata.getTitleList().get(i); |
|
403 |
|
|
404 |
if (i == 0) { |
|
405 |
titleString = title.getValue().replaceAll("\\s+", " "); |
|
406 |
titleString = titleString.replaceAll("\n", " "); |
|
407 |
} |
|
408 |
break; |
|
409 |
} |
|
410 |
|
|
411 |
// pubtitle |
|
412 |
buff.append(getStringField(titleString, DELIM, ENCLOSING)); |
|
413 |
|
|
414 |
|
|
399 | 415 |
// publisher |
400 | 416 |
buff.append(getStringField(metadata.getPublisher().getValue(), DELIM, ENCLOSING)); |
401 | 417 |
|
... | ... | |
448 | 464 |
//authors |
449 | 465 |
buff.append(getNumericField(String.valueOf(authors), DELIM, ENCLOSING)); |
450 | 466 |
|
467 |
String sources = new String(); |
|
468 |
|
|
469 |
|
|
470 |
for (Instance instance : (oaf.getEntity().getResult().getInstanceList())) { |
|
471 |
List<String> urls = instance.getUrlList(); |
|
472 |
for (String url : urls) { |
|
473 |
sources += cleanUrl(url, DELIM, ENCLOSING) + " ;"; |
|
474 |
} |
|
475 |
} |
|
476 |
|
|
477 |
//sources |
|
478 |
sources = ENCLOSING + sources + ENCLOSING + DELIM; |
|
479 |
|
|
480 |
buff.append(sources); |
|
481 |
|
|
451 | 482 |
return buff.toString(); |
452 | 483 |
|
453 | 484 |
} |
... | ... | |
744 | 775 |
case entity: |
745 | 776 |
return cleanId(oaf.getEntity().getId(), DELIM, ENCLOSING); |
746 | 777 |
case relation: |
747 |
|
|
748 | 778 |
return cleanId(oaf.getRel().getSource(), DELIM, ENCLOSING); |
749 | 779 |
|
750 | 780 |
} |
Also available in: Unified diff
Minor bug fixes