This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Fred": "test", | |
"soup": { | |
"x": { | |
"soup": "1234" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET http://example.com/resource.html HTTP/1.1 | |
Accept: text/html | |
HTTP/1.1 200 OK | |
Content-type: text/html | |
Link: <http://example.com/resource-provenance>; | |
rel="http://www.w3.org/ns/prov#has_provenance"; | |
anchor="http://example.com/resource" | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stain@ralph-ubuntu:~/src$ git clone https://github.com/stain/paq.git | |
Cloning into 'paq'... | |
remote: Counting objects: 127, done. | |
remote: Compressing objects: 100% (55/55), done. | |
remote: Total 127 (delta 26), reused 125 (delta 24) | |
Receiving objects: 100% (127/127), 35.72 KiB, done. | |
Resolving deltas: 100% (26/26), done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stain@ralph-ubuntu:~/src/paq$ mvn clean jetty:run | |
[INFO] Scanning for projects... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Example PROV-AQ usage 0.1-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
(..) | |
INFO: Root WebApplicationContext: initialization completed in 2462 ms | |
2013-03-27 16:22:04.566:INFO::Started SelectChannelConnector@0.0.0.0:8080 | |
[INFO] Started Jetty Server | |
[INFO] Starting scanner at interval of 10 seconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stain@ralph-ubuntu:~/src/paq$ curl http://localhost:8080/paq/hello/Alice | |
Hello, Alice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stain@ralph-ubuntu:~/src/paq$ curl http://localhost:8080/paq/hello/Joe%20Bloggs | |
Hello, Joe Bloggs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stain@ralph-ubuntu:~/src/paq$ curl -i http://localhost:8080/paq/provenance/hello/Alice | |
HTTP/1.1 200 OK | |
Content-Type: text/provenance-notation | |
Date: Wed, 27 Mar 2013 16:27:14 GMT | |
Content-Length: 305 | |
Server: Jetty(6.1.26) | |
document | |
prefix hello <http://localhost:8080/paq/hello/> | |
prefix app <http://localhost:8080/paq/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GET | |
@Path("hello/{name}") | |
@Produces("text/plain") | |
public String hello(@PathParam("name") String name) { | |
String greeting = "Hello, " + name + "\n"; | |
return greeting; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Link: <http://localhost:8080/paq/provenance/hello/Alice>; | |
rel="http://www.w3.org/ns/prov#has_provenance" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GET | |
@Path("hello/{name}") | |
@Produces("text/plain") | |
public Response hello(@PathParam("name") String name) { | |
String greeting = "Hello, " + name + "\n"; | |
ResponseBuilder responseBuilder = Response.ok().entity(greeting); | |
return responseBuilder.build(); | |
} |