Skip to content

Clarification of DatasetGraph contract #1308

Answered by afs
cygri asked this question in Q&A
Discussion options

You must be logged in to vote
  • Can getDefaultGraph() return null? Can it throw UnsupportedOperationException?

There is always a default graph. This is defined in SPARQL - a dataset is a default graph and zero or more named graphs.

  • Can getUnionGraph() return null? Can it throw UnsupportedOperationException?

There is a general purpose (and possibly inefficient) implement provided in DatasetGraphBase.

It is better to provide something (tests pass) but sometimes it might be meaning less and UnsupportedOperationException - with javadoc to explain why - would be appropriate.

  • Many (all?) of the provided implementations of DatasetGraph support the special graph names urn:x-arq:DefaultGraph, urn:x-arq:DefaultGraphNode,…

Replies: 1 comment 1 reply

Comment options

afs
Jul 7, 2022
Collaborator

You must be logged in to vote
1 reply
@afs
Comment options

afs Jul 27, 2022
Collaborator

Answer selected by afs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants