{"action":"created","comment":{"url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/comments/53689303","id":53689303,"diff_hunk":"@@ -5,50 +5,62 @@ var Promise = require('promise');\n var Handlebars = require('handlebars');\n var rdfstore = require('rdfstore');\n \n-var basenode = require('../src/base-node');\n-var promiseComponent = require('../src/promise-component');\n+var promiseOutput = require('../src/promise-output');\n+var componentFactory = require('../src/noflo-component-factory');\n \n-exports.getComponent = promiseComponent({\n+exports.getComponent = componentFactory({\n     description: \"Executes the given SPARQL query on the provided RDF graph and returns the result\",\n     icon: 'cog',\n+    outPorts: promiseOutput.outPorts,\n     inPorts: {\n         parameters: {\n             description: \"A map of template parameters\",\n             datatype: 'object',\n-            ondata: basenode.assign('parameters')\n+            ondata: function(parameters) {\n+                this.nodeInstance.parameters = parameters;\n+            }\n         },\n         query: {\n             description: \"SPARQL query template string in handlebars syntax\",\n             datatype: 'string',\n             required: true,\n-            ondata: basenode.assign('query', Handlebars.compile)\n+            ondata: function(query) {\n+                this.nodeInstance.query = Handlebars.compile(query);\n+            }\n         },\n         \"default\": {\n             description: \"Graph URI for the default dataset\",\n             datatype: 'string',\n-            ondata: basenode.assign('defaultURIs', basenode.push)\n+            ondata: function(defaultURI) {\n+                this.nodeInstance.defaultURIs = this.nodeInstance.defaultURIs || [];\n+                this.nodeInstance.defaultURIs.push(defaultURI);\n+            }\n         },\n         namespaces: {\n             description: \"Graph URI for the named dataset\",\n             datatype: 'string',\n-            ondata: basenode.assign('namespacesURIs', basenode.push)\n+            ondata: function(namespacesURI) {\n+                this.nodeInstance.namespacesURIs = this.nodeInstance.namespacesURIs || [];\n+                this.nodeInstance.namespacesURIs.push(namespacesURI);\n+            }\n         },\n-        'in': {\n+        input: {\n             description: \"RDF JS Interface Graph object\",\n             datatype: 'object',\n             required: true,\n-            ondata: execute\n+            ondata: promiseOutput(execute)\n         }\n     }\n });\n \n \n function execute(graph) {","path":"components/rdf-query.js","position":62,"original_position":62,"commit_id":"bdebd3e8590bc3abc846a0de8f0bbaceac2b0385","original_commit_id":"bdebd3e8590bc3abc846a0de8f0bbaceac2b0385","user":{"login":"glenna-m","id":14930078,"avatar_url":"https://avatars.githubusercontent.com/u/14930078?v=3","gravatar_id":"","url":"https://api.github.com/users/glenna-m","html_url":"https://github.com/glenna-m","followers_url":"https://api.github.com/users/glenna-m/followers","following_url":"https://api.github.com/users/glenna-m/following{/other_user}","gists_url":"https://api.github.com/users/glenna-m/gists{/gist_id}","starred_url":"https://api.github.com/users/glenna-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenna-m/subscriptions","organizations_url":"https://api.github.com/users/glenna-m/orgs","repos_url":"https://api.github.com/users/glenna-m/repos","events_url":"https://api.github.com/users/glenna-m/events{/privacy}","received_events_url":"https://api.github.com/users/glenna-m/received_events","type":"User","site_admin":false},"body":"Can we get standard and add comments on major functions like this?   ","created_at":"2016-02-22T20:41:20Z","updated_at":"2016-02-22T20:41:20Z","html_url":"https://github.com/rdf-pipeline/noflo-rdf-components/pull/41#discussion_r53689303","pull_request_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/comments/53689303"},"html":{"href":"https://github.com/rdf-pipeline/noflo-rdf-components/pull/41#discussion_r53689303"},"pull_request":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41","id":59987173,"html_url":"https://github.com/rdf-pipeline/noflo-rdf-components/pull/41","diff_url":"https://github.com/rdf-pipeline/noflo-rdf-components/pull/41.diff","patch_url":"https://github.com/rdf-pipeline/noflo-rdf-components/pull/41.patch","issue_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/41","number":41,"state":"open","locked":false,"title":"Remove promise-component","user":{"login":"jamesrdf","id":881923,"avatar_url":"https://avatars.githubusercontent.com/u/881923?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesrdf","html_url":"https://github.com/jamesrdf","followers_url":"https://api.github.com/users/jamesrdf/followers","following_url":"https://api.github.com/users/jamesrdf/following{/other_user}","gists_url":"https://api.github.com/users/jamesrdf/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesrdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesrdf/subscriptions","organizations_url":"https://api.github.com/users/jamesrdf/orgs","repos_url":"https://api.github.com/users/jamesrdf/repos","events_url":"https://api.github.com/users/jamesrdf/events{/privacy}","received_events_url":"https://api.github.com/users/jamesrdf/received_events","type":"User","site_admin":false},"body":"Replace all usages of promise-component with promise-output","created_at":"2016-02-19T18:23:25Z","updated_at":"2016-02-22T20:41:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c26e5dd57ca38ea355cb0cdfea190ccd58f1fc9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41/commits","review_comments_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41/comments","review_comment_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/41/comments","statuses_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/statuses/bdebd3e8590bc3abc846a0de8f0bbaceac2b0385","head":{"label":"rdf-pipeline:promise-component","ref":"promise-component","sha":"bdebd3e8590bc3abc846a0de8f0bbaceac2b0385","user":{"login":"rdf-pipeline","id":10980355,"avatar_url":"https://avatars.githubusercontent.com/u/10980355?v=3","gravatar_id":"","url":"https://api.github.com/users/rdf-pipeline","html_url":"https://github.com/rdf-pipeline","followers_url":"https://api.github.com/users/rdf-pipeline/followers","following_url":"https://api.github.com/users/rdf-pipeline/following{/other_user}","gists_url":"https://api.github.com/users/rdf-pipeline/gists{/gist_id}","starred_url":"https://api.github.com/users/rdf-pipeline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdf-pipeline/subscriptions","organizations_url":"https://api.github.com/users/rdf-pipeline/orgs","repos_url":"https://api.github.com/users/rdf-pipeline/repos","events_url":"https://api.github.com/users/rdf-pipeline/events{/privacy}","received_events_url":"https://api.github.com/users/rdf-pipeline/received_events","type":"Organization","site_admin":false},"repo":{"id":46297514,"name":"noflo-rdf-components","full_name":"rdf-pipeline/noflo-rdf-components","owner":{"login":"rdf-pipeline","id":10980355,"avatar_url":"https://avatars.githubusercontent.com/u/10980355?v=3","gravatar_id":"","url":"https://api.github.com/users/rdf-pipeline","html_url":"https://github.com/rdf-pipeline","followers_url":"https://api.github.com/users/rdf-pipeline/followers","following_url":"https://api.github.com/users/rdf-pipeline/following{/other_user}","gists_url":"https://api.github.com/users/rdf-pipeline/gists{/gist_id}","starred_url":"https://api.github.com/users/rdf-pipeline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdf-pipeline/subscriptions","organizations_url":"https://api.github.com/users/rdf-pipeline/orgs","repos_url":"https://api.github.com/users/rdf-pipeline/repos","events_url":"https://api.github.com/users/rdf-pipeline/events{/privacy}","received_events_url":"https://api.github.com/users/rdf-pipeline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rdf-pipeline/noflo-rdf-components","description":"NoFlo components for processing RDF related content","fork":false,"url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components","forks_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/forks","keys_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/teams","hooks_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/hooks","issue_events_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/events{/number}","events_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/events","assignees_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/assignees{/user}","branches_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/branches{/branch}","tags_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/tags","blobs_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/statuses/{sha}","languages_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/languages","stargazers_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/stargazers","contributors_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/contributors","subscribers_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/subscribers","subscription_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/subscription","commits_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/contents/{+path}","compare_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/merges","archive_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/downloads","issues_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues{/number}","pulls_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls{/number}","milestones_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/milestones{/number}","notifications_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/labels{/name}","releases_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/releases{/id}","deployments_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/deployments","created_at":"2015-11-16T19:37:01Z","updated_at":"2016-01-20T18:46:45Z","pushed_at":"2016-02-22T20:25:35Z","git_url":"git://github.com/rdf-pipeline/noflo-rdf-components.git","ssh_url":"git@github.com:rdf-pipeline/noflo-rdf-components.git","clone_url":"https://github.com/rdf-pipeline/noflo-rdf-components.git","svn_url":"https://github.com/rdf-pipeline/noflo-rdf-components","homepage":null,"size":269,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"rdf-pipeline:develop","ref":"develop","sha":"5768831b58da92645d68c95c40d264ce1080a7f7","user":{"login":"rdf-pipeline","id":10980355,"avatar_url":"https://avatars.githubusercontent.com/u/10980355?v=3","gravatar_id":"","url":"https://api.github.com/users/rdf-pipeline","html_url":"https://github.com/rdf-pipeline","followers_url":"https://api.github.com/users/rdf-pipeline/followers","following_url":"https://api.github.com/users/rdf-pipeline/following{/other_user}","gists_url":"https://api.github.com/users/rdf-pipeline/gists{/gist_id}","starred_url":"https://api.github.com/users/rdf-pipeline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdf-pipeline/subscriptions","organizations_url":"https://api.github.com/users/rdf-pipeline/orgs","repos_url":"https://api.github.com/users/rdf-pipeline/repos","events_url":"https://api.github.com/users/rdf-pipeline/events{/privacy}","received_events_url":"https://api.github.com/users/rdf-pipeline/received_events","type":"Organization","site_admin":false},"repo":{"id":46297514,"name":"noflo-rdf-components","full_name":"rdf-pipeline/noflo-rdf-components","owner":{"login":"rdf-pipeline","id":10980355,"avatar_url":"https://avatars.githubusercontent.com/u/10980355?v=3","gravatar_id":"","url":"https://api.github.com/users/rdf-pipeline","html_url":"https://github.com/rdf-pipeline","followers_url":"https://api.github.com/users/rdf-pipeline/followers","following_url":"https://api.github.com/users/rdf-pipeline/following{/other_user}","gists_url":"https://api.github.com/users/rdf-pipeline/gists{/gist_id}","starred_url":"https://api.github.com/users/rdf-pipeline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdf-pipeline/subscriptions","organizations_url":"https://api.github.com/users/rdf-pipeline/orgs","repos_url":"https://api.github.com/users/rdf-pipeline/repos","events_url":"https://api.github.com/users/rdf-pipeline/events{/privacy}","received_events_url":"https://api.github.com/users/rdf-pipeline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rdf-pipeline/noflo-rdf-components","description":"NoFlo components for processing RDF related content","fork":false,"url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components","forks_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/forks","keys_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/teams","hooks_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/hooks","issue_events_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/events{/number}","events_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/events","assignees_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/assignees{/user}","branches_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/branches{/branch}","tags_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/tags","blobs_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/statuses/{sha}","languages_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/languages","stargazers_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/stargazers","contributors_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/contributors","subscribers_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/subscribers","subscription_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/subscription","commits_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/contents/{+path}","compare_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/merges","archive_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/downloads","issues_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues{/number}","pulls_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls{/number}","milestones_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/milestones{/number}","notifications_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/labels{/name}","releases_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/releases{/id}","deployments_url":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/deployments","created_at":"2015-11-16T19:37:01Z","updated_at":"2016-01-20T18:46:45Z","pushed_at":"2016-02-22T20:25:35Z","git_url":"git://github.com/rdf-pipeline/noflo-rdf-components.git","ssh_url":"git@github.com:rdf-pipeline/noflo-rdf-components.git","clone_url":"https://github.com/rdf-pipeline/noflo-rdf-components.git","svn_url":"https://github.com/rdf-pipeline/noflo-rdf-components","homepage":null,"size":269,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41"},"html":{"href":"https://github.com/rdf-pipeline/noflo-rdf-components/pull/41"},"issue":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/41"},"comments":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/rdf-pipeline/noflo-rdf-components/statuses/bdebd3e8590bc3abc846a0de8f0bbaceac2b0385"}}}}