-
Notifications
You must be signed in to change notification settings - Fork 44
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
ProvRecord validate method to assert required attributes #62
Comments
This could be implemented easily using the JSON Schema document defined in the spec: http://www.w3.org/Submission/2013/SUBM-prov-json-20130424/#validation |
I guess this would also be easy to implement programmatically and then it can work on the internal graph structure. Why is this closed? |
I closed it because it is simple enough to do outside of this library, however if it's built-in that would be great as well. Reopened for discussion. |
I think this validation should be optional. It was desired to support both well-formed provenance and scruffy provenance in the W3C Provenance working group (this is an example or these). A practical example would be:
The record in b1 and b2 might not be valid, but when merged will be. I'm inclined to have the prov package more accommodating than restrictive, unless it breaks some fundamental requirements. Having said that, I think a function that validates a record or a bundle can be useful in some cases. |
Validation definitely needs to be optional to support your example. The idea is to simply have a |
I realized I still didn't answer your question. The spec defines which attributes are required and optional. For example, a generation event needs to reference the entity that was generated. However the time is not required. If you have a generation record, it would check whether it defines an entity and if it is available in the same scope (bundle of document). |
Using the PROV-JSON schema, the structure can be validated, i.e. whether the attributes are satisfied with the correct types, however there needs to be a second step of ensuring the references are valid (the entity |
Most of the PROV concepts have at least one attribute required for it to be considered valid. Is there any desire to integrate a method like this?
The text was updated successfully, but these errors were encountered: