Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSIP88 validation fails despite correctly labeled metadata div #165

Closed
prettybits opened this issue Jun 26, 2023 · 2 comments
Closed

CSIP88 validation fails despite correctly labeled metadata div #165

prettybits opened this issue Jun 26, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@prettybits
Copy link

With descriptive metadata being present and referenced, and a mets/structMap[@LABEL='CSIP']/div/div[@LABEL='Metadata'] present like required by CSIP88 validation fails with

{
    "specification" : "CSIP-2.0.4",
    "id" : "CSIP88",
    "name" : "Metadata division",
    "location" : "mets/structMap[@LABEL='CSIP']/div/div[@LABEL='Metadata']",
    "description" : "The metadata referenced in the administrative and/or descriptive metadata section is described in the structural map with one sub division.When the transfer consists of only administrative and/or descriptive metadata this is the only sub division that occurs.",
    "cardinality" : "1..1",
    "level" : "MUST",
    "testing" : {
      "outcome" : "FAILED",
      "issues" : [ "You have metadata files, must add mets/structMap[@LABEL='CSIP']/div/div[@LABEL='Metadata'] in Root METS.xml" ],
      "warnings" : [ ],
      "notes" : [ ]
    }
}

I see there was a related issue #54 which changed the related logic to fail when the div with the required label is found?

@carlosjepard
Copy link
Contributor

Hello! I tested this verification with the file you provided on issue #162, which has a struct map that fits the parameters of this verification... However, this verification passes. Can you provide me with a Sip file that fails this verification?

@prettybits
Copy link
Author

Hi @carlosjepard ,
you're right, sorry, I was testing this with a local version that still had adjustments to fix another preceding issue and missed that I wasn't testing an unmodified version. Although now with the file I provided that you also tested with I actually get a null pointer exception during CSIP86 validation of the package METS:

Exception in thread "main" java.lang.NullPointerException
        at org.roda_project.commons_ip2.validator.component.structuralMapComponent.StructuralMapComponentValidator.validateCSIP86(StructuralMapComponentValidator.java:615)
        at org.roda_project.commons_ip2.validator.component.structuralMapComponent.StructuralMapComponentValidator.validate(StructuralMapComponentValidator.java:92)
        at org.roda_project.commons_ip2.validator.EARKSIPValidator.validateComponents(EARKSIPValidator.java:183)
        at org.roda_project.commons_ip2.validator.EARKSIPValidator.validateRootMets(EARKSIPValidator.java:275)
        at org.roda_project.commons_ip2.validator.EARKSIPValidator.validate(EARKSIPValidator.java:159)
        at org.roda_project.commons_ip2.validator.CLI.CLIValidator.validate(CLIValidator.java:213)
        at org.roda_project.commons_ip2.validator.CLI.CLIValidator.start(CLIValidator.java:157)
        at org.roda_project.commons_ip2.validator.CLI.Main.main(Main.java:30)

which is what I had quickly adjusted during my testing, e.g. for this case here, which checks for div.getLABEL().equals("CSIP") (as is done in a few other places in that file). My SIPs generally don't have a label on the first division as that requirement has been deprecated with version 2.1.0 of the specification. As mentioned in #166 this actually seems expected? Is it intended to officially support the newest version of the spec at some point?

I created a new SIP that should show the CSIP88 issue here, although there I had to adjust the labels on the first div to "CSIP" to fit the checks actually being done, even though the deprecated rule wants the same value as the mets/@OBJID, leading to CSIP86 also failing.

Besides all that, I'm wondering why you don't seem to have run into the same exception during your testing, strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants