Skip to content

Commit 6b1b6d2

Browse files
authored
Merge pull request #22 from linkml/add-neo4j-bindings
add neo4j bindings
2 parents 48c6a08 + 1e65718 commit 6b1b6d2

File tree

18 files changed

+3525
-991
lines changed

18 files changed

+3525
-991
lines changed

docs/how-to/Use-Neo4J.ipynb

Lines changed: 1419 additions & 0 deletions
Large diffs are not rendered by default.

docs/how-to/input/movies_kg/diagrams/MoviesKG.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/how-to/input/movies_kg/edges.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
subject,predicate,object,plays
2+
PERSON:TH,ActedIn,MOVIE:FG,CHARACTER:Forrest
3+
PERSON:RZ,Directed,MOVIE:FG,
4+
PERSON:RZ,Directed,MOVIE:BTTF,
5+
PERSON:KR,ActedIn,MOVIE:TM,CHARACTER:Neo
6+
PERSON:MJF,ActedIn,MOVIE:BTTF,CHARACTER:MartyMcFly
7+
PERSON:HW,ActedIn,MOVIE:TM,CHARACTER:AgentSmith

docs/how-to/input/movies_kg/nodes.csv

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
id,category,name,born,released
2+
PERSON:TH,Actor,Tom Hanks,1956,
3+
PERSON:RZ,Director,Robert Zemeckis,1951,
4+
PERSON:HW,Actor,Hugo Weaving,1960,
5+
PERSON:KR,Actor,Keanu Reeves,1964,
6+
PERSON:MJF,Actor,Michael J. Fox,1961,
7+
MOVIE:FG,Movie,Forrest Gump,,1994
8+
MOVIE:TM,Movie,The Matrix,,1999
9+
MOVIE:TM2,Movie,The Matrix Reloaded,,2003
10+
MOVIE:TM3,Movie,The Matrix Revolutions,,2003
11+
MOVIE:BTTF,Movie,Back to the Future,,1985
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: MoviesKG
2+
description: Information about movies, organized as a Property Graph
3+
id: https://w3id.org/linkml/examples/movieskg
4+
imports:
5+
- linkml:types
6+
prefixes:
7+
sdo: http://schema.org/
8+
movieskg: https://w3id.org/linkml/examples/movieskg/
9+
linkml: https://w3id.org/linkml/
10+
rdfs: http://www.w3.org/2000/01/rdf-schema#
11+
default_prefix: movieskg
12+
default_range: string
13+
enums:
14+
ProfessionType:
15+
description: profession/occupation vocabulary
16+
from_schema: https://w3id.org/linkml/examples/movieskg
17+
permissible_values:
18+
Actor:
19+
description: acts in movies
20+
Director:
21+
description: directs
22+
Producer:
23+
description: produces or exec produces
24+
CostumeDesigner:
25+
description: makes the costumes
26+
slots:
27+
id:
28+
description: unique CURIE identifier
29+
identifier: true
30+
range: uriorcurie
31+
name:
32+
description: human-readable name/label
33+
slot_uri: rdfs:label
34+
range: string
35+
category:
36+
slot_uri: rdf:type
37+
designates_type: true
38+
range: string
39+
aliases:
40+
range: string
41+
multivalued: true
42+
born:
43+
range: integer
44+
released:
45+
range: integer
46+
subject:
47+
slot_uri: rdf:subject
48+
range: Node
49+
predicate:
50+
comments:
51+
- Note that this uniquely identifiers the (reified) class
52+
slot_uri: rdf:predicate
53+
designates_type: true
54+
range: string
55+
required: true
56+
object:
57+
slot_uri: rdf:objects
58+
range: Node
59+
nodes:
60+
from_schema: https://w3id.org/linkml/examples/movieskg
61+
edges:
62+
from_schema: https://w3id.org/linkml/examples/movieskg
63+
professions:
64+
from_schema: https://w3id.org/linkml/examples/movieskg
65+
address:
66+
from_schema: https://w3id.org/linkml/examples/movieskg
67+
plays:
68+
from_schema: https://w3id.org/linkml/examples/movieskg
69+
scored_by:
70+
from_schema: https://w3id.org/linkml/examples/movieskg
71+
classes:
72+
Node:
73+
description: A node/vertex in a graph
74+
from_schema: https://w3id.org/linkml/examples/movieskg
75+
slots:
76+
- id
77+
- name
78+
- category
79+
- aliases
80+
81+
Edge:
82+
description: An edge/triple in a graph.
83+
comments:
84+
- May be subclassed to add edge properties. This is a property graph data model,
85+
so edges are instances
86+
from_schema: https://w3id.org/linkml/examples/movieskg
87+
slots:
88+
- subject
89+
- predicate
90+
- object
91+
class_uri: rdfs:Statement
92+
Graph:
93+
description: A collection of nodes and edges
94+
from_schema: https://w3id.org/linkml/examples/movieskg
95+
slots:
96+
- nodes
97+
- edges
98+
slot_usage:
99+
nodes:
100+
description: list of all nodes in the graph
101+
range: Node
102+
multivalued: true
103+
inlined_as_list: true
104+
edges:
105+
description: list of all edges in the graph
106+
range: Edge
107+
multivalued: true
108+
inlined_as_list: true
109+
Person:
110+
description: a person living or dead
111+
from_schema: https://w3id.org/linkml/examples/movieskg
112+
is_a: Node
113+
slots:
114+
- professions
115+
- born
116+
slot_usage:
117+
professions:
118+
description: jobs/roles
119+
range: ProfessionType
120+
multivalued: true
121+
CreativeWork:
122+
description: A creative work like a movie
123+
from_schema: https://w3id.org/linkml/examples/movieskg
124+
is_a: Node
125+
Movie:
126+
from_schema: https://w3id.org/linkml/examples/movieskg
127+
is_a: CreativeWork
128+
slots:
129+
- released
130+
Character:
131+
from_schema: https://w3id.org/linkml/examples/movieskg
132+
is_a: CreativeWork
133+
ActedIn:
134+
from_schema: https://w3id.org/linkml/examples/movieskg
135+
is_a: Edge
136+
slots:
137+
- plays
138+
slot_usage:
139+
subject:
140+
range: Person
141+
object:
142+
range: Movie
143+
plays:
144+
description: The character or characters played by the subject (actor)
145+
range: Character
146+
Directed:
147+
from_schema: https://w3id.org/linkml/examples/movieskg
148+
is_a: Edge
149+
slot_usage:
150+
subject:
151+
range: Person
152+
object:
153+
range: Movie

0 commit comments

Comments
 (0)