Repository navigation
feat(writer): encode a typed container index and linksets as RDF/XML (0.2.2) - #9
Merged
Merged
Conversation
A consumer that writes a container with its own documents and links had to assemble the ct: and ls: triples itself, duplicating the vocabulary this crate owns, while federation.rs built its Index.rdf privately. Add ContainerIndex::to_rdf_xml, LinkSet::to_rdf_xml, IcddArchiveBuilder::from_index and add_typed_linkset. They encode through vocab and serialize_rdf_xml, so output is deterministic, and they round-trip through parse_index and parse_linkset. Input the readers could not represent faithfully, or that breaks the Linkset cardinalities, returns NotConformant. from_index keeps the typed index and base, so add_typed_linkset validates a linkset against the index that was written; conformance_issues now reports link elements that name a document missing from the index. Derive PartialEq and Eq on the schema types so values can be compared. The Poing federation writer now builds its index through the same encoder. Closes #8
Adds public API only (typed RDF/XML writing, PartialEq and Eq derives), so a patch bump: 0.2.2. The alias pin follows. The alias-purity mutation test hardcoded 0.2.1; it now reads the manifest version so releases do not break it.
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.
Closes #8. Needed by openbimrs/solibri#83.
Added
ContainerIndex::to_rdf_xml(base_iri)andLinkSet::to_rdf_xml(index, base_iri): deterministic RDF/XML using the ISO 21597-1ct:/ls:classes from the issue.IcddArchiveBuilder::from_index(index, base_iri)andadd_typed_linkset(linkset).Index.rdf.PartialEq/Eqon the schema types.Changed
conformance_issues()now also reports a linkset document that is not in the index.Index.rdfis built by the encoder. Its bytes change:ct:urlis typedxsd:anyURIand the prefix declarations differ.Rejected input
NotConformantfor:ct:creationDate;Tests
parse(to_rdf_xml(x)) == x), hand-built and seeded-generated.Gate:
./scripts/gate.shpasses.