```{index} Linked Data; Platform ``` # Linked Data Platform ```{index} Containers ``` ## Containers https://www.w3.org/TR/ldp/#ldpc We extend the notion of LDP containers! Terms: - Containment Triples - Membership Triples Types: - Direct Containers ```turtle @prefix dcterms: . @prefix ldp: . a ldp:BasicContainer; dcterms:title "A very simple container"; ldp:contains , , . ``` - Indirect Containers - a way of interacting with existing data Given: ```turtle @prefix ldp: . @prefix o: . a o:NetWorth; o:netWorthOf ; o:asset , ; o:liability , , . ``` we can make direct containers that describe the assets and liabilities as containers without modifying the original data ```turtle @prefix ldp: . @prefix dcterms: . @prefix o: . a ldp:DirectContainer; dcterms:title "The assets of JohnZSmith"; ldp:membershipResource ; ldp:hasMemberRelation o:asset; ldp:contains , . ``` Additionally, if one were to add a new set of "advisors," we would make an indirect container that tells us we need an additional triple when creating new members of the container (`foaf:primaryTopic`): ```turtle a ldp:IndirectContainer; dcterms:title "The asset advisors of JohnZSmith"; ldp:membershipResource <>; ldp:hasMemberRelation o:advisor; ldp:insertedContentRelation foaf:primaryTopic; ldp:contains , # URI of a document a.k.a. an information resource . # describing a person ``` (still unclear to me what is different about that, still reading.) | Completed Request | Membership Effect | Containment Effect | | ----------------- | ------------------- | ------------------ | | Create in Basic Container | New triple: (LDPC, ldp:contains, LDPR) | Same | Create in Direct Container | New triple links LDP-RS to created LDPR. LDP-RS URI may be same as LDP-DC | New triple: (LDPC, ldp:contains, LDPR) | | Create in Indirect Container | New triple links LDP-RS to content indicated URI | New triple: (LDPC, ldp:contains, LDPR) | | Resource deleted | Membership triple may be removed | (LDPC, ldp:contains, LDPR) triple is removed | | Container deleted | Triples and member resources may be removed | Triples of form (LDPC, ldp:contains, LDPR) and contained LDPRs may be removed | ## Similarities - Separation between container data and metadata - "minimal-container triples," what remains in the container when the container has zero members and zero contained resources ## Differences - Containers are not recursive??or at least that is suggested by the 'net worth' example that explains why we can't just turn the original subject into a container: "can't mix assets and liabilities" and i am like why not make one container for the person and then subcontainers for each of the types? ## References - Spec: https://www.w3.org/TR/ldp/ - Use cases and requirements: https://www.w3.org/TR/ldp-ucr/ - eg. using virtuoso. https://github.com/vemonet/virtuoso-ldp