Skip to content

Commit 15e7948

Browse files
committed
Overwriting local file with master branch
2 parents d29714d + 1e28c1f commit 15e7948

5 files changed

Lines changed: 2420 additions & 101 deletions

File tree

README.rst

Lines changed: 18 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,6 @@ Design principles
1515
- Properties that allow a ``null`` value can be omitted.
1616
- Define a `JSON graph schema`_ for content validation purposes.
1717

18-
.. _properties:
19-
20-
Common Properties
21-
-----------------
22-
23-
.. _id property:
24-
25-
**id property**
26-
27-
An `id` property is a primary key for an object (see Objects_) that is unique for the object type. Its value is defined as a *JSON string* for flexibility.
28-
29-
**label property**
30-
31-
A `label` property provides a text display for an object. Its value is defined as a *JSON string*.
32-
33-
**type property**
34-
35-
A `type` property provides a classification for an object. Its value is defined as a *JSON string*.
36-
37-
**metadata property**
38-
39-
A `metadata` property allows for custom data on an object. Its values is defined as a *JSON object*.
40-
41-
4218
.. _objects:
4319

4420
Objects
@@ -52,7 +28,10 @@ A node object represents a node in a graph.
5228

5329
**node properties**
5430

55-
- Includes all `Common Properties`_
31+
- An `id` property is a primary key for an object (see Objects_) that is unique for the object type. Its value is defined as a *JSON string* for flexibility.
32+
- A `label` property provides a text display for an object. Its value is defined as a *JSON string*.
33+
- A `type` property provides a classification for an object. Its value is defined as a *JSON string*.
34+
- A `metadata` property allows for custom data on an object. Its values is defined as a JSON object.
5635

5736
.. _edge object:
5837

@@ -62,10 +41,11 @@ An edge object represents an edge in a graph.
6241

6342
**edge properties**
6443

65-
- Includes all `Common Properties`_
6644
- A `source` property provides the `id` value of the source `node object`_. Its value is defined as a *JSON string*.
45+
- A `relation` property provides the interaction between `source` and `target` nodes. Its value is defined as a *JSON string*.
6746
- A `target` property provides the `id` value of the target `node object`_. Its value is defined as a *JSON string*.
6847
- A `directed` property provides the edge mode (e.g. directed or undirected). Its value is *JSON true* for directed and *JSON false* for undirected. The edge direction is determined by *graph.directed* property if not present.
48+
- A `metadata` property allows for custom data on an object. Its values is defined as a JSON object.
6949

7050
.. _graph object:
7151

@@ -75,21 +55,26 @@ A graph object represents a single conceptual graph.
7555

7656
**graph properties**
7757

78-
- Includes all `Common Properties`_
58+
- A `type` property provides a classification for an object. Its value is defined as a *JSON string*.
59+
- A `label` property provides a text display for an object. Its value is defined as a *JSON string*.
7960
- A `directed` property provides the graph mode (e.g. directed or undirected). Its value is *JSON true* for directed and *JSON false* for undirected. This property default to *JSON true* indicating a directed graph.
8061
- A `nodes` property provides the nodes in the graph. Its value is an array of `node object`_.
8162
- An `edges` property provides the edges in the graph. Its value is an array of `edge object`_.
63+
- A `metadata` property allows for custom data on an object. Its values is defined as a JSON object.
8264

8365
.. _graphs object:
8466

8567
**graphs object**
8668

8769
A graphs object groups zero or more `graph object`_ into one JSON document.
8870

71+
- The `graphs object`_ is defined as a *JSON array*.
72+
8973
**graphs properties**
9074

91-
- Includes all `Common Properties`_. The `id` is not required.
92-
- The `graphs object`_ is defined as a *JSON array*.
75+
- A `type` property provides a classification for an object. Its value is defined as a *JSON string*.
76+
- A `label` property provides a text display for an object. Its value is defined as a *JSON string*.
77+
- A `metadata` property allows for custom data on an object. Its values is defined as a JSON object.
9378

9479
.. _examples:
9580

@@ -103,9 +88,7 @@ Examples
10388
.. code-block:: json
10489
10590
{
106-
"graph": {
107-
"id": "default"
108-
}
91+
"graph": {}
10992
}
11093
11194
.. _empty multi graph:
@@ -126,7 +109,6 @@ Examples
126109
127110
{
128111
"graph": {
129-
"id": "default",
130112
"nodes": [
131113
{
132114
"id": "A",
@@ -146,7 +128,6 @@ Examples
146128
147129
{
148130
"graph": {
149-
"id": "default",
150131
"nodes": [
151132
{
152133
"id": "A",
@@ -157,7 +138,6 @@ Examples
157138
],
158139
"edges": [
159140
{
160-
"id": "A - B",
161141
"source": "A",
162142
"target": "B"
163143
}
@@ -173,7 +153,6 @@ Examples
173153
174154
{
175155
"graph": {
176-
"id": "default",
177156
"directed": false,
178157
"type": "graph type",
179158
"label": "graph label",
@@ -200,11 +179,10 @@ Examples
200179
],
201180
"edges": [
202181
{
203-
"id": "0",
204182
"source": "0",
183+
"relation": "edge relationship",
205184
"target": "1",
206185
"directed": false,
207-
"rel": "edge relationship",
208186
"label": "edge label",
209187
"metadata": {
210188
"user-defined": "values"
@@ -223,7 +201,6 @@ Examples
223201
{
224202
"graphs": [
225203
{
226-
"id": "graph0",
227204
"directed": true,
228205
"type": "graph type",
229206
"label": "graph label",
@@ -250,11 +227,10 @@ Examples
250227
],
251228
"edges": [
252229
{
253-
"id": "0",
254230
"source": "0",
231+
"relation": "edge relationship",
255232
"target": "1",
256233
"directed": true,
257-
"rel": "edge relationship",
258234
"label": "edge label",
259235
"metadata": {
260236
"user-defined": "values"
@@ -263,7 +239,6 @@ Examples
263239
]
264240
},
265241
{
266-
"id": "graph1",
267242
"directed": true,
268243
"type": "graph type",
269244
"label": "graph label",
@@ -290,11 +265,10 @@ Examples
290265
],
291266
"edges": [
292267
{
293-
"id": "0",
294268
"source": "1",
269+
"relation": "edge relationship",
295270
"target": "0",
296271
"directed": true,
297-
"rel": "edge relationship",
298272
"label": "edge label",
299273
"metadata": {
300274
"user-defined": "values"

examples/car_graphs.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"graphs": [
33
{
4-
"id": "car-manufacturer-relationships",
54
"type": "car",
65
"label": "Car Manufacturer Relationships",
76
"nodes": [
@@ -24,21 +23,18 @@
2423
],
2524
"edges": [
2625
{
27-
"id": "2",
2826
"source": "nissan",
2927
"target": "infiniti",
30-
"rel": "has_luxury_division"
28+
"relation": "has_luxury_division"
3129
},
3230
{
33-
"id": "1",
3431
"source": "toyota",
3532
"target": "lexus",
36-
"rel": "has_luxury_division"
33+
"relation": "has_luxury_division"
3734
}
3835
]
3936
},
4037
{
41-
"id": "car-manufacturer-countries",
4238
"type": "car",
4339
"label": "Car Manufacturer Countries",
4440
"nodes": [
@@ -57,16 +53,14 @@
5753
],
5854
"edges": [
5955
{
60-
"id": "1",
6156
"source": "nissan",
6257
"target": "japan",
63-
"rel": "country_of_origin"
58+
"relation": "country_of_origin"
6459
},
6560
{
66-
"id": "2",
6761
"source": "nissan",
6862
"target": "japan",
69-
"rel": "country_of_origin"
63+
"relation": "country_of_origin"
7064
}
7165
]
7266
}

0 commit comments

Comments
 (0)