Skip to content

Commit 4bdfe24

Browse files
committed
Cloud Library indexing updates
1 parent e66dd74 commit 4bdfe24

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed
Binary file not shown.

code/cloud_library_export/src/com/turning_leaf_technologies/cloud_library/CloudLibraryMarcHandler.java

+22-21
Original file line numberDiff line numberDiff line change
@@ -223,30 +223,28 @@ private void processMarcRecord() {
223223
checksumCalculator.reset();
224224
String rawAvailabilityTypeResponse = null;
225225
long availabilityTypeChecksum = 0;
226-
if (availabilityType != null) {
227-
rawAvailabilityTypeResponse = availabilityType.getRawResponse();
228-
if (rawAvailabilityTypeResponse == null) {
229-
rawAvailabilityTypeResponse = "";
230-
}
231-
checksumCalculator.update(rawAvailabilityTypeResponse.getBytes());
232-
availabilityTypeChecksum = checksumCalculator.getValue();
233-
try {
234-
getExistingCloudLibraryAvailabilityStmt.setString(1, cloudLibraryId);
235-
ResultSet getExistingAvailabilityRS = getExistingCloudLibraryAvailabilityStmt.executeQuery();
236-
if (getExistingAvailabilityRS.next()) {
237-
long existingTypeChecksum = getExistingAvailabilityRS.getLong("typeRawChecksum");
238-
logger.debug("Availability type already exists");
239-
if (existingTypeChecksum != availabilityTypeChecksum) {
240-
logger.debug("Updating availability type details");
241-
availabilityChanged = true;
242-
}
243-
} else {
244-
logger.debug("Adding availability type for " + cloudLibraryId);
226+
rawAvailabilityTypeResponse = availabilityType.getRawResponse();
227+
if (rawAvailabilityTypeResponse == null) {
228+
rawAvailabilityTypeResponse = "";
229+
}
230+
checksumCalculator.update(rawAvailabilityTypeResponse.getBytes());
231+
availabilityTypeChecksum = checksumCalculator.getValue();
232+
try {
233+
getExistingCloudLibraryAvailabilityStmt.setString(1, cloudLibraryId);
234+
ResultSet getExistingAvailabilityRS = getExistingCloudLibraryAvailabilityStmt.executeQuery();
235+
if (getExistingAvailabilityRS.next()) {
236+
long existingTypeChecksum = getExistingAvailabilityRS.getLong("typeRawChecksum");
237+
logger.debug("Availability type already exists");
238+
if (existingTypeChecksum != availabilityTypeChecksum) {
239+
logger.debug("Updating availability type details");
245240
availabilityChanged = true;
246241
}
247-
} catch (SQLException e) {
248-
logEntry.incErrors("Error loading availability type", e);
242+
} else {
243+
logger.debug("Adding availability type for " + cloudLibraryId);
244+
availabilityChanged = true;
249245
}
246+
} catch (SQLException e) {
247+
logEntry.incErrors("Error loading availability type", e);
250248
}
251249

252250

@@ -328,6 +326,9 @@ private void processMarcRecord() {
328326
}
329327
}
330328
}
329+
if (format.equals("eComic")) {
330+
break;
331+
}
331332
}
332333
}
333334
}

code/reindexer/reindexer.jar

-4 Bytes
Binary file not shown.

code/reindexer/src/org/aspen_discovery/reindexer/CloudLibraryProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public void processRecord(AbstractGroupedWorkSolr groupedWork, String identifier
143143
//get target audience from Marc
144144
targetAudience = productRS.getString("targetAudience");
145145
if (targetAudience.equals("ADULT")) {
146-
targetAudience.equals("Adult");
146+
targetAudience = "Adult";
147147
}
148148
groupedWork.addTargetAudience(targetAudience);
149149

0 commit comments

Comments
 (0)