{"action":"created","comment":{"url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/comments/32208064","id":32208064,"diff_hunk":"@@ -0,0 +1,132 @@\n+package model.process.analysis.operations.comparisons;\n+\n+import model.data.DataColumn;\n+import model.data.DataModel;\n+import model.data.DataTable;\n+import model.data.DataTableBuilder;\n+import model.data.Table;\n+import model.data.describer.RowValueDescriber;\n+import model.data.value.DataValue;\n+import model.exceptions.InputMismatchException;\n+import model.language.ColumnIdentifier;\n+import model.language.Identifier;\n+import model.process.DataProcess;\n+import model.process.SortProcess;\n+import model.process.SortProcess.Order;\n+import model.process.analysis.operations.Connection;\n+import model.process.analysis.operations.Event;\n+import model.process.setOperations.FullJoin;\n+import model.process.setOperations.Join;\n+\n+/**\n+ * This class will determine a relation between events. Relation will be shown\n+ * by chronologically sorting events.\n+ * \n+ * @author Louis Gosschalk 26-05-2015\n+ */\n+public class LagSequential {\n+\n+\tprivate DataTable tableA;\n+\tprivate DataTable tableB;\n+\tprivate DataTable result;\n+\n+\tprivate RowValueDescriber<DataValue> colA;\n+\tprivate RowValueDescriber<DataValue> colB;\n+\n+\t/**\n+\t * This class constructs the LSA.\n+\t * \n+\t * @param eventA\n+\t *            The first event\n+\t * @param dateA\n+\t *            The column of the dateValues (first event)\n+\t * @param eventB\n+\t *            The second event\n+\t * @param dateB\n+\t *            The column of the dateValues (second event)\n+\t * @return\n+\t */\n+\tpublic LagSequential(Event eventA,\n+\t\t\tRowValueDescriber<DataValue> dateA, Event eventB,\n+\t\t\tRowValueDescriber<DataValue> dateB) {\n+\t\ttableA = checkTable(eventA.create());\n+\t\ttableB = checkTable(eventB.create());\n+\t\tthis.colA = dateA;\n+\t\tthis.colB = dateB;\n+\n+\t\tif (tableA.getRowCount() == 0 || tableB.getRowCount() == 0) {\n+\t\t\tthrow new InputMismatchException(\"Empty event input.\");\n+\t\t}\n+\n+\t\tOrder order = Order.ASCENDING;\n+\n+\t\tSortProcess sortA = new SortProcess(colA, order);\n+\t\tsortA.setInput(tableA);\n+\t\ttableA = (DataTable) sortA.process();\n+\t\t\n+\t\tSortProcess sortB = new SortProcess(colB, order);\n+\t\tsortB.setInput(tableB);\n+\t\ttableB = (DataTable) sortB.process();\n+\t\t\n+\t\tDataModel model = new DataModel();\n+\t\tmodel.add(tableA);\n+\t\tmodel.add(tableB);\n+\t\t\n+\t\tSystem.out.println(\"tabel a \"+tableA.getRowCount() + \" tabel b \"+tableB.getRowCount());\n+\t\t\n+\n+\t\t// join the tables and sort chrono\n+\t\tIdentifier<DataTable> a = new Identifier<DataTable>(tableA.getName());\n+\t\tIdentifier<DataColumn> c = new Identifier<DataColumn>(colA.toString());\n+\t\tColumnIdentifier columnid = new ColumnIdentifier(a,c);\n+\t\t\n+\t\tIdentifier<DataTable> a2 = new Identifier<DataTable>(tableB.getName());\n+\t\tIdentifier<DataColumn> c2 = new Identifier<DataColumn>(colB.toString());\n+\t\tColumnIdentifier columnid2 = new ColumnIdentifier(a2,c2);\n+\t\t\n+\t\tConnection con = new Connection(\"con\", a, columnid, a2, columnid2);\n+\t\tcon.setDataModel(model);\n+\t\tresult = (DataTable) con.process();","path":"src/main/java/model/process/analysis/operations/comparisons/LagSequential.java","position":89,"original_position":89,"commit_id":"aa8b9401d8253551afb99fad9593704c4fadb7c0","original_commit_id":"aa8b9401d8253551afb99fad9593704c4fadb7c0","user":{"login":"louisgosschalk","id":6196430,"avatar_url":"https://avatars.githubusercontent.com/u/6196430?v=3","gravatar_id":"","url":"https://api.github.com/users/louisgosschalk","html_url":"https://github.com/louisgosschalk","followers_url":"https://api.github.com/users/louisgosschalk/followers","following_url":"https://api.github.com/users/louisgosschalk/following{/other_user}","gists_url":"https://api.github.com/users/louisgosschalk/gists{/gist_id}","starred_url":"https://api.github.com/users/louisgosschalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louisgosschalk/subscriptions","organizations_url":"https://api.github.com/users/louisgosschalk/orgs","repos_url":"https://api.github.com/users/louisgosschalk/repos","events_url":"https://api.github.com/users/louisgosschalk/events{/privacy}","received_events_url":"https://api.github.com/users/louisgosschalk/received_events","type":"User","site_admin":false},"body":"Hier wordt een nullpointer gethrowed ","created_at":"2015-06-11T10:31:02Z","updated_at":"2015-06-11T10:31:02Z","html_url":"https://github.com/clanghout/Health-Informatics-3/pull/184#discussion_r32208064","pull_request_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184","_links":{"self":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/comments/32208064"},"html":{"href":"https://github.com/clanghout/Health-Informatics-3/pull/184#discussion_r32208064"},"pull_request":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184"}}},"pull_request":{"url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184","id":37449059,"html_url":"https://github.com/clanghout/Health-Informatics-3/pull/184","diff_url":"https://github.com/clanghout/Health-Informatics-3/pull/184.diff","patch_url":"https://github.com/clanghout/Health-Informatics-3/pull/184.patch","issue_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/184","number":184,"state":"open","locked":false,"title":"Comparison","user":{"login":"louisgosschalk","id":6196430,"avatar_url":"https://avatars.githubusercontent.com/u/6196430?v=3","gravatar_id":"","url":"https://api.github.com/users/louisgosschalk","html_url":"https://github.com/louisgosschalk","followers_url":"https://api.github.com/users/louisgosschalk/followers","following_url":"https://api.github.com/users/louisgosschalk/following{/other_user}","gists_url":"https://api.github.com/users/louisgosschalk/gists{/gist_id}","starred_url":"https://api.github.com/users/louisgosschalk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louisgosschalk/subscriptions","organizations_url":"https://api.github.com/users/louisgosschalk/orgs","repos_url":"https://api.github.com/users/louisgosschalk/repos","events_url":"https://api.github.com/users/louisgosschalk/events{/privacy}","received_events_url":"https://api.github.com/users/louisgosschalk/received_events","type":"User","site_admin":false},"body":"Ik blijf hier een nullpointer in krijgen en ik kom er niet achter waarom. Ik snap niet helemaal hoe connection opgebouwd wordt en roep het waarschijnlijk verkeerd aan.","created_at":"2015-06-11T10:25:24Z","updated_at":"2015-06-11T10:31:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0fc3918995bedeef384cdbbd7e40c3bfcfc0759","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184/commits","review_comments_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184/comments","review_comment_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/184/comments","statuses_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/statuses/aa8b9401d8253551afb99fad9593704c4fadb7c0","head":{"label":"clanghout:comparison","ref":"comparison","sha":"aa8b9401d8253551afb99fad9593704c4fadb7c0","user":{"login":"clanghout","id":5969237,"avatar_url":"https://avatars.githubusercontent.com/u/5969237?v=3","gravatar_id":"","url":"https://api.github.com/users/clanghout","html_url":"https://github.com/clanghout","followers_url":"https://api.github.com/users/clanghout/followers","following_url":"https://api.github.com/users/clanghout/following{/other_user}","gists_url":"https://api.github.com/users/clanghout/gists{/gist_id}","starred_url":"https://api.github.com/users/clanghout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clanghout/subscriptions","organizations_url":"https://api.github.com/users/clanghout/orgs","repos_url":"https://api.github.com/users/clanghout/repos","events_url":"https://api.github.com/users/clanghout/events{/privacy}","received_events_url":"https://api.github.com/users/clanghout/received_events","type":"User","site_admin":false},"repo":{"id":34447605,"name":"Health-Informatics-3","full_name":"clanghout/Health-Informatics-3","owner":{"login":"clanghout","id":5969237,"avatar_url":"https://avatars.githubusercontent.com/u/5969237?v=3","gravatar_id":"","url":"https://api.github.com/users/clanghout","html_url":"https://github.com/clanghout","followers_url":"https://api.github.com/users/clanghout/followers","following_url":"https://api.github.com/users/clanghout/following{/other_user}","gists_url":"https://api.github.com/users/clanghout/gists{/gist_id}","starred_url":"https://api.github.com/users/clanghout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clanghout/subscriptions","organizations_url":"https://api.github.com/users/clanghout/orgs","repos_url":"https://api.github.com/users/clanghout/repos","events_url":"https://api.github.com/users/clanghout/events{/privacy}","received_events_url":"https://api.github.com/users/clanghout/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clanghout/Health-Informatics-3","description":"","fork":false,"url":"https://api.github.com/repos/clanghout/Health-Informatics-3","forks_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/forks","keys_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/teams","hooks_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/hooks","issue_events_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/events{/number}","events_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/events","assignees_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/assignees{/user}","branches_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/branches{/branch}","tags_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/tags","blobs_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/statuses/{sha}","languages_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/languages","stargazers_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/stargazers","contributors_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/contributors","subscribers_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/subscribers","subscription_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/subscription","commits_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/contents/{+path}","compare_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/merges","archive_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/downloads","issues_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues{/number}","pulls_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls{/number}","milestones_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/milestones{/number}","notifications_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/labels{/name}","releases_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/releases{/id}","created_at":"2015-04-23T09:44:17Z","updated_at":"2015-05-28T09:00:34Z","pushed_at":"2015-06-11T10:29:48Z","git_url":"git://github.com/clanghout/Health-Informatics-3.git","ssh_url":"git@github.com:clanghout/Health-Informatics-3.git","clone_url":"https://github.com/clanghout/Health-Informatics-3.git","svn_url":"https://github.com/clanghout/Health-Informatics-3","homepage":null,"size":16651,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":6,"default_branch":"master"}},"base":{"label":"clanghout:master","ref":"master","sha":"d81ebc0b0ab82dc02ae73618304a05ae99326799","user":{"login":"clanghout","id":5969237,"avatar_url":"https://avatars.githubusercontent.com/u/5969237?v=3","gravatar_id":"","url":"https://api.github.com/users/clanghout","html_url":"https://github.com/clanghout","followers_url":"https://api.github.com/users/clanghout/followers","following_url":"https://api.github.com/users/clanghout/following{/other_user}","gists_url":"https://api.github.com/users/clanghout/gists{/gist_id}","starred_url":"https://api.github.com/users/clanghout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clanghout/subscriptions","organizations_url":"https://api.github.com/users/clanghout/orgs","repos_url":"https://api.github.com/users/clanghout/repos","events_url":"https://api.github.com/users/clanghout/events{/privacy}","received_events_url":"https://api.github.com/users/clanghout/received_events","type":"User","site_admin":false},"repo":{"id":34447605,"name":"Health-Informatics-3","full_name":"clanghout/Health-Informatics-3","owner":{"login":"clanghout","id":5969237,"avatar_url":"https://avatars.githubusercontent.com/u/5969237?v=3","gravatar_id":"","url":"https://api.github.com/users/clanghout","html_url":"https://github.com/clanghout","followers_url":"https://api.github.com/users/clanghout/followers","following_url":"https://api.github.com/users/clanghout/following{/other_user}","gists_url":"https://api.github.com/users/clanghout/gists{/gist_id}","starred_url":"https://api.github.com/users/clanghout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clanghout/subscriptions","organizations_url":"https://api.github.com/users/clanghout/orgs","repos_url":"https://api.github.com/users/clanghout/repos","events_url":"https://api.github.com/users/clanghout/events{/privacy}","received_events_url":"https://api.github.com/users/clanghout/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/clanghout/Health-Informatics-3","description":"","fork":false,"url":"https://api.github.com/repos/clanghout/Health-Informatics-3","forks_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/forks","keys_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/teams","hooks_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/hooks","issue_events_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/events{/number}","events_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/events","assignees_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/assignees{/user}","branches_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/branches{/branch}","tags_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/tags","blobs_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/statuses/{sha}","languages_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/languages","stargazers_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/stargazers","contributors_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/contributors","subscribers_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/subscribers","subscription_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/subscription","commits_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/contents/{+path}","compare_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/merges","archive_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/downloads","issues_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues{/number}","pulls_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls{/number}","milestones_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/milestones{/number}","notifications_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/labels{/name}","releases_url":"https://api.github.com/repos/clanghout/Health-Informatics-3/releases{/id}","created_at":"2015-04-23T09:44:17Z","updated_at":"2015-05-28T09:00:34Z","pushed_at":"2015-06-11T10:29:48Z","git_url":"git://github.com/clanghout/Health-Informatics-3.git","ssh_url":"git@github.com:clanghout/Health-Informatics-3.git","clone_url":"https://github.com/clanghout/Health-Informatics-3.git","svn_url":"https://github.com/clanghout/Health-Informatics-3","homepage":null,"size":16651,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184"},"html":{"href":"https://github.com/clanghout/Health-Informatics-3/pull/184"},"issue":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/184"},"comments":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/issues/184/comments"},"review_comments":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184/comments"},"review_comment":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/pulls/184/commits"},"statuses":{"href":"https://api.github.com/repos/clanghout/Health-Informatics-3/statuses/aa8b9401d8253551afb99fad9593704c4fadb7c0"}}}}