Skip to content

Commit

Permalink
Merge pull request #22 from linkml/add-neo4j-bindings
Browse files Browse the repository at this point in the history
add neo4j bindings
  • Loading branch information
cmungall authored Aug 2, 2024
2 parents 48c6a08 + 1e65718 commit 6b1b6d2
Show file tree
Hide file tree
Showing 18 changed files with 3,525 additions and 991 deletions.
1,419 changes: 1,419 additions & 0 deletions docs/how-to/Use-Neo4J.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/how-to/input/movies_kg/diagrams/MoviesKG.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/how-to/input/movies_kg/edges.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
subject,predicate,object,plays
PERSON:TH,ActedIn,MOVIE:FG,CHARACTER:Forrest
PERSON:RZ,Directed,MOVIE:FG,
PERSON:RZ,Directed,MOVIE:BTTF,
PERSON:KR,ActedIn,MOVIE:TM,CHARACTER:Neo
PERSON:MJF,ActedIn,MOVIE:BTTF,CHARACTER:MartyMcFly
PERSON:HW,ActedIn,MOVIE:TM,CHARACTER:AgentSmith
11 changes: 11 additions & 0 deletions docs/how-to/input/movies_kg/nodes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
id,category,name,born,released
PERSON:TH,Actor,Tom Hanks,1956,
PERSON:RZ,Director,Robert Zemeckis,1951,
PERSON:HW,Actor,Hugo Weaving,1960,
PERSON:KR,Actor,Keanu Reeves,1964,
PERSON:MJF,Actor,Michael J. Fox,1961,
MOVIE:FG,Movie,Forrest Gump,,1994
MOVIE:TM,Movie,The Matrix,,1999
MOVIE:TM2,Movie,The Matrix Reloaded,,2003
MOVIE:TM3,Movie,The Matrix Revolutions,,2003
MOVIE:BTTF,Movie,Back to the Future,,1985
153 changes: 153 additions & 0 deletions docs/how-to/input/movies_kg/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: MoviesKG
description: Information about movies, organized as a Property Graph
id: https://w3id.org/linkml/examples/movieskg
imports:
- linkml:types
prefixes:
sdo: http://schema.org/
movieskg: https://w3id.org/linkml/examples/movieskg/
linkml: https://w3id.org/linkml/
rdfs: http://www.w3.org/2000/01/rdf-schema#
default_prefix: movieskg
default_range: string
enums:
ProfessionType:
description: profession/occupation vocabulary
from_schema: https://w3id.org/linkml/examples/movieskg
permissible_values:
Actor:
description: acts in movies
Director:
description: directs
Producer:
description: produces or exec produces
CostumeDesigner:
description: makes the costumes
slots:
id:
description: unique CURIE identifier
identifier: true
range: uriorcurie
name:
description: human-readable name/label
slot_uri: rdfs:label
range: string
category:
slot_uri: rdf:type
designates_type: true
range: string
aliases:
range: string
multivalued: true
born:
range: integer
released:
range: integer
subject:
slot_uri: rdf:subject
range: Node
predicate:
comments:
- Note that this uniquely identifiers the (reified) class
slot_uri: rdf:predicate
designates_type: true
range: string
required: true
object:
slot_uri: rdf:objects
range: Node
nodes:
from_schema: https://w3id.org/linkml/examples/movieskg
edges:
from_schema: https://w3id.org/linkml/examples/movieskg
professions:
from_schema: https://w3id.org/linkml/examples/movieskg
address:
from_schema: https://w3id.org/linkml/examples/movieskg
plays:
from_schema: https://w3id.org/linkml/examples/movieskg
scored_by:
from_schema: https://w3id.org/linkml/examples/movieskg
classes:
Node:
description: A node/vertex in a graph
from_schema: https://w3id.org/linkml/examples/movieskg
slots:
- id
- name
- category
- aliases

Edge:
description: An edge/triple in a graph.
comments:
- May be subclassed to add edge properties. This is a property graph data model,
so edges are instances
from_schema: https://w3id.org/linkml/examples/movieskg
slots:
- subject
- predicate
- object
class_uri: rdfs:Statement
Graph:
description: A collection of nodes and edges
from_schema: https://w3id.org/linkml/examples/movieskg
slots:
- nodes
- edges
slot_usage:
nodes:
description: list of all nodes in the graph
range: Node
multivalued: true
inlined_as_list: true
edges:
description: list of all edges in the graph
range: Edge
multivalued: true
inlined_as_list: true
Person:
description: a person living or dead
from_schema: https://w3id.org/linkml/examples/movieskg
is_a: Node
slots:
- professions
- born
slot_usage:
professions:
description: jobs/roles
range: ProfessionType
multivalued: true
CreativeWork:
description: A creative work like a movie
from_schema: https://w3id.org/linkml/examples/movieskg
is_a: Node
Movie:
from_schema: https://w3id.org/linkml/examples/movieskg
is_a: CreativeWork
slots:
- released
Character:
from_schema: https://w3id.org/linkml/examples/movieskg
is_a: CreativeWork
ActedIn:
from_schema: https://w3id.org/linkml/examples/movieskg
is_a: Edge
slots:
- plays
slot_usage:
subject:
range: Person
object:
range: Movie
plays:
description: The character or characters played by the subject (actor)
range: Character
Directed:
from_schema: https://w3id.org/linkml/examples/movieskg
is_a: Edge
slot_usage:
subject:
range: Person
object:
range: Movie
Loading

0 comments on commit 6b1b6d2

Please sign in to comment.