{"_id":"graffmaker","_rev":"26-8d348e5fdab488dfe52118ceaef749ae","name":"graffmaker","description":"Graph building DSL for Neo4J","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.0":{"name":"graffmaker","version":"0.0.0","description":"Graph building DSL for Neo4J","main":"main.js","dependencies":{"neo4j":"~0.2.20","rsvp":"~1.2.0"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/julianbrowne/graffmaker.git"},"keywords":["neo4j","graph"],"author":{"name":"Julian Browne"},"license":"WTFPL","readmeFilename":"README.md","gitHead":"4ada9f54443a7a2d283db11c7b169d308589dd8c","directories":{"example":"examples"},"readme":"\n##Graffmaker\n\nStraighforward data generation tool for neo4J.   \nCreates simple graph structures for testing and playing around with ideas in Neo4J.   \n\n###Using Graffmaker\n\n####Install\n\n    npm install graffmaker\n\n####Include Library\n\nInclude the models library: \n\n    var model = require('graffmaker');\n\n####Defines \"Types\" of Node\n\nDefine the node structures you want to use by calling model.define with all the fields you want to be available in the node:\n\n    var Car    = new model.define(\"make\", \"model\", \"engine\", \"seats\");\n    var Person = new model.define(\"firstName\", \"lstName\");\n    var Home   = new model.define(\"name\");\n\nThis is so you can do this kind of OO thing later:\n\n\tvar myCar = new Car('Honda', 'CRV', '2.2', 5);\n\nthen:\n\n    model.createNode(myCar);\n\nThat's one node in the database. Sorted.\n\n####Make Nodes and Relationships\n\t\nOr actually populate Neo4J with some useful data:\n\n    model.createNode(new Person(\"John\", \"Smith\"))\n        .then(\n            model.connectTo([\n                { node: new Car('Honda', 'CRV', '2.2', 5), rel: 'drives' },\n                { node: new type.Home(\"Flat 2B\"), rel: 'lives-in' }\n            ])\n        );\n\n(note: example code may be found in example-1.js, example-2.js, example-3.js)\n    \nGraph connections can be chained, with the last node created (the Home in the example above), being passed to the next 'then' clause.\n\nRelationships work both ways so\n\n\tmodel.connectTo()\n\njoins the previously created node to the current one and\n\n\tmodel.connectFrom()\n\njoins the current node to the previous\n\nBoth model.connectTo and model.connectFrom take an array of objects of the form (node: …, rel: …} where node is the graph node data and rel is the relationship required between this one and the previous. It's therefore entirely acceptable to skip the pseudo OO step above and simply call:\n\n\tmodel.createNode({name: 'Dr Who', type: 'timelord'})\n    \t.then(model.connectTo([{node: {name: 'cybermen', type: 'cyborg' }, rel: 'enemy'}]))\n    \t.then(model.connectTo([{node: {name: 'Mondas', type: 'planet' }, rel: 'originates'}]));\n\nTo actually do the population first make sure Neo4J is running (lib/models.js expects it to be local machine) and then simply run:\n\n    node {your_js_file}\n\n","_id":"graffmaker@0.0.0","dist":{"shasum":"88085c77def27702233735658c19a7627ec1b5ab","tarball":"https://registry.npmjs.org/graffmaker/-/graffmaker-0.0.0.tgz","integrity":"sha512-IwYPTr0SZRI4DTaUvg8hrF2naN0DOtBTiT3Qmi/LlBE7SvZ2bhOs3m8fY3WLCgU1YcExrnmPNpioWha3vH4Idg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSF2lYJL2ymOMY49m7mLYXxbg8fQN2ICt91456AswqaAiEA24HUwdKMe8g085gKpP7z2kRYBRxVphxjxTbvqCifxYQ="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"julianbrowne","email":"julianbrowne@gmail.com"},"maintainers":[{"name":"julianbrowne","email":"julianbrowne@gmail.com"}]},"0.0.1":{"name":"graffmaker","version":"0.0.1","description":"Graph building DSL for Neo4J","main":"main.js","dependencies":{"neo4j":"~0.2.20","rsvp":"~1.2.0"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/julianbrowne/graffmaker.git"},"keywords":["neo4j","graph"],"author":{"name":"Julian Browne"},"license":"WTFPL","readmeFilename":"README.md","gitHead":"4ada9f54443a7a2d283db11c7b169d308589dd8c","directories":{"example":"examples"},"readme":"\n##Graffmaker\n\nStraighforward data generation tool for neo4J.   \nCreates simple graph structures for testing and playing around with ideas in Neo4J.   \n\n###Using Graffmaker\n\n####Install\n\n    npm install graffmaker\n\n####Include Library\n\nInclude the models library: \n\n    var model = require('graffmaker');\n\n####Defines \"Types\" of Node\n\nDefine the node structures you want to use by calling model.define with all the fields you want to be available in the node:\n\n    var Car    = new model.define(\"make\", \"model\", \"engine\", \"seats\");\n    var Person = new model.define(\"firstName\", \"lstName\");\n    var Home   = new model.define(\"name\");\n\nThis is so you can do this kind of OO thing later:\n\n\tvar myCar = new Car('Honda', 'CRV', '2.2', 5);\n\nthen:\n\n    model.createNode(myCar);\n\nThat's one node in the database. Sorted.\n\n####Make Nodes and Relationships\n\t\nOr actually populate Neo4J with some useful data:\n\n    model.createNode(new Person(\"John\", \"Smith\"))\n        .then(\n            model.connectTo([\n                { node: new Car('Honda', 'CRV', '2.2', 5), rel: 'drives' },\n                { node: new type.Home(\"Flat 2B\"), rel: 'lives-in' }\n            ])\n        );\n\n(note: example code may be found in example-1.js, example-2.js, example-3.js)\n    \nGraph connections can be chained, with the last node created (the Home in the example above), being passed to the next 'then' clause.\n\nRelationships work both ways so\n\n\tmodel.connectTo()\n\njoins the previously created node to the current one and\n\n\tmodel.connectFrom()\n\njoins the current node to the previous\n\nBoth model.connectTo and model.connectFrom take an array of objects of the form (node: …, rel: …} where node is the graph node data and rel is the relationship required between this one and the previous. It's therefore entirely acceptable to skip the pseudo OO step above and simply call:\n\n\tmodel.createNode({name: 'Dr Who', type: 'timelord'})\n    \t.then(model.connectTo([{node: {name: 'cybermen', type: 'cyborg' }, rel: 'enemy'}]))\n    \t.then(model.connectTo([{node: {name: 'Mondas', type: 'planet' }, rel: 'originates'}]));\n\nTo actually do the population first make sure Neo4J is running (lib/models.js expects it to be local machine) and then simply run:\n\n    node {your_js_file}\n\n","_id":"graffmaker@0.0.1","dist":{"shasum":"bc31dd552924c7051e1bdabdd532a5e2a5df6eff","tarball":"https://registry.npmjs.org/graffmaker/-/graffmaker-0.0.1.tgz","integrity":"sha512-WSr5gGl1rSuHAh6Xn7nVMGqWvaRZNvoxRg7jTPj8md6hU6Gkx6fjO0jk+McLRexZezUNSGfig+h9951shvJrGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGM415bdec40R8+gKCMpUTGlCvcVFLgpmDTdkUtqwqBxAiEAtDYhVMK9zp/uR5k+iPTi5Yl8ztf6DQ2mz6zUOz9ozjI="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"julianbrowne","email":"julianbrowne@gmail.com"},"maintainers":[{"name":"julianbrowne","email":"julianbrowne@gmail.com"}]},"0.0.2":{"name":"graffmaker","version":"0.0.2","description":"Graph building DSL for Neo4J","main":"main.js","dependencies":{"neo4j":"~0.2.20","rsvp":"~1.2.0"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/julianbrowne/graffmaker.git"},"keywords":["neo4j","graph"],"author":{"name":"Julian Browne"},"license":"WTFPL","readmeFilename":"README.md","gitHead":"4ada9f54443a7a2d283db11c7b169d308589dd8c","directories":{"example":"examples"},"readme":"\n##Graffmaker\n\nStraighforward data generation tool for neo4J.   \nCreates simple graph structures for testing and playing around with ideas in Neo4J.   \n\n###Using Graffmaker\n\n####Install\n\n    npm install graffmaker\n\n####Include Library\n\nInclude the models library: \n\n    var model = require('graffmaker');\n\n####Defines \"Types\" of Node\n\nDefine the node structures you want to use by calling model.define with all the fields you want to be available in the node:\n\n    var Car    = new model.define(\"make\", \"model\", \"engine\", \"seats\");\n    var Person = new model.define(\"firstName\", \"lstName\");\n    var Home   = new model.define(\"name\");\n\nThis is so you can do this kind of OO thing later:\n\n\tvar myCar = new Car('Honda', 'CRV', '2.2', 5);\n\nthen:\n\n    model.createNode(myCar);\n\nThat's one node in the database. Sorted.\n\n####Make Nodes and Relationships\n\t\nOr actually populate Neo4J with some useful data:\n\n    model.createNode(new Person(\"John\", \"Smith\"))\n        .then(\n            model.connectTo([\n                { node: new Car('Honda', 'CRV', '2.2', 5), rel: 'drives' },\n                { node: new type.Home(\"Flat 2B\"), rel: 'lives-in' }\n            ])\n        );\n\n(note: example code may be found in example-1.js, example-2.js, example-3.js)\n    \nGraph connections can be chained, with the last node created (the Home in the example above), being passed to the next 'then' clause.\n\nRelationships work both ways so\n\n\tmodel.connectTo()\n\njoins the previously created node to the current one and\n\n\tmodel.connectFrom()\n\njoins the current node to the previous\n\nBoth model.connectTo and model.connectFrom take an array of objects of the form (node: …, rel: …} where node is the graph node data and rel is the relationship required between this one and the previous. It's therefore entirely acceptable to skip the pseudo OO step above and simply call:\n\n\tmodel.createNode({name: 'Dr Who', type: 'timelord'})\n    \t.then(model.connectTo([{node: {name: 'cybermen', type: 'cyborg' }, rel: 'enemy'}]))\n    \t.then(model.connectTo([{node: {name: 'Mondas', type: 'planet' }, rel: 'originates'}]));\n\nTo actually do the population first make sure Neo4J is running (lib/models.js expects it to be local machine) and then simply run:\n\n    node {your_js_file}\n\n","_id":"graffmaker@0.0.2","dist":{"shasum":"1cef4c2db2f34909c231f44aa7699d68f5b312fb","tarball":"https://registry.npmjs.org/graffmaker/-/graffmaker-0.0.2.tgz","integrity":"sha512-GEoZyhIjaTid71Zwa4hzfnr3fYy/qSf5D9KBGhaYnWVyPYxLSm4PDJ38KRzhzIFqpPRRv4wdxjLPhVLrA5K3fA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBuoOAgC5SnJfhXbj5EzA5Mb6PuNvvfnS51hOdlcAaXUAiBJWndau11DSD96d+vOkukHCI85wdiiWO3aESH6E/CJ4g=="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"julianbrowne","email":"julianbrowne@gmail.com"},"maintainers":[{"name":"julianbrowne","email":"julianbrowne@gmail.com"}]},"0.0.3":{"name":"graffmaker","version":"0.0.3","description":"Graph building DSL for Neo4J","main":"main.js","dependencies":{"neo4j":"~0.2.20","rsvp":"~1.2.0"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/julianbrowne/graffmaker.git"},"keywords":["neo4j","graph"],"author":{"name":"Julian Browne"},"license":"WTFPL","readmeFilename":"README.md","gitHead":"4ada9f54443a7a2d283db11c7b169d308589dd8c","directories":{"example":"examples"},"readme":"\n##Graffmaker\n\nStraighforward data generation tool for neo4J.   \nCreates simple graph structures for testing and playing around with ideas in Neo4J.   \n\n###Using Graffmaker\n\n####Install\n\n    npm install graffmaker\n\n####Include Library\n\nInclude the graffmaker library: \n\n    var gm = require('graffmaker');\n\nConnect to Neo4J:\n\n    var model = gm.connect();       // connects to 'http://localhost:7474'\n\nor\n\n    var model = gm.connect('http://host:port');\n\nNow you have a model object to do stuff with\n\n####Defines \"Types\" of Node\n\nDefine the node structures you want to use by calling model.define with all the fields you want to be available in the node:\n\n    var Car    = new model.define(\"make\", \"model\", \"engine\", \"seats\");\n    var Person = new model.define(\"firstName\", \"lstName\");\n    var Home   = new model.define(\"name\");\n\nThis is so you can do this kind of OO thing later:\n\n    var myCar = new Car('Honda', 'CRV', '2.2', 5);\n\nthen:\n\n    model.createNode(myCar);\n\nThat's one node in the database. Sorted.\n\n####Make Nodes and Relationships\n    \nOr actually populate Neo4J with some useful data:\n\n    model.createNode(new Person(\"John\", \"Smith\"))\n        .then(\n            model.connectTo([\n                { node: new Car('Honda', 'CRV', '2.2', 5), rel: 'drives' },\n                { node: new type.Home(\"Flat 2B\"), rel: 'lives-in' }\n            ])\n        );\n\n(note: example code may be found in example-1.js, example-2.js, example-3.js)\n    \nGraph connections can be chained, with the last node created (the Home in the example above), being passed to the next 'then' clause.\n\nRelationships work both ways so\n\n    model.connectTo()\n\njoins the previously created node to the current one and\n\n    model.connectFrom()\n\njoins the current node to the previous\n\nBoth model.connectTo and model.connectFrom take an array of objects of the form (node: …, rel: …} where node is the graph node data and rel is the relationship required between this one and the previous. It's therefore entirely acceptable to skip the pseudo OO step above and simply call:\n\n    model.createNode({name: 'Dr Who', type: 'timelord'})\n        .then(model.connectTo([{node: {name: 'cybermen', type: 'cyborg' }, rel: 'enemy'}]))\n        .then(model.connectTo([{node: {name: 'Mondas', type: 'planet' }, rel: 'originates'}]));\n\nTo actually do the population first make sure Neo4J is running (lib/models.js expects it to be local machine) and then simply run:\n\n    node {your_js_file}\n\n","_id":"graffmaker@0.0.3","dist":{"shasum":"68b36fb01fe3cdd5ea8890f583eb1b8c47a5cd62","tarball":"https://registry.npmjs.org/graffmaker/-/graffmaker-0.0.3.tgz","integrity":"sha512-cq3udu1GzrcwaBaHisZkLKLqSSs0/clTl1H0dJ+VqaZiQX1QuZJhAja+IZMYA4zWLqOurJcvL4uVi2dPLy8T9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEksSP33k1KmmLn2Weuai1FlpOkGds1wvnKSmULv+t3eAiEAx4XcelW4DMFgiUkBHkxZnwurz5iyKfhpt7nKu/z0dEo="}]},"_npmVersion":"1.1.71","_npmUser":{"name":"julianbrowne","email":"julianbrowne@gmail.com"},"maintainers":[{"name":"julianbrowne","email":"julianbrowne@gmail.com"}]},"0.0.4":{"name":"graffmaker","version":"0.0.4","description":"Graph building DSL for Neo4J","main":"main.js","dependencies":{"neo4j":"~0.2.20","rsvp":"~1.2.0"},"devDependencies":{},"repository":{"type":"git","url":"https://github.com/julianbrowne/graffmaker.git"},"keywords":["neo4j","graph"],"author":{"name":"Julian Browne"},"license":"WTFPL","readmeFilename":"README.md","gitHead":"4ada9f54443a7a2d283db11c7b169d308589dd8c","directories":{"example":"examples"},"readme":"\n##Graffmaker\n\nStraighforward data generation tool for neo4J.   \nCreates simple graph structures for testing and playing around with ideas in Neo4J.   \n\n###Using Graffmaker\n\n####Install\n\n    npm install graffmaker\n\n####Include Library\n\nInclude the graffmaker library: \n\n    var gm = require('graffmaker');\n\nConnect to Neo4J:\n\n    var model = gm.connect();       // connects to 'http://localhost:7474'\n\nor\n\n    var model = gm.connect('http://host:port');\n\nNow you have a model object to do stuff with\n\n####Defines \"Types\" of Node\n\nDefine the node structures you want to use by calling model.define with all the fields you want to be available in the node:\n\n    var Car    = new model.define(\"make\", \"model\", \"engine\", \"seats\");\n    var Person = new model.define(\"firstName\", \"lstName\");\n    var Home   = new model.define(\"name\");\n\nThis is so you can do this kind of OO thing later:\n\n    var myCar = new Car('Honda', 'CRV', '2.2', 5);\n\nthen:\n\n    model.createNode(myCar);\n\nThat's one node in the database. Sorted.\n\n####Make Nodes and Relationships\n    \nOr actually populate Neo4J with some useful data:\n\n    model.createNode(new Person(\"John\", \"Smith\"))\n        .then(\n            model.connectTo([\n                { node: new Car('Honda', 'CRV', '2.2', 5), rel: 'drives' },\n                { node: new type.Home(\"Flat 2B\"), rel: 'lives-in' }\n            ])\n        );\n\n(note: example code may be found in example-1.js, example-2.js, example-3.js)\n    \nGraph connections can be chained, with the last node created (the Home in the example above), being passed to the next 'then' clause.\n\nRelationships work both ways so\n\n    model.connectTo()\n\njoins the previously created node to the current one and\n\n    model.connectFrom()\n\njoins the current node to the previous\n\nBoth model.connectTo and model.connectFrom take an array of objects of the form (node: …, rel: …} where node is the graph node data and rel is the relationship required between this one and the previous. It's therefore entirely acceptable to skip the pseudo OO step above and simply call:\n\n    model.createNode({name: 'Dr Who', type: 'timelord'})\n        .then(model.connectTo([{node: {name: 'cybermen', type: 'cyborg' }, rel: 'enemy'}]))\n        .then(model.connectTo([{node: {name: 'Mondas', type: 'planet' }, rel: 'originates'}]));\n\nTo actually do the population first make sure Neo4J is running (lib/models.js expects it to be local machine) and then simply run:\n\n    node {your_js_file}\n\n","_id":"graffmaker@0.0.4","dist":{"shasum":"85f7e4b0cf7c0dae669d9c20d676613faa62cbff","tarball":"https://registry.npmjs.org/graffmaker/-/graffmaker-0.0.4.tgz","integrity":"sha512-Kn5TJAOazDzxiqmg1wyNiu4vjFjj/++p0Xc5a5HhyWlBhF3DVjdwr8ju2Z6W8u3TDyLI3S8xck+9V8FjX4bO6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChpu8WMpPeuW0/WAnLThovJIsxi7jj3B58jtVialOiiQIhAOwUe6ACbGvkTc1lOtxe4rO3aOKeOGcC8mvyCBhja3ot"}]},"_npmVersion":"1.1.71","_npmUser":{"name":"julianbrowne","email":"julianbrowne@gmail.com"},"maintainers":[{"name":"julianbrowne","email":"julianbrowne@gmail.com"}]}},"readme":"\n##Graffmaker\n\nStraighforward data generation tool for neo4J.   \nCreates simple graph structures for testing and playing around with ideas in Neo4J.   \n\n###Using Graffmaker\n\n####Install\n\n    npm install graffmaker\n\n####Include Library\n\nInclude the models library: \n\n    var model = require('graffmaker');\n\n####Defines \"Types\" of Node\n\nDefine the node structures you want to use by calling model.define with all the fields you want to be available in the node:\n\n    var Car    = new model.define(\"make\", \"model\", \"engine\", \"seats\");\n    var Person = new model.define(\"firstName\", \"lstName\");\n    var Home   = new model.define(\"name\");\n\nThis is so you can do this kind of OO thing later:\n\n\tvar myCar = new Car('Honda', 'CRV', '2.2', 5);\n\nthen:\n\n    model.createNode(myCar);\n\nThat's one node in the database. Sorted.\n\n####Make Nodes and Relationships\n\t\nOr actually populate Neo4J with some useful data:\n\n    model.createNode(new Person(\"John\", \"Smith\"))\n        .then(\n            model.connectTo([\n                { node: new Car('Honda', 'CRV', '2.2', 5), rel: 'drives' },\n                { node: new type.Home(\"Flat 2B\"), rel: 'lives-in' }\n            ])\n        );\n\n(note: example code may be found in example-1.js, example-2.js, example-3.js)\n    \nGraph connections can be chained, with the last node created (the Home in the example above), being passed to the next 'then' clause.\n\nRelationships work both ways so\n\n\tmodel.connectTo()\n\njoins the previously created node to the current one and\n\n\tmodel.connectFrom()\n\njoins the current node to the previous\n\nBoth model.connectTo and model.connectFrom take an array of objects of the form (node: …, rel: …} where node is the graph node data and rel is the relationship required between this one and the previous. It's therefore entirely acceptable to skip the pseudo OO step above and simply call:\n\n\tmodel.createNode({name: 'Dr Who', type: 'timelord'})\n    \t.then(model.connectTo([{node: {name: 'cybermen', type: 'cyborg' }, rel: 'enemy'}]))\n    \t.then(model.connectTo([{node: {name: 'Mondas', type: 'planet' }, rel: 'originates'}]));\n\nTo actually do the population first make sure Neo4J is running (lib/models.js expects it to be local machine) and then simply run:\n\n    node {your_js_file}\n\n","maintainers":[{"name":"julianbrowne","email":"julianbrowne@gmail.com"}],"time":{"modified":"2022-06-18T13:47:33.854Z","created":"2013-06-28T12:11:07.646Z","0.0.0":"2013-06-28T12:11:09.919Z","0.0.1":"2013-06-28T12:23:32.075Z","0.0.2":"2013-06-28T12:30:43.056Z","0.0.3":"2013-06-28T13:55:02.403Z","0.0.4":"2013-06-28T14:00:50.222Z"},"author":{"name":"Julian Browne"},"repository":{"type":"git","url":"https://github.com/julianbrowne/graffmaker.git"},"users":{"bags307":true}}