You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commonsrdf.apache.org by stain <gi...@git.apache.org> on 2016/06/02 11:25:13 UTC

[GitHub] incubator-commonsrdf issue #19: Add Quad and Dataset

Github user stain commented on the issue:

    https://github.com/apache/incubator-commonsrdf/pull/19
  
    Moving forward with quads! I have taken a stance.
    
    Rather than `TripleOrQuad` I propose a similar interface, called [TripleLike](http://stain.github.io/incubator-commonsrdf/quad/org/apache/commons/rdf/api/TripleLike.html). This can also support generalized RDF statements with any `RDFTerm` subtype for `getSubject()`, `getPredicate()` and `getObject()`. This can be useful both for parsers and for SPARQL compatibility.
    
    Then naturally we also have its extension [QuadLike](http://stain.github.io/incubator-commonsrdf/quad/org/apache/commons/rdf/api/QuadLike.html) which adds a generalized `getGraphName`.
    
    Instead of `DatasetOrGraph` I propose a generalized [GraphLike](http://stain.github.io/incubator-commonsrdf/quad/org/apache/commons/rdf/api/GraphLike.html) that contains `TripleLike` statements. `GraphLike` do not have the split-up methods for subject/predicate/object - thus `Quad` does not need to support the ambiguous `contains(s,p,o)`.
    
    As `Graph` and `Dataset` previously differed in returning the stream by `getTriples()` and `getQuads()`  and this crucial method therefore could not be in the common interface, I've gone brave here and renamed both to [.stream()](http://stain.github.io/incubator-commonsrdf/quad/org/apache/commons/rdf/api/Graph.html#stream--).
    
    What do you think? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---