();
if (firstPage!=null) verses.addAll(Arrays.asList(firstPage.getVerses()));
if (secondPage!=null) verses.addAll(Arrays.asList(secondPage.getVerses()));
x.addVerses(new ArrayList(verses));
out.print("");
logger.info("canvasMaterial: " + canvasMaterial + "; lastCanvasMaterial: " + lastCanvasMaterial);
if ("Parchment".equals(canvasMaterial) || (canvasMaterial.length() < 1 && "Parchment".equals(lastCanvasMaterial))) {
out.print(gregRule[(secondNumber/2-1)%2]);
}
else if ("Papyrus".equals(canvasMaterial) || (canvasMaterial.length() < 1 && "Papyrus".equals(lastCanvasMaterial))) {
out.print(turnerRule[(secondNumber/2-1)%2]);
}
out.print(" | ");
out.print(" 0 && !gregRule[(secondNumber/2-1)%2].startsWith(parchmentSide)) out.print(" style=\"background-color:pink;\"");
}
else if ("Papyrus".equals(canvasMaterial)) {
if (fibreDirection.length() > 0 && !turnerRule[(secondNumber/2-1)%2].startsWith(fibreDirection)) out.print(" style=\"background-color:pink;\"");
}
out.print(">");
if ("Parchment".equals(canvasMaterial)) {
out.print(parchmentSide);
}
else if ("Papyrus".equals(canvasMaterial)) {
out.print(fibreDirection);
}
out.print(" | ");
String bc = null;
if (contentOverviewFeature1 != null) { bc = contentOverviewFeature1.getStringVal1(); if (bc != null && bc.trim().length() < 1) bc = null; }
if (bc == null && contentOverviewFeature1 != null) { bc = contentOverviewFeature1.getStringVal2(); if (bc != null && bc.trim().length() < 1) bc = null; }
if (bc == null && contentOverviewFeature2 != null) { bc = contentOverviewFeature1.getStringVal1(); if (bc != null && bc.trim().length() < 1) bc = null; }
if (bc == null && contentOverviewFeature2 != null) { bc = contentOverviewFeature1.getStringVal2(); if (bc != null && bc.trim().length() < 1) bc = null; }
if (bc == null) {
if (firstPage!=null) {
bc = firstPage.getBiblicalContent();
for (String ei : params.extraIndex) {
boolean skipS2 = false;
boolean italic = false;
boolean bold = false;
if (ei.startsWith("/")) {
italic = true;
ei = ei.substring(1,ei.length());
}
if (ei.startsWith("*")) {
bold = true;
ei = ei.substring(1,ei.length());
}
// repeated to allow order difference
if (ei.startsWith("/")) {
italic = true;
ei = ei.substring(1,ei.length());
}
if (ei.endsWith("-")) {
skipS2 = true;
ei = ei.substring(0,ei.length()-1);
}
String lexIdx = firstPage.getLectionaryText(ei, skipS2);
if (lexIdx != null && lexIdx.length() > 0) {
if (bc.length() > 0) bc += "; ";
bc += (bold ? "":"") + (italic ? "":"")+lexIdx+ (italic ? "":"") + (bold ? "":"");
}
}
}
if (bc == null || bc.trim().length() < 1) bc = "";
if (secondPage!=null) {
boolean needSlash = (bc.length() > 0);
boolean needSemi = false;
if (secondPage.getBiblicalContent() != null && secondPage.getBiblicalContent().trim().length() > 0) {
if (needSlash) bc += " / ";
needSlash = false;
bc += secondPage.getBiblicalContent();
needSemi = true;
}
for (String ei : params.extraIndex) {
boolean skipS2 = false;
boolean italic = false;
boolean bold = false;
if (ei.startsWith("/")) {
italic = true;
ei = ei.substring(1,ei.length());
}
if (ei.startsWith("*")) {
bold = true;
ei = ei.substring(1,ei.length());
}
// repeated to allow order difference
if (ei.startsWith("/")) {
italic = true;
ei = ei.substring(1,ei.length());
}
if (ei.endsWith("-")) {
skipS2 = true;
ei = ei.substring(0,ei.length()-1);
}
String lexIdx = secondPage.getLectionaryText(ei, skipS2);
if (lexIdx != null && lexIdx.length() > 0) {
if (needSlash) bc += " / ";
else if (needSemi) bc += "; ";
bc += (bold ? "":"") + (italic ? "":"")+lexIdx+ (italic ? "":"") + (bold ? "":"");
}
}
}
//bc = x.getBiblicalContent(); if (bc != null && bc.trim().length() < 1) bc = null;
if (bc != null) logger.info("bc: " + bc);
if (bc != null) lastContentOverview = null;
}
else lastContentOverview = bc;
if (bc == null) bc = lastContentOverview;
String blank = null;
if (blankFeature1 != null) { blank = blankFeature1.getStringVal1(); if (blank != null && blank.trim().length() < 1) blank = null; }
if (blank == null && blankFeature2 != null) { blank = blankFeature2.getStringVal1(); if (blank != null && blank.trim().length() < 1) blank = null; }
if (blank != null) bc = blank;
out.print(""+(bc == null ? "" : bc)+" | ");
out.print("");
out.print((n != 0 ? fullShelfMark.get(docName + "." + n) : ""));
if (firstPage.getShelfFolioNums() != null && firstPage.getShelfFolioNums().length() > 0) {
String fn = firstPage.getShelfFolioNums();
if (fn != null) {
out.print(", " + fn.split("\\|")[0]);
}
}
out.print((n2 != 0 ? (" + " + fullShelfMark.get(docName + "." + n2)) : ""));
if (firstPage.getShelfFolioNums() != null && firstPage.getShelfFolioNums().length() > 0) {
String fn = firstPage.getShelfFolioNums();
if (fn != null && fn.split("\\|").length > 1) {
out.print(", " + fn.split("\\|")[1]);
}
}
out.print((n3 != 0 ? (" + " + fullShelfMark.get(docName + "." + n3)) : ""));
if (firstPage.getShelfFolioNums() != null && firstPage.getShelfFolioNums().length() > 0) {
String fn = firstPage.getShelfFolioNums();
if (fn != null && fn.split("\\|").length > 2) {
out.print(", " + fn.split("\\|")[2]);
}
}
logger.info("SF#: " +firstPage.getShelfFolioNums());
logger.info("n2: " +n2);
out.print(" | ");
out.print("