[ 
https://issues.apache.org/jira/browse/JENA-2169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17419342#comment-17419342
 ] 

Andy Seaborne commented on JENA-2169:
-------------------------------------

It is supported, just not in Dataset interface. DatasetGraph is happy with them.

I think adding {{getNamedModel(Resource)}} os better because "labelled" isn't  
term in the standards (and Java is a statically typed language :-)).

That just leaves the iterator {{public Iterator<Resource> listGraphNames()}} 
would work.

If you'd like to do a PR that would be great - it would be easier to hold off 
until [PR 1030|https://github.com/apache/jena/pull/1030] is merged because that 
touches a lot of files. We're just waiting to make sure 4.2.0 does have an 
serious bugs.

 There are only 2 implementations of Dataset (and DatasetOne can be marked 
deprecated and for removal because DatasetGraphOne exists).

> Dataset interface should support blank node labels for graphs
> -------------------------------------------------------------
>
>                 Key: JENA-2169
>                 URL: https://issues.apache.org/jira/browse/JENA-2169
>             Project: Apache Jena
>          Issue Type: Improvement
>            Reporter: Jan Martin Keil
>            Priority: Major
>
> The Recommendations [RDF 1.1 
> TriG|https://www.w3.org/TR/trig/#sec-graph-statements] and [RDF 1.1 
> N-Quads|https://www.w3.org/TR/n-quads/#simple-triples] permit blank nodes as 
> graph labels in datasets. However, this is not supported in Apache Jena. To 
> add support for blank node labels, the interface 
> {color:#0747a6}{{org.apache.jena.query.Dataset}}{color} and it's implementing 
> classes would need new methods corresponding to the following methods:
>  * {color:#0747a6}{{public Model getNamedModel(String uri)}}{color} -> e.g. 
> {color:#0747a6}{{public Model getLabeledModel(Resource label)}}{color}
>  * {color:#0747a6}{{public Dataset addNamedModel(String uri, Model 
> model);}}{color} -> e.g. {color:#0747a6}{{public Dataset 
> addLabeledModel(Resource label, Model model);}}{color}
>  * {color:#0747a6}{{public Dataset removeNamedModel(String uri);}}{color} -> 
> e.g. {color:#0747a6}{{public Dataset removeLabeledModel(Resource 
> label);}}{color}
>  * {color:#0747a6}{{public Dataset replaceNamedModel(String uri, Model 
> model);}}{color} -> e.g. {color:#0747a6}{{public Dataset 
> replaceLabeledModel(Resource label, Model model);}}{color}
>  * {color:#0747a6}{{public Iterator<String> listNames()}}{color} -> e.g. 
> {color:#0747a6}{{public Iterator<Resource> listGraphLabels()}}{color}
> This has real *use cases*: If labeled graphs are used to track the provenance 
> of statements, as e.g. proposed in the Working Group Note [Data on the Web 
> Best Practices: Data Quality Vocabulary|https://www.w3.org/TR/vocab-dqv/], 
> minting an URL is not always appropriate. The current *workaround* is to mint 
> a IRI, e.g. based on an UUID.
>  However, there might also be *drawbacks*: The [SPARQL 1.1 
> Recomendation|https://www.w3.org/TR/sparql11-query/#rGraphRef] permits only 
> IRIs as graph labels. Graphs with blank node labels might become inaccessible 
> within SPARQL. But that is probably (didn't test it yet) the same situation 
> as after importing TriG or N-Quads files with blank node graph labels. (A 
> shortcoming of SPARQL 1.1 worth to put on [https://github.com/w3c/sparql-12]?)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to