
Graph Query Portal David Brock and Amit Dayal Client: Prashant Chandrasekar CS4624: Multimedia, Hypertext, and Information Access Professor Edward A. Fox Virginia Tech, Blacksburg, VA 24061 May 2, 2018 1 Table of Contents Table of Figures......................................................................................................................... 3 Introduction ............................................................................................................................... 6 Ontology ................................................................................................................................. 6 Semantic Web ......................................................................................................................... 7 Data Collection Platform ........................................................................................................ 8 Current Process ....................................................................................................................... 9 Requirements........................................................................................................................... 10 Project Deliverables .............................................................................................................. 10 Design ....................................................................................................................................... 10 Implementations ...................................................................................................................... 18 Developer’s Manual ................................................................................................................ 21 About..................................................................................................................................... 21 System Requirements............................................................................................................ 21 Node.js API ........................................................................................................................... 24 Neo4j Usage .......................................................................................................................... 25 Routes ................................................................................................................................... 25 Models................................................................................................................................... 27 Controllers............................................................................................................................. 35 Running the Node Server ...................................................................................................... 46 Accessing the Node Server ................................................................................................... 47 Running the Neo4j Service ................................................................................................... 48 Cypher Data Import and Relationship Creation.................................................................... 49 User’s Manual ......................................................................................................................... 55 /:graphName/participant ...................................................................................................... 55 /:graphName/participant/:id ................................................................................................. 55 /graph/view ........................................................................................................................... 56 /graph/findByPropertyValue ................................................................................................. 56 /graph/describe ..................................................................................................................... 57 /graph/addProperty............................................................................................................... 57 2 /graph/addLabel .................................................................................................................... 57 /graph/addRelationship......................................................................................................... 58 /graph/find............................................................................................................................. 59 /graph/fetchNode................................................................................................................... 59 /:graphName/engagement/:engagementType ....................................................................... 60 /compare/:graphName1/:graphName2/:labelName/:engagementType ............................... 60 /view/log/all........................................................................................................................... 61 /view/log/developer ............................................................................................................... 61 /view/log/graph ..................................................................................................................... 61 /view/log/participant ............................................................................................................. 62 /view/log/log .......................................................................................................................... 62 Commonly Encountered Errors ............................................................................................ 62 Testing ...................................................................................................................................... 63 Timeline ................................................................................................................................... 64 Lessons Learned ...................................................................................................................... 65 Future Work ............................................................................................................................ 67 Acknowledgements ................................................................................................................. 67 References ................................................................................................................................ 68 3 Table of Figures 1. An illustration of an ontology……………………………………………………...….......7 2. Semantic Web-Stack…...…………………………………………...………………….....8 3. Friendica’s ‘wall’ feature…………………………………………….………………..…..9 4. Graph of all vocabularies...………………………………………………………………12 5. MySQL Workbench Reverse Engineering of Friendica’s Database………...……...…...14 6. Version 1 of custom Ontology…………………………………………………………..15 7. Final Version of Ontology………………………………………..……………………...16 8. Fictitious example of a graph interaction using Friendica’s Wall Post feature………….16 9. Neo4j implementation of the interaction in Figure 8…………………………………….17 10. Api to Graph Database Diagram of Project………………………………………….…..19 11. Scenario and test queries…………………………………………………………………20 12. Root directory……………………………………………………………………………22 13. Changes in config file…………………..……………………………………………..…22 14. Logging configuration…………………………….…………………………………..…23 15. Shell Enablement………………………………………...………………...………….…23 16. Putty configuration……………………………………………..……………………...…24 17. Single Route example…………………………………………………...…………….…26 18. Engagement Controller requirement…………………………………….……………….26 19. Fetch Graph Function……………………………………………………………………28 20. doesTypeObjectExisit Function………………………………………………………….28 21. getRegexForEngagementType Function…………………………………...…………....29 22. findAnyNode Function……………………………………………………..……………29 23. findByPropertyValue Function……………………………………………..……………30 24. createNewProperty Function…………………………………………………………….30 25. createNewLabel Function………………………………………………….…………….31 26. runRawQuery Function……………………………………………………..……………31 27. createNewRelationship Function……………………………………………….………..32 28. Participant Model……...……………………………………………………...………….32 29. Multiple Participant Query……………………………………………………....………33 30. Engagement Model Class………………………………..………………………………33 31. Comparative Model Class………....………………………………..................................34 32. Graph Controller Class……………………………………………………………...…...36 33. findNode Controller processing……………………………………………….................37 34. findProppertyValue Controller processing…………………………………………...…38 35. createNewLabel Controller processing……………………………………………….....39 36. createNewProperty Controller processing………………..………………………...........39 37. createNewRelationship Controller processing………………………………….………..41 38. participantController class………..……………………………………...........................42 39. engagementController class………..…………………………………………………….43 4 40. comparativeController class…………...………………………………………………...44 41. logController class……………………………………………………………………….45 42. HTTP request for participant…………………………………………………………….47 43. Sample error message……………………………………………………………………48 44. Neo4j browser command line interface………………….………………………………49 5 Executive Summary Prashant Chandrasekar, a lead developer for the Social Interactome project, has tasked the team with creating a graph representation of the data collected from the social networks involved in that project. The data is currently stored in a MySQL database. The client
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages70 Page
-
File Size-