TREEcg / specification

RDF vocabulary and hypermedia specification to publish your Linked Data using search trees
https://w3id.org/tree/specification
27 stars 12 forks source link

Triple mode vs member mode and empty tree:Collections #66

Closed pietercolpaert closed 1 year ago

pietercolpaert commented 2 years ago

Problem

Right now we have a difficult fallback mechanism in place to fall-back to inferring all triples (rdf:Statements) on the page are a member of the tree:Collection, if no tree:member predicates could be found. However, if a current node only contains relations, a client will wrongly assume the triples are the members of the collection.

This also means today it’s impossible to have empty tree:Collections.

Possible solutions

1. Indicating something is a triple collection

This proposal would entail creating a rdfs:subClassOf tree:Collection indicating it’s a tree:TripleCollection with implicit containment.

Problem: would break compatibility to the TPF spec and everything that was set up so far that doesn’t contain this indication that the tree:members should be inferred as all triples on the current page

2. Indicating a tree:Node without elements is a Node without members

This would entail creating a rdfs:subClassOf tree:Node in case we are dealing with a page that doesn’t have tree:members, but actually the collection is a collection of members and not individual rdf:Statements.

This would simplify the algorithm a lot and would keep backwards compatibility to the TPF spec.

Proposal

Knowing whether the triples themself or certain entities are the members:

julianrojas87 commented 2 years ago

Not sure I understand Solution 1. As far as I can see it does not give a solution to empty nodes?

Solution 2 makes sense, which I see is in line with the proposal. One question would be how does the client know which are metadata triples (TPF)? Does this mean it has to compare every triple to a set of predefined TPF metadata triple patterns?

pietercolpaert commented 1 year ago

Not sure I understand Solution 1. As far as I can see it does not give a solution to empty nodes?

Empty nodes in solution 1 would actually work, as if you don’t have a tree:TriplesCollection but just a regular tree:Collection, it will be clear that if no tree:member links are in that page, that page doesn’t contain any members.

I also was wrong about the fact that it would break backwards compatibility with TPF. TPF doesn’t explicitly type their dataset as a tree:Collection. We can thus state that a tree:Collection works member-based, but if it’s not typed as a tree:Collection, that the default behaviour becomes that it is a tree:TriplesCollection.

I hereby change my preference from 2 to 1 ;-)

pietercolpaert commented 1 year ago

Closing in favor of #71