GraphGist: Preview

[Warning]Warning

This GraphGist has not yet been submitted and approved for publication. If you're the developer, please submit for publication using the GraphGist Portal.

graphGist asciiDoc file for use at http://gist.neo4j.org/ [GitHub Gist]

Generated on Sun Jul 28 08:03:44 PDT 2013

Running queries, preparing the console!

Initialize Graph

      CREATE
          ( plato:Philosopher     {name:'Plato', uri: 'http://dbpedia.org/resource/Plato' })
        , ( aristotle:Philosopher { name: 'Aristotle' , uri: 'http://dbpedia.org/resource/Aristotle' })
        , ( platonism_school:School { name: 'Platonism', uri: 'http://dbpedia.org/resource/Platonism' })
        , ( peripatetic_school:School { name: 'Peripatetic school', uri: 'http://dbpedia.org/resource/Peripatetic_school' })
        , ( philo_tradition:SchoolType { name: 'Philosophical traditions', uri: 'http://dbpedia.org/class/yago/PhilosophicalTraditions' })
        , ( philo_movement:SchoolType { name: 'Philosophical movements', uri: 'http://dbpedia.org/class/yago/PhilosophicalMovements' })
        , ( philo_ancient_school:SchoolType { name: 'Ancient philosophical schools and traditions', uri: 'http://dbpedia.org/class/yago/AncientPhilosophicalSchoolsAndTraditions' })
        , ( tradition:SchoolType { name: 'tradition', uri: 'http://dbpedia.org/class/yago/Tradition105809745' })
        , ( movement:SchoolType { name: 'movement', uri: 'http://dbpedia.org/class/yago/Motion100331950' })
        , ( school:SchoolType { name: 'school', uri: 'http://dbpedia.org/class/yago/School108276720' })
        , plato-[:INFLUENCES]->aristotle
        , plato-[:MEMBER_OF]->platonism_school
        , aristotle-[:MEMBER_OF]->peripatetic_school
        , platonism_school-[:TYPE_OF]->philo_tradition
        , platonism_school-[:TYPE_OF]->philo_movement
        , peripatetic_school-[:TYPE_OF]->philo_movement
        , peripatetic_school-[:TYPE_OF]->philo_ancient_school
        , philo_ancient_school-[:SUBCLASS_OF]->school
        , philo_movement-[:SUBCLASS_OF]->movement
        , philo_tradition-[:SUBCLASS_OF]->tradition
Loading table...

query for philosophers with school type class

       MATCH p1:Philosopher-[:MEMBER_OF]->s1:School-[:TYPE_OF]->st1:SchoolType-[:SUBCLASS_OF]->stc1:SchoolType
       WHERE  stc1.name = 'movement'
       RETURN p1.name as p1Name, s1.name as s1Name, st1.name as st1Name, stc1.name as stc1Name
Loading table...

query for influential philosophers from the same school type

       MATCH st2:SchoolType<-[:TYPE_OF]-s2:School<-[:MEMBER_OF]-p2:Philosopher<-[:INFLUENCES]-p1:Philosopher-[:MEMBER_OF]->s1:School-[:TYPE_OF]->st1:SchoolType
       WHERE  st2 = st1 // node equality
       RETURN p1.name as p1Name, s1.name as s1Name, st1.name as st1Name, p2.name as p2Name, s2.name as s2Name, st2.name as st2Name
Loading table...

query for influential philosophers from the same school type class

       MATCH p=st2:SchoolType<-[:TYPE_OF]-s2:School<-[:MEMBER_OF]-p2:Philosopher<-[:INFLUENCES]-p1:Philosopher-[:MEMBER_OF]->s1:School-[:TYPE_OF]->st1:SchoolType-[:SUBCLASS_OF]->stc:SchoolType
       WHERE (stc)<-[:SUBCLASS_OF]-(st2)
       RETURN p1.name as p1Name, s1.name as s1Name, st1.name as st1Name, p2.name as p2Name, s2.name as s2Name, st2.name as st2Name, stc.name as stcName
Loading table...
Run
Table
Graph
Table!
Graph!
Error!
Loading