Skip to content

Commit

Permalink
issue #75: add getIgnorableRecords to all analyses
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Dec 21, 2020
1 parent b629508 commit 8563732
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) throws IOExcept

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) throws IOException {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

AuthorithyAnalyzer analyzer = new AuthorithyAnalyzer(marcRecord, statistics);
int count = analyzer.process();
count((count > 0), hasClassifications);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) throws IOExcept

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) throws IOException {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

ClassificationAnalyzer analyzer = new ClassificationAnalyzer(marcRecord, statistics);
analyzer.process();
int total1 = statistics.getHasClassifications().get(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) throws IOExcept

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) throws IOException {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

this.recordNumber = recordNumber;
Map<FRBRFunction, Integer> recordCounter = new TreeMap<>();
Map<DataFieldDefinition, Boolean> cache = new HashMap<>();
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/gwdg/metadataqa/marc/cli/MarcToSolr.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) throws IOExcept

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) throws IOException {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

try {
Map<String, List<String>> map = marcRecord.getKeyValuePairs(
parameters.getSolrFieldType(), true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) throws IOExcept

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) throws IOException {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

NetworkAnalyzer analyzer = new NetworkAnalyzer(marcRecord);
Set<DataField> collector = analyzer.process(recordNumber);
if (collector.size() > 0) {
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/de/gwdg/metadataqa/marc/cli/SerialScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) {
@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) {
if (marcRecord.getType().equals(Leader.Type.CONTINUING_RESOURCES)) {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

Serial serial = new Serial(marcRecord);
List<Integer> scores = serial.determineRecordQualityScore();
String message = createRow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) {

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

List<Double> scores = ShelfReadyAnalysis.getScores(marcRecord);
String id = parameters.getTrimId()
? marcRecord.getId().trim()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ public void processRecord(Record marc4jRecord, int recordNumber) {

@Override
public void processRecord(MarcRecord marcRecord, int recordNumber) {
if (parameters.getIgnorableRecords().isIgnorable(marcRecord))
return;

List<Integer> scores = ThompsonTraillAnalysis.getScores(marcRecord);
String id = parameters.getTrimId()
? marcRecord.getId().trim()
Expand Down

0 comments on commit 8563732

Please sign in to comment.