This project has retired. For details please refer to its Attic page.
Apache Marmotta - Platform - LDP

Apache Marmotta Platform: LDP

Since 3.2.0 Marmotta provides experimental support for the current working draft of the Linked Data Platform 1.0 specification.

For the 3.3.0 version, the LDP implementation has been updated to the last call working draft and a official compliance report is available at the W3C.

The ASF actively participates in the W3C Working Group helping to define the standard, and also providing an early implementation.

Implementation Restrictions

The current LDP support should be compliant with the current working draft, but not yet complete. For now there are a few implementation restrictions, which will be addressed in future releases:

  • Currently, Marmotta only supports LDP-BC as containers, LDP-DC and LDP-IC will be discussed for further development. LDP-NRs are fully supported.
  • LDP allows a server to ignore server-managed properties of a LDP-RS. Currently (3.3.0 and on), the following properties are considered as server-managed. This list may be extended in future versions:
    • ldp:contains
  • All resources created using a Content-Type that is not recognized as RDF Format are treated as LDP-NR. The list of supported RDF Formats is provided in the Accept-Post header.

WARNING: Changing LDPRs through other channels than the LDP Server (e.g. SPARQL UPDATE) may cause an inconsistent and corrupt resource state. In its current implementation, LDP is designed as exclusive (write-)access method for LDPRs and LDPCs.

Usage

Temporally available under /ldp namespace, until we clarify how the current raw Linked Data resource management would live together with LDP, here some examples how to use it:

Add a source resource to a container

The LDP root container (located at /ldp) is created automatically. You can add new resources using the following command:

curl -i -X POST -d @test.ttl -H "Content-Type: text/turtle" -H "Slug: test" http://localhost:8080/ldp/container1
curl -i -H "Accept: text/turtle" http://localhost:8080/ldp/container1/test

where test.ttl contains the LDP-RS you want to add to the /container1 container.

By default, all created LDP-RSs are created using the LDPC interaction model, which means that they also act as LDPC. If you want to create a resource using the LDPR interaction model you need to explicitly say so in the POST request:

curl -i -X POST -d @test.ttl -H "Content-Type: text/turtle" -H "Slug: resource" \
    -H 'Link: <http://www.w3.org/ns/ldp#Resource>; rel="type"' \
    http://localhost:8080/ldp/container1
curl -i -H "Accept: text/turtle" http://localhost:8080/ldp/container1/resource

Resources created with the LDPR interaction model cannot be used as container and therefore do not accept POST requests.

Add a binary resource to a container

curl -i -X POST --data-binary @test.png -H "Content-Type: image/png" -H "Slug: test" http://localhost:8080/ldp/container2
curl -i http://localhost:8080/ldp/container2/test
curl -i -H "Accept: text/turtle" http://localhost:8080/ldp/container2/test.png
curl -i -H "Accept: image/png" http://localhost:8080/ldp/container2/test.png

where test.png is the LDP-NR you want to add to the /container2 container.

LDP-NRs are always created using the LDPR interaction model.