Proposed Dataset
API changes
#2591
Replies: 4 comments
-
It also looks like a simple |
Beta Was this translation helpful? Give feedback.
-
I support all of the proposals in this discussion. This has been a long-time coming - we've noticed these things for years - but have never done anything about these and they still hurt u - @edmondchuc is battling with datasets in a current project. I suggest we also remove the |
Beta Was this translation helpful? Give feedback.
-
I don't think |
Beta Was this translation helpful? Give feedback.
-
The
Dataset
is quite weird and assumes that standaloneGraph
s have identifiers, which will be phased out (#2537). For example, adding a named graph to aDataset
looks like this:Moreover,
Dataset
uses the termcontext
when referring to named graphs. I think it should be phased out as well.If in doubt, I suggest just copying Jena's
Dataset
API.My suggestions for
Dataset
:add_named_graph(uri: IdentifiedNode, graph: Graph)
methodhas_named_graph(uri: IdentifiedNode)
methodremove_named_graph(uri: IdentifiedNode)
methodreplace_named_graph(uri: IdentifiedNode, graph: Graph))
methodgraphs()
method as an alias forcontexts()
default_graph
property as an alias fordefault_context
get_named_graph
as an alias forget_graph
graph(graph)
methodremove_graph(graph)
methodcontexts()
methodUsing
IdentifiedNode
as a super-interface forURIRef
andBNode
(since both are allowed as graph names in RDF 1.1).The above example would become something like this after these changes:
Beta Was this translation helpful? Give feedback.
All reactions