CarbonLDP / carbonldp

CarbonLDP's general wiki and issue tracking project
8 stars 1 forks source link

Add an LDP-RS to two different containers ? #11

Closed noorbakerally closed 5 years ago

noorbakerally commented 7 years ago

Suppose an LDP-RS r1 is created in container A with http://example.com/A/r1. Is it possible to add r1 to a different container say Container B with posting r1 to B. In short, is it possible to add r1 to the containment triples in B so that the content of B has the triple <ContainerBIRI> ldp:contains <http://example.com/A/r1> ?

MiguelAraCo commented 7 years ago

Carbon LDP uses ldp:contains to indicate a direct containment relation. In other words, a parent/child relation. So only the parent container will be able to have an ldp:contains triple to one of its children. You can see that relation as a hard or hierarchical link between the tree of documents you create.

That is why the ldp:member (or whatever membership predicate you configure with ldp:hasMemberRelation) exists. Unlike ldp:contains, the membership triple represents a soft non hierarchical link, and therefore, multiple containers can have membership triples to the same document.

I would advise you to (almost always) use the membership relation instead of the containment relation (unless you want to follow the structure of the tree).

The membership relation gets added every time you create an ldp:RDFSource on a container and you can add that ldp:RDFSource as a member of another container in two ways:

MiguelAraCo commented 5 years ago

Closing due to inactivity.