Skip to content
jocelyn edited this page Jul 3, 2012 · 18 revisions

IN PROGRESS

Evaluate Media Types

  • start with Collection/JSON
  • See later if we want to use HAL in addition or replacement
  • note: both "standards" are evolving, so we are likely to update the lib for time to time.

Create/Choose Media Types

  • Collection/JSON

Graph Data Model

  • content: graphviz’s code
  • id: UUID, shortname, integer ..
  • title: user friendly title
  • description: description of the graph
  • (image: generated graph from the graphviz’s code)

Collection/JSON representation

Home page
{
	"collection" : {
	"href" : "www.graphserver.org",
	"version" : "1.0",
	"links" : [
		{"rel" : "profile", "href" : "www.graphserver.org/graph", "prompt" : "Profile"},
		{"rel" : "queries", "href" : "www.graphserver.org/queries", "prompt" : "Queries"},
		{"rel" : "template", "href" : “www.graphserver.org/template", "prompt" : "Template"}
		]
	}
}


Retrieve an item
{
	"collection" : {
	"href" : "www.graphserver.org",
	"version" : "1.0",
	"links" : [
		{"rel" : "queries", "href" : "www.graphserver.org/queries", "prompt" : "Queries"},
		{"rel" : "template", "href" : www.graphserver.org/template", "prompt" : "Template"}
		],
	"items" :[
		{	"href" : ".../",
			"data" :[
				{"name" : "title", "value" : "Web", "prompt" :"Title"},
				{"name" : "content", "value" : "digraph Web{ CLIENT -> SERVER
								   SERVER -> CLIENT
								}", "prompt" : "Graphviz Code"},
				{"name" : "id", "value" : "1", "prompt" : "Id"},
				{"name" : "description", "value" : "My first graphviz example", "prompt" : "Description"}
				],
				"links" : [
					{"rel" : "png", "href" : ".../images/1.png", "prompt" : "PNG", "render" : "image"}
					{"rel" : "jpg", "href" : ".../images/1.jpg", "prompt" : "JPG", "render" : "image"}
				]	
			}
		]
	}
}
Clone this wiki locally