Skip to content

Commit

Permalink
WIP 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosjepard committed May 24, 2024
1 parent 10360ec commit 8991695
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,14 @@ protected ReporterDetails validateSIP6(final MetsValidatorState metsValidatorSta
*/
protected ReporterDetails validateSIP7(final MetsValidatorState metsValidatorState, final MetsType.MetsHdr metsHdr) {
final List<MetsType.MetsHdr.AltRecordID> altRecordIDS = metsHdr.getAltRecordID();
boolean found = false;
int count = 0;
if (altRecordIDS != null && !altRecordIDS.isEmpty()) {
for (MetsType.MetsHdr.AltRecordID altRecordID : altRecordIDS) {
final String type = altRecordID.getTYPE();
if ("REFERENCECODE".equals(type)) {
found = true;
count++;
}
}
if (!found) {
return new ReporterDetails(getSIPVersion(),
Message.createErrorMessage("metsHdr/altRecordID with the @TYPE “REFERENCECODE” not found in %1$s",
metsValidatorState.getMetsName(), metsValidatorState.isRootMets()),
false, false);
}
if (count > 1) {
return new ReporterDetails(getSIPVersion(),
Message.createErrorMessage("Can't have more than one metsHdr/altRecordID of the type REFERENCECODE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ public Map<String, ReporterDetails> validate(final StructureValidatorState struc
ResultsUtils.addResult(results, ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP85_ID,
generator.validateCSIP85(metsValidatorState).setSpecification(generator.getCSIPVersion()));

/* CSIP86 */
notifyObserversValidationStarted(moduleName, ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID);
ResultsUtils.addResult(results, ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID,
generator.validateCSIP86(metsValidatorState).setSpecification(generator.getCSIPVersion()));

/* CSIP88 */
notifyObserversValidationStarted(moduleName, ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP88_ID);
Expand Down Expand Up @@ -313,7 +309,6 @@ public Map<String, ReporterDetails> validate(final StructureValidatorState struc
ResultsUtils.addResults(results,
new ReporterDetails(generator.getCSIPVersion(), message, true, true),
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP85_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP88_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP89_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP90_ID,
Expand Down Expand Up @@ -352,7 +347,6 @@ public Map<String, ReporterDetails> validate(final StructureValidatorState struc
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP83_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP84_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP85_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP88_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP89_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP90_ID,
Expand Down Expand Up @@ -392,7 +386,6 @@ public Map<String, ReporterDetails> validate(final StructureValidatorState struc
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP83_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP84_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP85_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP88_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP89_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP90_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public Map<String, ReporterDetails> validate(final StructureValidatorState struc
ResultsUtils.addResults(results,
new ReporterDetails(generator.getCSIPVersion(), message, true, true),
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP85_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP88_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP89_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP90_ID,
Expand Down Expand Up @@ -349,7 +348,6 @@ public Map<String, ReporterDetails> validate(final StructureValidatorState struc
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP83_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP84_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP85_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP86_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP88_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP89_ID,
ConstantsCSIPspec.VALIDATION_REPORT_SPECIFICATION_CSIP90_ID,
Expand Down
Loading

0 comments on commit 8991695

Please sign in to comment.