annotate importFromOpenMind/importer/ismi2neo4j.py @ 16:de0a06eef13b

new neo4j importer for network visualisation frontend.
author casties
date Fri, 28 Aug 2015 17:24:45 +0200
parents
children 4dfd832e9cd9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
1 import urllib.request
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
2 import json
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
3 from neo4jrestclient.client import GraphDatabase, Node
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
4
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
5 # In[111]:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
6 ismi_types=["PERSON","WITNESS","CODEX","PLACE","COLLECTION","REPOSITORY"]
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
7
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
8 baseURL="http://localhost:18080/ismi-richfaces/jsonInterface?"
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
9
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
10 entsURL=baseURL+"method=get_ents&oc=%s"
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
11
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
12 entURL=baseURL+"method=get_ent&id=%s&include_content=True"
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
13
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
14
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
15 def readJSON(url):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
16 wsh=urllib.request.urlopen(url)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
17 txt = wsh.read()
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
18 return json.loads(txt.decode("utf-8"))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
19
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
20 defs_json = readJSON(baseURL+"method=get_defs")
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
21
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
22 ismi_defs = [atts['ov'] for atts in defs_json['defs']]
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
23
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
24
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
25 gdb = GraphDatabase("http://localhost:7474/db/data/", username="neo4j", password="neo5j")
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
26
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
27 n4j_nodes = {}
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
28 ismi_relations = {}
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
29 n4j_relations = {}
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
30
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
31 keep_nodes = False
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
32
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
33 ent_exclude_attrs = [
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
34 'lw',
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
35 'node_type',
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
36 'nov'
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
37 ]
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
38
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
39
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
40 def getNode(ismi_id=None):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
41 if ismi_id is not None:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
42 res = gdb.query("match (n {ismi_id: %s}) return n"%40635, returns=(Node))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
43 if len(res) > 0:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
44 return res[0]
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
45
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
46 return None
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
47
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
48 def nodeFromEnt(ent, etype):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
49 attrs = {}
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
50 # go through all attributes
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
51 for att in ent['atts']:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
52 ct = att.get('content_type', None)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
53 if ct in ['text', 'arabic', 'bool', 'url']:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
54 # normal text attribute
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
55 key = att['name']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
56 val = att['ov']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
57
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
58 if key in ent_exclude_attrs:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
59 # exclude attribute
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
60 continue
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
61
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
62 # keep attribute
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
63 attrs[key] = val
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
64
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
65 elif ct == 'date':
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
66 # date attribute
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
67 key = att['name']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
68 val = att['ov']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
69 #print("don't know what to do with date: %s=%s"%(key,val))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
70
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
71 elif ct == 'old':
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
72 # ignore attribute
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
73 continue
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
74
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
75 else:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
76 #print("WARN: attribute with unknown content_type: %s"%repr(att))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
77 # ignore other content types
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
78 continue
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
79
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
80 # process base attributes
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
81 oc = ent['oc']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
82 if oc != etype:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
83 print("ERROR: entity type doesn't match!")
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
84 return null
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
85
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
86 attrs['type'] = oc
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
87
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
88 ismi_id = ent['id']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
89 # rename id to ismi_id
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
90 attrs['ismi_id'] = ismi_id
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
91
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
92 ov = ent.get('ov', None)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
93 if ov is not None:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
94 # save ov as label
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
95 attrs['label'] = ov
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
96
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
97 # create node with attributes
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
98 node = gdb.nodes.create(**attrs)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
99 # add labels
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
100 node.labels.add(['project_ismi', etype])
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
101 return node
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
102
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
103
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
104 # In[77]:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
105
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
106 def relsFromEnt(ent, relations):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
107 # go through src_rels and tar_rels
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
108 rels = ent.get('src_rels', []) + ent.get('tar_rels', [])
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
109 for rel in rels:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
110 rel_id = rel['id']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
111 if rel_id in relations:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
112 old_rel = relations[rel_id]
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
113 if rel != old_rel:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
114 print("ERROR: relation is different: %s != %s"%(repr(rel), repr(old_rel)))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
115 continue
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
116
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
117 relations[rel_id] = rel
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
118
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
119 return relations
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
120
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
121
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
122 # In[110]:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
123
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
124 def n4jrelationsFromRels(rels, nodes):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
125 # go through all rels
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
126 print("importing %s relations"%len(rels))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
127 cnt = 0
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
128 for rel in rels.values():
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
129 cnt += 1
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
130 if cnt % 100 == 0:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
131 print(" %s relations"%cnt)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
132
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
133 rel_id = rel['id']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
134 rel_name = rel['name']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
135 src_id = rel['src_id']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
136 tar_id = rel['tar_id']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
137 src = nodes.get(src_id, None)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
138 if src is None:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
139 print("ERROR: relation %s src node %s missing!"%(rel_id,src_id))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
140 continue
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
141
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
142 tar = nodes.get(tar_id, None)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
143 if tar is None:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
144 print("ERROR: relation %s tar node %s missing!"%(rel_id,tar_id))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
145 continue
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
146
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
147 n4j_rel = gdb.relationships.create(src, rel_name, tar)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
148 n4j_relations[rel_id] = n4j_rel
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
149
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
150 return n4j_relations
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
151
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
152
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
153 # In[114]:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
154
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
155 def importEnts(etype):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
156 # read json for all entities of given type
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
157 json = readJSON(entsURL%etype)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
158 ents = json['ents']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
159 print("importing %s %ss"%(len(ents),etype))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
160 cnt = 0
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
161 for ent in ents:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
162 cnt += 1
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
163 if cnt % 100 == 0:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
164 print(" %s %ss"%(cnt, etype))
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
165
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
166 # extract ismi id
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
167 ismi_id = ent['id']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
168
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
169 node = None
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
170
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
171 # fetch full data for entity
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
172 ent_json = readJSON(entURL%ismi_id)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
173 ent_data = ent_json['ent']
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
174 # create neo4j node
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
175 if keep_nodes:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
176 node = getNode(ismi_id)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
177
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
178 if node is None:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
179 node = nodeFromEnt(ent_data, etype)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
180
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
181 if ismi_id in n4j_nodes:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
182 print("ERROR: entity with id=%s exists!"%ismi_id)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
183 return
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
184
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
185 # save node reference
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
186 n4j_nodes[ismi_id] = node
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
187
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
188 # extract relations
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
189 relsFromEnt(ent_data, ismi_relations)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
190
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
191 #if cnt >= 100:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
192 # return
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
193
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
194
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
195 # In[119]:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
196
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
197 def importAllEnts(etypes):
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
198
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
199 for etype in etypes:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
200 importEnts(etype)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
201
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
202 n4jrelationsFromRels(ismi_relations, n4j_nodes)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
203
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
204
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
205 # In[120]:
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
206
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
207 #importAllEnts(ismi_types)
de0a06eef13b new neo4j importer for network visualisation frontend.
casties
parents:
diff changeset
208 importAllEnts(ismi_defs)