Weitere Warnungen über seltsame Datensätze im DaBInImporter.

git-svn-id: https://svn.libreccm.org/ccm/trunk@739 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2011-02-07 10:55:39 +00:00
parent 4f844cad39
commit 1ac3d33cd9
1 changed files with 79 additions and 59 deletions

View File

@ -1295,7 +1295,8 @@ public class DaBInImporter extends Program {
} else { } else {
result = stmt.executeQuery(String.format("SELECT Verlag FROM publikation " result = stmt.executeQuery(String.format("SELECT Verlag FROM publikation "
+ "WHERE (Typ = 'Monographie' OR Typ = 'Sammelband' OR Typ = 'Artikel / Aufsatz') AND Timestamp > '%s' " + "WHERE (Typ = 'Monographie' OR Typ = 'Sammelband' OR Typ = 'Artikel / Aufsatz') AND Timestamp > '%s' "
+ "GROUP BY Verlag", timestamp)); + "GROUP BY Verlag",
timestamp));
} }
result.last(); result.last();
number = result.getRow(); number = result.getRow();
@ -1766,7 +1767,8 @@ public class DaBInImporter extends Program {
} else { } else {
result = stmt.executeQuery(String.format("SELECT DISTINCT Arbeitspapier_Id FROM arbeitspapier " result = stmt.executeQuery(String.format("SELECT DISTINCT Arbeitspapier_Id FROM arbeitspapier "
+ "WHERE Timestamp > '%s'" + "WHERE Timestamp > '%s'"
+ "ORDER BY Jahr, Name", timestamp)); + "ORDER BY Jahr, Name",
timestamp));
} }
while (result.next()) { while (result.next()) {
workingPaperIds.add(result.getString(1)); workingPaperIds.add(result.getString(1));
@ -2775,6 +2777,11 @@ public class DaBInImporter extends Program {
publicationEn.addAuthor(author, true); publicationEn.addAuthor(author, true);
} }
if ("et. al.".equals(author.getSurname())
|| "et. al.".equals(author.getGivenName())) {
System.out.printf("\t***WARNING: The publication %s has a author 'et. al.'. It is strongly recommened to name ALL authors of a publication. ");
}
RelatedLink myPublication; RelatedLink myPublication;
myPublication = new RelatedLink(); myPublication = new RelatedLink();
myPublication.setLinkOwner((GenericPerson) personsMap.get(authorship. myPublication.setLinkOwner((GenericPerson) personsMap.get(authorship.
@ -2785,7 +2792,7 @@ public class DaBInImporter extends Program {
myPublication.setTitle(publicationDe.getTitle()); myPublication.setTitle(publicationDe.getTitle());
} else { } else {
System.out.println( System.out.println(
"\t***WARNING: Publication title is too long for link title. Trancating."); "\t***WARNING: Publication title is too long for link title. Truncating.");
myPublication.setTitle(publicationDe.getTitle(). myPublication.setTitle(publicationDe.getTitle().
substring(0, 200)); substring(0, 200));
} }
@ -3172,12 +3179,25 @@ public class DaBInImporter extends Program {
private void createPublisher(final PublisherData publisherData) { private void createPublisher(final PublisherData publisherData) {
if (publishersMap.containsKey(publisherData)) { if (publishersMap.containsKey(publisherData)) {
System.out.printf( System.out.printf(
"Publisher '%s: %s' was already exists. Skiping.\n", "Publisher '%s: %s' already exists. Skiping.\n",
publisherData.getPlace(), publisherData.getPlace(),
publisherData.getName()); publisherData.getName());
return; return;
} }
if (publisherData.getName().length() < 3) {
System.out.printf(
"WARNING: The name of the publisher '%s' is very short.",
publisherData.getName());
}
if ((publisherData.getPlace() == null)
|| publisherData.getPlace().isEmpty()) {
System.out.printf(
"WARNING: The publisher '%s' has no place.",
publisherData.getName());
}
Transaction transaction = new Transaction() { Transaction transaction = new Transaction() {
@Override @Override