Fork me on GitHub

Demonstration

Resource http://ci.emse.fr/rdfp/example demonstrates RDF Presentation Negotiation, and the use of the rdfp-jersey-server implementation.

The resource exposes and consumes RDF Graphs that are described by https://w3id.org/rdfp/example/graph (negotiate its representation with the server, or directly access the turtle, or a RDF/XML document).

This graph description explicitly mentions two presentations (in addition to the well known turtle and RDF/XML presentations:

  • one for media type application/xml;
  • one for media type application/json.

Also, two other RDF Presentations can be played with:

  • another for media type application/xml;
  • one for media type text/plain.

Testing POST operation

In order to test the POST operation, examples of inputs can be found at URL https://w3id.org/rdfp/example/input. Negotiate its representation with the server, or directly access:

Examples of the requests you can test include:

_note: POST at https://w3id.org/rdfp/example does not work, use http://ci.emse.fr/rdfp/example_

POST /rdfp/example (--> POST http://ci.emse.fr/rdfp/example)
Content-Type: text/turtle

-- the content of https://w3id.org/rdfp/example/input.ttl in the body -- 


POST /rdfp/example (--> POST http://ci.emse.fr/rdfp/example)
Content-Type: application/xml

-- the content of https://w3id.org/rdfp/example/input.xml in the body -- 


POST /rdfp/example 
Content-Type: application/json

-- the content of https://w3id.org/rdfp/example/input.json in the body -- 


POST /rdfp/example 
Content-Type: text/plain
Content-Presentation: https://w3id.org/rdfp/presentation3

-- the content of https://w3id.org/rdfp/example/input.txt in the body -- 

Examples of requests that trigger errors include:

POST /rdfp/example 
Content-Type: foo/bar

-- any content in the body  -- 


POST/rdfp/example 
Accept: text/plain
Accept-Presentation: https://w3id.org/rdfp/presentation2

-- any content in the body -- 

Testing GET operation

Examples of the requests you can test include:

note: both GET https://w3id.org/rdfp/example and get http://ci.emse.fr/rdfp/example will work

GET /rdfp/example
Accept: text/turtle

GET /rdfp/example
Accept: application/rdf+xml

GET /rdfp/example
Accept: application/json

GET /rdfp/example
Accept: application/xml

GET /rdfp/example
Accept: application/xml
Accept-Presentation: https://w3id.org/rdfp/presentation2

Examples of requests that trigger errors include:

GET /rdfp/example
Accept: foo/bar

GET /rdfp/example
Accept: text/plain
Accept-Presentation: https://w3id.org/rdfp/presentation2

GET /rdfp/example
Accept: text/plain
Accept-Presentation: https://w3id.org/rdfp/presentation3