Closed ericprud closed 4 years ago
I'm sorry that this is taking some time. I'm trying to get some PRs reviewed so we can release a new version of rdflib, including this.
I was wondering if we might want to write a test to cover this?
I was wondering if we might want to write a test to cover this?
In principle, yes, but the tests have probably changed since I last forgot how they work. Also, RDFJS has replaced my memory of the rdflib.js interface.
I'd expect that something a simple as:
const Namespace = require('./namespace')
const Ns = {
ex: Namespace('http://a.example/ns#'),
}
kb.add(ns.ex('s'), ns.ext('p'), kb.collection(), ???)
would do the job.
This seems like a plan. Maybe we should look in future at more sophisticated ways of checking for statements with nested complex types. (which for nested graphs would involve graph hashing).. this looks good to me now
When re-building and trying out rdflib, I couldn't fetch data.
The last line of
fetcher.saveRequestMetadata
(fetcher.ts:1647) adds a collection:IndexedForumula.add
(store.tx:453) de-duplicates with:IndexedForumula.statementsMatching
canonicalizes to search in index:CanonicalDataFactory.termToNQ
(canonical-data-factor.ts:192) throwsThis PR adds a case for Collection:
It's less efficient than de-duping with a more formal recursive hash function, which will hurt when serializing large lists, but that's an architecture issue.
(.gitignore includes
dist/rdflib.min.js
so I assume was wasn't supposed to include a build in the PR.)