Associated relationship types for Neo4j database node
nodereltypes = nodeRelationTypes(node,direction)
Create a Neo4j® database connection using the URL
http://localhost:7474/db/data, user name
neo4j, and password
url = 'http://localhost:7474/db/data'; username = 'neo4j'; password = 'matlab'; neo4jconn = neo4j(url,username,password);
Message property of the Neo4j® connection object
ans = 
Message property indicates a successful connection.
Search the database for the node with node identifier
2 using the Neo4j® database connection
nodeid = 2; node = searchNodeByID(neo4jconn,nodeid);
Search for all incoming relationships for the node.
nodereltypes = nodeRelationTypes(node,'in')
nodereltypes = cell 'knows'
nodereltypes returns a list of the relationship types.
nodereltypes— Relationship types
Relationship types, returned as a cell array of character vectors. The cell array contains one character vector for one relationship or multiple character vectors for multiple relationships.