SISIS: Fix prolongAllResult for journal items
For journal items, the title is empty and the journal name and issue is in
the signature field. This is similar to issue / commit
@@ -1989,6 +1989,7 @@ public class SISIS extends OkHttpBaseApi implements OpacApi {
continue;
}
String nextNodeIs = "";
+ boolean hasTitle = false;
for (Node n : td.childNodes()) {
String text;
if (n instanceof Element) {
@@ -2009,10 +2010,14 @@ public class SISIS extends OkHttpBaseApi implements OpacApi {
nextNodeIs = ProlongAllResult.KEY_LINE_NEW_RETURNDATE;
} else if (text.contains("Status:")) {
nextNodeIs = ProlongAllResult.KEY_LINE_MESSAGE;
- } else if (text.contains("Mediennummer:")
- || text.contains("Signatur:")) {
+ } else if (text.contains("Mediennummer:")) {
nextNodeIs = "";
+ } else if (text.contains("Signatur:")) {
+ nextNodeIs = hasTitle ? "" : ProlongAllResult.KEY_LINE_TITLE;
} else if (nextNodeIs.length() > 0) {
+ if (ProlongAllResult.KEY_LINE_TITLE.equals(nextNodeIs)) {
+ hasTitle = true;
+ }
line.put(nextNodeIs, text.trim());
nextNodeIs = "";
}
