-
Notifications
You must be signed in to change notification settings - Fork 4
Graph Structure
Kasi Chonpimai edited this page Dec 6, 2016
·
1 revision
As defined in /model/graph.js, a graph consists of a Map of {id: Resource}. The resource class itself is decoupled into /model/resource.js, so that the graph maintain simple structure and doesn't need full knowledge of what a resource is.
Instead of a list of resources, to make it easier for client to use the graph data, the API returns graph structure in the following format:
{
nodes: [
{
uri: <resource_uri>,
properties: [
<property_type>: <uri>,
...
]
},
...
],
edges: [
{
s: <source_uri>
t: <terminate_uri>
r: <relationship>
},
...
]
}