keeps/commons-ip

Questions about validating an E-ARK SIP

spacid opened this issue · 1 comments

Hi,

I was looking into using the library to validate E-ARK SIPs. At first glance, the org.roda_project.commons_ip2.validator.EARKSIPValidator seems like a logical choice. However, parsing a SIP also provides a org.roda_project.commons_ip2.model.ValidationReport. It seems that the report spawned by the validator provides more information than when the parsing the SIP.

A Couple of questions:

  • How are these related to each other? Is the EARKSIPValidator used to create a ValidationReport when parsing a SIP? By extension, why do both exist?
  • Does parsing a SIP provides the same level of validation than via the dedicated validator class?
  • The ValidationReport only seems to have a String and HTML representation which isn't that practical. What is the use case here?

In general, taking into account that I probably also want access to the validation entries as well as an easy-enough parsable report, what would be the most advised way to validate a SIP?

Hi,

How are these related to each other? Is the EARKSIPValidator used to create a ValidationReport when parsing a SIP? By extension, why do both exist?

The ValidationReport stores validation errors when the SIP is being transformed into an AIP. This parse does not perform a full validation against the specification. The EARKSIPValidator produces its own report.

Does parsing a SIP provides the same level of validation than via the dedicated validator class?

No, it performs basic validations.

The ValidationReport only seems to have a String and HTML representation which isn't that practical. What is the use case here?

The ValidationReport stores validation errors when the SIP is being transformed into an AIP, it is used in RODA when transforming the SIP into an AIP.

In general, taking into account that I probably also want access to the validation entries as well as an easy-enough parsable report, what would be the most advised way to validate a SIP?

You should use the org.roda_project.commons_ip2.validator.EARKSIPValidator since it will perform the validation against the CSIP specification.