Weitere Korrekturen am CSV-Importer

git-svn-id: https://svn.libreccm.org/ccm/trunk@1937 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2012-11-15 21:18:32 +00:00
parent 15c6fb0328
commit 53e796b724
3 changed files with 16 additions and 11 deletions

View File

@ -73,7 +73,7 @@ public class ProceedingsImportReport {
public void setPublisher(final PublisherImportReport publisher) {
this.publisher = publisher;
}
public boolean isCreated() {
return created;
}
@ -87,7 +87,7 @@ public class ProceedingsImportReport {
if (created) {
final StringWriter strWriter = new StringWriter();
final PrintWriter writer = new PrintWriter(strWriter);
for (int i = 0; i < 40; i++) {
writer.append("- ");
}
@ -98,13 +98,15 @@ public class ProceedingsImportReport {
//writer.printf("Date from of conference: %s\n", dateToOfConference.toString());
//writer.printf("Date to of conference..: %s\n", dateToOfConference.toString());
writer.print("Authors:\n");
for(AuthorImportReport author : authors) {
for (AuthorImportReport author : authors) {
writer.printf("%s\n", author.toString());
}
writer.append(publisher.toString());
writer.append('\n');
if (publisher != null) {
writer.append(publisher.toString());
}
writer.append('\n');
for (int i = 0; i < 40; i++) {
writer.append("- ");
}
@ -116,5 +118,4 @@ public class ProceedingsImportReport {
proceedingsTitle);
}
}
}

View File

@ -242,7 +242,9 @@ public class ImporterUtil {
collectedVolume.setYearOfPublication(yearOfPub);
for (AuthorData author : authors) {
report.addAuthor(processAuthor(collectedVolume, author, pretend));
if ((author.getSurname() != null) && !author.getSurname().isEmpty()) {
report.addAuthor(processAuthor(collectedVolume, author, pretend));
}
}
if ((publisherName != null) && !publisherName.isEmpty()) {
@ -329,7 +331,9 @@ public class ImporterUtil {
}
proceedings.setYearOfPublication(yearOfPub);
for (AuthorData author : authors) {
report.addAuthor(processAuthor(proceedings, author, pretend));
if ((author.getSurname() != null) && !author.getSurname().isEmpty()) {
report.addAuthor(processAuthor(proceedings, author, pretend));
}
}
if ((publisherName != null) && !publisherName.isEmpty()) {

View File

@ -113,7 +113,7 @@ public class PublicationsImporter implements SciPublicationsImporter {
importerUtil);
report.addPublication(result);
} catch (Exception ex) {
tctx.abortTxn();
tctx.abortTxn();
throw new SciPublicationsImportException(ex);
}