Require spec-mandatory relation endpoints, dedupe serializer namespace bootstrap, and drop ProvNamespace::contains()#19
Merged
Conversation
…e bootstrap, and drop ProvNamespace::contains()
06abca1 to
0407b46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
resolveRequiredIdentifier()):wasGeneratedBy/wasInvalidatedByentity;used/wasStartedBy/wasEndedBy/wasAssociatedWithactivity;wasInformedByboth activities;wasDerivedFrom(andwasRevisionOf/wasQuotedFrom/hadPrimarySource) both entities;wasAttributedToentity+agent;actedOnBehalfOfboth agents;wasInfluencedByboth;specializationOf/alternateOfboth;hadMembercollection+entity;mentionOfspecific+general+bundle; the dictionary relations' ref params. A builder call can no longer emit a-marker in a grammar-mandatory slot.DeserializationException, only for endpoints no real document omits:Generation/Invalidationentity,Specialization/Alternate/Mentionentity pairs, and the dictionary refs. The rest stay nullable and lenient on the read path so theopenprov/testcasescorpus (whose reference implementation emits-in some mandatory slots, e.g.wasAttributedToagent andmentionOfbundle) still round-trips.mentionOffrom PROV-LINKS and the dictionary relations from PROV-DICTIONARY.identifierloses its constructor default on the affected relations (a required parameter cannot follow an optional one); it stays nullable-typed but is no longer positionally omittable.NamespaceManager::forContainer()andstripDefaultSentinel()replace the namespace-bootstrap loop duplicated across the serializers, deserializers, andProvGraph, and the three copies of the default-sentinel strip.ProvNamespace::contains()(no callers;NamespaceManagerowns URI matching).RecordBuilder::getNamespaceManager()so a caller assembling attributes can share the builder's live registry.