Can you provide some context?

I'm looking for some help to create context for my objects and links.  I gave this a shot myself on the json-ld playground, but haven't got far.  Maybe this is child's play for an experienced "json-ld'er"?  Or if you'd like some bounty (small... this is just an experiment) to help out, get in touch.

I have a data model with 3 object types: Tree, Branch, and Leaf.  A tree has one "root" branch.  Each branch can have a set of child branches and a set of leaves.  A leaf just has some attributes.

I can query the data model through a REST interface as below.  

http://biohost1:3777/v1/growths9/tree/{tree_name}

http://biohost1:3777/v1/growths9/branch/{branch_name}

http://biohost1:3777/v1/growths9/leaf/{leaf_name}

The JSON looks like this

A tree...
{
 "id":"100",
 "name":"maple",
 "root":"root_branch"
}

A branch...
{
 "id":"200",
 "name":"root_branch",
 "branches":[ { "id":"201", "name":"sub1_branch" }, { "id":"202", "name":"sub2_branch" } ],
 "leaves":[ { "id":"500", "name":"leaf1" }, { "id":"501", "name":"leaf3" }, { "id":"502", "name":"leaf4" } ],
 "age":"20"
}

A leaf...
{
 "id":"500",
 "name":"leaf1",
 "area":"10",
 "age":"3"
}

As you can see, the "id" and "name" fields are overloaded in the different object types (but have no relationship to one another / there's not a global scope for ids or names).

I'd like a separate @context for each.  Something that I could use for a header-linked context that exposes the links into the structure.

Once I have that, what would I need to browse this?  Is there off-the-shelf Javascript that will do this?  Create and update are also supported by the interface: would further extension of the context allow me to manipulate the structure with an off-the-shelf tool?

Thanks,
Ron

 		 	   		  

Received on Monday, 13 April 2015 07:55:01 UTC