In [3]:
import pandas as pd
import py2neo
graph = py2neo.Graph()
In [4]:
query="""
MATCH (c:Class)-[:DECLARES]->(f:Field)<-[:WRITES]-(m:Method)
WHERE f.static = true AND NOT HAS(f.final)
RETURN c.name, f.name, m.name
"""
pd.DataFrame(graph.data(query))
Out[4]:
In [5]:
query="""
MATCH (s:Subdomain)<-[:BELONGS_TO]-(c:Class)-[:DECLARES]->(f:Field)<-[w:WRITES]-(m:Method)
WHERE f.static = true AND NOT HAS(f.final)
RETURN s.name, c.name, f.name, w.lineNumber, m.name
"""
pd.DataFrame(graph.data(query))
Out[5]:
In [10]:
query="""
MATCH (e:Entity)<-[:CONTAINS]-(p:Package)
WHERE p.name <> "model"
RETURN e.name, p.name
"""
pd.DataFrame(graph.data(query))
Out[10]: