Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected ReporterDetails validateCSIP84(final MetsValidatorState metsValidatorS
final List<StructMapType> structMap = metsValidatorState.getMets().getStructMap();
if (structMap != null) {
for (StructMapType struct : structMap) {
if (struct.getLABEL().equals("CSIP")) {
if (struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final DivType div = struct.getDiv();
if (div == null) {
return new ReporterDetails(Constants.VALIDATION_REPORT_HEADER_CSIP_VERSION,
Expand Down Expand Up @@ -222,7 +222,7 @@ protected ReporterDetails validateCSIP86(final MetsValidatorState metsValidatorS
if (structMap != null) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final String label = div.getLABEL();
if (label == null) {
return new ReporterDetails(Constants.VALIDATION_REPORT_HEADER_CSIP_VERSION,
Expand Down Expand Up @@ -284,7 +284,7 @@ protected ReporterDetails validateCSIP88(final MetsValidatorState metsValidatorS
final List<DivType> divs = struct.getDiv().getDiv();
int counter = 0;
for (DivType d : divs) {
if (d.getLABEL().equals("Metadata")) {
if (d.getLABEL() != null && d.getLABEL().equals("Metadata")) {
Comment thread
luis100 marked this conversation as resolved.
counter++;
}
}
Expand Down Expand Up @@ -1206,10 +1206,10 @@ protected ReporterDetails validateCSIP105(final MetsValidatorState metsValidator
if (metsValidatorState.isRootMets()) {
for (StructMapType struct : structMap) {
final DivType firstDiv = struct.getDiv();
if (firstDiv != null && struct.getLABEL().equals("CSIP")) {
if (firstDiv != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = firstDiv.getDiv();
for (DivType div : divs) {
if (div.getLABEL().matches("Representations/.*/") && div.getMptr().isEmpty()) {
if (div.getLABEL() != null && div.getLABEL().matches("Representations/.*/") && div.getMptr().isEmpty()) {
return new ReporterDetails(Constants.VALIDATION_REPORT_HEADER_CSIP_VERSION,
Message.createErrorMessage(
"When a package consists of multiple representations, "
Expand Down Expand Up @@ -1275,7 +1275,7 @@ protected ReporterDetails validateCSIP107(final StructureValidatorState structur
if (structMap != null) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = div.getDiv();
for (DivType d : divs) {
final String label = d.getLABEL();
Expand Down Expand Up @@ -1352,7 +1352,7 @@ protected ReporterDetails validateCSIP108(final MetsValidatorState metsValidator
if (structMap != null) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = div.getDiv();
for (DivType d : divs) {
if (d.getLABEL() != null && d.getLABEL().matches("Representations/.*")) {
Expand Down Expand Up @@ -1404,7 +1404,7 @@ protected ReporterDetails validateCSIP109(final MetsValidatorState metsValidator
if (structMap != null) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = div.getDiv();
for (DivType d : divs) {
if (d.getLABEL() != null && d.getLABEL().matches("Representations/.*")) {
Expand Down Expand Up @@ -1437,10 +1437,10 @@ protected ReporterDetails validateCSIP110(final StructureValidatorState structur
if (structMap != null) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = div.getDiv();
for (DivType d : divs) {
if (d.getLABEL().matches("Representations/.*")) {
if (d.getLABEL() != null && d.getLABEL().matches("Representations/.*")) {
final List<DivType.Mptr> mptrs = d.getMptr();
if (!mptrs.isEmpty()) {
for (DivType.Mptr mptr : mptrs) {
Expand Down Expand Up @@ -1526,7 +1526,7 @@ protected ReporterDetails validateCSIP111(final StructureValidatorState structur
if (!structMap.isEmpty()) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = div.getDiv();
for (DivType d : divs) {
if (d.getLABEL() != null && d.getLABEL().matches("Representations/")) {
Expand Down Expand Up @@ -1567,7 +1567,7 @@ protected ReporterDetails validateCSIP112(final MetsValidatorState metsValidator
if (structMap != null) {
for (StructMapType struct : structMap) {
final DivType div = struct.getDiv();
if (div != null && struct.getLABEL().equals("CSIP")) {
if (div != null && struct.getLABEL() != null && struct.getLABEL().equals("CSIP")) {
final List<DivType> divs = div.getDiv();
for (DivType d : divs) {
if (d.getLABEL() != null && d.getLABEL().matches("Representations/")) {
Expand Down
Loading