{"action":"created","comment":{"url":"https://api.github.com/repos/arhangeldim/messenger/pulls/comments/58306694","id":58306694,"diff_hunk":"@@ -1,29 +1,71 @@\n package arhangel.dim.container;\n \n+import arhangel.dim.container.beans.Gear;\n+import org.xml.sax.SAXException;\n+\n+import javax.xml.parsers.ParserConfigurationException;\n+import java.io.IOException;\n import java.lang.reflect.Field;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n import java.util.List;\n+import java.util.Map;\n \n /**\n  * Используйте ваш xml reader чтобы прочитать конфиг и получить список бинов\n  */\n public class Container {\n     private List<Bean> beans;\n+    private Map<String, Object> objByClassName = new HashMap<>();\n+    private Map<String, Object> objByName = new HashMap<>();\n \n     /**\n      * Если не получается считать конфиг, то бросьте исключение\n-     * @throws InvalidConfigurationException неверный конфиг\n+     * //* @throws InvalidConfigurationException неверный конфиг\n      */\n-    public Container(String pathToConfig) throws InvalidConfigurationException {\n-\n-        // вызываем BeanXmlReader\n+    public Container(String pathToConfig) throws Exception {\n+        beans = new ArrayList<>();\n+        BeanXmlReader beanParser = new BeanXmlReader();\n+        try {\n+            List<BeanVertex> vertices = new ArrayList<>();\n+            BeanGraph graph = new BeanGraph();\n+            List<Bean> beanList = (new BeanXmlReader()).parseBeans(\"test.xml\");\n+            for (Bean bean : beanList) {\n+                vertices.add(graph.addVertex(bean));\n+            }\n+            for (BeanVertex parentVertex : vertices) {","path":"src/main/java/arhangel/dim/container/Container.java","position":40,"original_position":40,"commit_id":"e7a622a21e917b6e4d52cf6496f329e147e5e5c0","original_commit_id":"e7a622a21e917b6e4d52cf6496f329e147e5e5c0","user":{"login":"arhangeldim","id":1112038,"avatar_url":"https://avatars.githubusercontent.com/u/1112038?v=3","gravatar_id":"","url":"https://api.github.com/users/arhangeldim","html_url":"https://github.com/arhangeldim","followers_url":"https://api.github.com/users/arhangeldim/followers","following_url":"https://api.github.com/users/arhangeldim/following{/other_user}","gists_url":"https://api.github.com/users/arhangeldim/gists{/gist_id}","starred_url":"https://api.github.com/users/arhangeldim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhangeldim/subscriptions","organizations_url":"https://api.github.com/users/arhangeldim/orgs","repos_url":"https://api.github.com/users/arhangeldim/repos","events_url":"https://api.github.com/users/arhangeldim/events{/privacy}","received_events_url":"https://api.github.com/users/arhangeldim/received_events","type":"User","site_admin":false},"body":"Можете пояснить алгоритм коментом? Между всеми бинами проводите ребра?","created_at":"2016-04-03T08:50:49Z","updated_at":"2016-04-03T08:50:49Z","html_url":"https://github.com/arhangeldim/messenger/pull/12#discussion_r58306694","pull_request_url":"https://api.github.com/repos/arhangeldim/messenger/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/arhangeldim/messenger/pulls/comments/58306694"},"html":{"href":"https://github.com/arhangeldim/messenger/pull/12#discussion_r58306694"},"pull_request":{"href":"https://api.github.com/repos/arhangeldim/messenger/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/arhangeldim/messenger/pulls/12","id":62903689,"html_url":"https://github.com/arhangeldim/messenger/pull/12","diff_url":"https://github.com/arhangeldim/messenger/pull/12.diff","patch_url":"https://github.com/arhangeldim/messenger/pull/12.patch","issue_url":"https://api.github.com/repos/arhangeldim/messenger/issues/12","number":12,"state":"open","locked":false,"title":"Baranov AV Task-1","user":{"login":"BaranovAV","id":9649994,"avatar_url":"https://avatars.githubusercontent.com/u/9649994?v=3","gravatar_id":"","url":"https://api.github.com/users/BaranovAV","html_url":"https://github.com/BaranovAV","followers_url":"https://api.github.com/users/BaranovAV/followers","following_url":"https://api.github.com/users/BaranovAV/following{/other_user}","gists_url":"https://api.github.com/users/BaranovAV/gists{/gist_id}","starred_url":"https://api.github.com/users/BaranovAV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaranovAV/subscriptions","organizations_url":"https://api.github.com/users/BaranovAV/orgs","repos_url":"https://api.github.com/users/BaranovAV/repos","events_url":"https://api.github.com/users/BaranovAV/events{/privacy}","received_events_url":"https://api.github.com/users/BaranovAV/received_events","type":"User","site_admin":false},"body":"task 1","created_at":"2016-03-15T13:19:24Z","updated_at":"2016-04-03T08:50:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25f4925ce6c4fbd4f5ab33f60c0aa78abf6b42cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/arhangeldim/messenger/pulls/12/commits","review_comments_url":"https://api.github.com/repos/arhangeldim/messenger/pulls/12/comments","review_comment_url":"https://api.github.com/repos/arhangeldim/messenger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arhangeldim/messenger/issues/12/comments","statuses_url":"https://api.github.com/repos/arhangeldim/messenger/statuses/e7a622a21e917b6e4d52cf6496f329e147e5e5c0","head":{"label":"BaranovAV:BaranovAV-container","ref":"BaranovAV-container","sha":"e7a622a21e917b6e4d52cf6496f329e147e5e5c0","user":{"login":"BaranovAV","id":9649994,"avatar_url":"https://avatars.githubusercontent.com/u/9649994?v=3","gravatar_id":"","url":"https://api.github.com/users/BaranovAV","html_url":"https://github.com/BaranovAV","followers_url":"https://api.github.com/users/BaranovAV/followers","following_url":"https://api.github.com/users/BaranovAV/following{/other_user}","gists_url":"https://api.github.com/users/BaranovAV/gists{/gist_id}","starred_url":"https://api.github.com/users/BaranovAV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaranovAV/subscriptions","organizations_url":"https://api.github.com/users/BaranovAV/orgs","repos_url":"https://api.github.com/users/BaranovAV/repos","events_url":"https://api.github.com/users/BaranovAV/events{/privacy}","received_events_url":"https://api.github.com/users/BaranovAV/received_events","type":"User","site_admin":false},"repo":{"id":53685312,"name":"messenger","full_name":"BaranovAV/messenger","owner":{"login":"BaranovAV","id":9649994,"avatar_url":"https://avatars.githubusercontent.com/u/9649994?v=3","gravatar_id":"","url":"https://api.github.com/users/BaranovAV","html_url":"https://github.com/BaranovAV","followers_url":"https://api.github.com/users/BaranovAV/followers","following_url":"https://api.github.com/users/BaranovAV/following{/other_user}","gists_url":"https://api.github.com/users/BaranovAV/gists{/gist_id}","starred_url":"https://api.github.com/users/BaranovAV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BaranovAV/subscriptions","organizations_url":"https://api.github.com/users/BaranovAV/orgs","repos_url":"https://api.github.com/users/BaranovAV/repos","events_url":"https://api.github.com/users/BaranovAV/events{/privacy}","received_events_url":"https://api.github.com/users/BaranovAV/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BaranovAV/messenger","description":"","fork":true,"url":"https://api.github.com/repos/BaranovAV/messenger","forks_url":"https://api.github.com/repos/BaranovAV/messenger/forks","keys_url":"https://api.github.com/repos/BaranovAV/messenger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BaranovAV/messenger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BaranovAV/messenger/teams","hooks_url":"https://api.github.com/repos/BaranovAV/messenger/hooks","issue_events_url":"https://api.github.com/repos/BaranovAV/messenger/issues/events{/number}","events_url":"https://api.github.com/repos/BaranovAV/messenger/events","assignees_url":"https://api.github.com/repos/BaranovAV/messenger/assignees{/user}","branches_url":"https://api.github.com/repos/BaranovAV/messenger/branches{/branch}","tags_url":"https://api.github.com/repos/BaranovAV/messenger/tags","blobs_url":"https://api.github.com/repos/BaranovAV/messenger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BaranovAV/messenger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BaranovAV/messenger/git/refs{/sha}","trees_url":"https://api.github.com/repos/BaranovAV/messenger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BaranovAV/messenger/statuses/{sha}","languages_url":"https://api.github.com/repos/BaranovAV/messenger/languages","stargazers_url":"https://api.github.com/repos/BaranovAV/messenger/stargazers","contributors_url":"https://api.github.com/repos/BaranovAV/messenger/contributors","subscribers_url":"https://api.github.com/repos/BaranovAV/messenger/subscribers","subscription_url":"https://api.github.com/repos/BaranovAV/messenger/subscription","commits_url":"https://api.github.com/repos/BaranovAV/messenger/commits{/sha}","git_commits_url":"https://api.github.com/repos/BaranovAV/messenger/git/commits{/sha}","comments_url":"https://api.github.com/repos/BaranovAV/messenger/comments{/number}","issue_comment_url":"https://api.github.com/repos/BaranovAV/messenger/issues/comments{/number}","contents_url":"https://api.github.com/repos/BaranovAV/messenger/contents/{+path}","compare_url":"https://api.github.com/repos/BaranovAV/messenger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BaranovAV/messenger/merges","archive_url":"https://api.github.com/repos/BaranovAV/messenger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BaranovAV/messenger/downloads","issues_url":"https://api.github.com/repos/BaranovAV/messenger/issues{/number}","pulls_url":"https://api.github.com/repos/BaranovAV/messenger/pulls{/number}","milestones_url":"https://api.github.com/repos/BaranovAV/messenger/milestones{/number}","notifications_url":"https://api.github.com/repos/BaranovAV/messenger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BaranovAV/messenger/labels{/name}","releases_url":"https://api.github.com/repos/BaranovAV/messenger/releases{/id}","deployments_url":"https://api.github.com/repos/BaranovAV/messenger/deployments","created_at":"2016-03-11T17:44:56Z","updated_at":"2016-03-11T17:44:57Z","pushed_at":"2016-03-25T17:27:30Z","git_url":"git://github.com/BaranovAV/messenger.git","ssh_url":"git@github.com:BaranovAV/messenger.git","clone_url":"https://github.com/BaranovAV/messenger.git","svn_url":"https://github.com/BaranovAV/messenger","homepage":null,"size":567,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"arhangeldim:master","ref":"master","sha":"5e369969bf7359bc9725576a3668ea9c6a2740ca","user":{"login":"arhangeldim","id":1112038,"avatar_url":"https://avatars.githubusercontent.com/u/1112038?v=3","gravatar_id":"","url":"https://api.github.com/users/arhangeldim","html_url":"https://github.com/arhangeldim","followers_url":"https://api.github.com/users/arhangeldim/followers","following_url":"https://api.github.com/users/arhangeldim/following{/other_user}","gists_url":"https://api.github.com/users/arhangeldim/gists{/gist_id}","starred_url":"https://api.github.com/users/arhangeldim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhangeldim/subscriptions","organizations_url":"https://api.github.com/users/arhangeldim/orgs","repos_url":"https://api.github.com/users/arhangeldim/repos","events_url":"https://api.github.com/users/arhangeldim/events{/privacy}","received_events_url":"https://api.github.com/users/arhangeldim/received_events","type":"User","site_admin":false},"repo":{"id":52207105,"name":"messenger","full_name":"arhangeldim/messenger","owner":{"login":"arhangeldim","id":1112038,"avatar_url":"https://avatars.githubusercontent.com/u/1112038?v=3","gravatar_id":"","url":"https://api.github.com/users/arhangeldim","html_url":"https://github.com/arhangeldim","followers_url":"https://api.github.com/users/arhangeldim/followers","following_url":"https://api.github.com/users/arhangeldim/following{/other_user}","gists_url":"https://api.github.com/users/arhangeldim/gists{/gist_id}","starred_url":"https://api.github.com/users/arhangeldim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhangeldim/subscriptions","organizations_url":"https://api.github.com/users/arhangeldim/orgs","repos_url":"https://api.github.com/users/arhangeldim/repos","events_url":"https://api.github.com/users/arhangeldim/events{/privacy}","received_events_url":"https://api.github.com/users/arhangeldim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arhangeldim/messenger","description":"","fork":false,"url":"https://api.github.com/repos/arhangeldim/messenger","forks_url":"https://api.github.com/repos/arhangeldim/messenger/forks","keys_url":"https://api.github.com/repos/arhangeldim/messenger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arhangeldim/messenger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arhangeldim/messenger/teams","hooks_url":"https://api.github.com/repos/arhangeldim/messenger/hooks","issue_events_url":"https://api.github.com/repos/arhangeldim/messenger/issues/events{/number}","events_url":"https://api.github.com/repos/arhangeldim/messenger/events","assignees_url":"https://api.github.com/repos/arhangeldim/messenger/assignees{/user}","branches_url":"https://api.github.com/repos/arhangeldim/messenger/branches{/branch}","tags_url":"https://api.github.com/repos/arhangeldim/messenger/tags","blobs_url":"https://api.github.com/repos/arhangeldim/messenger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arhangeldim/messenger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arhangeldim/messenger/git/refs{/sha}","trees_url":"https://api.github.com/repos/arhangeldim/messenger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arhangeldim/messenger/statuses/{sha}","languages_url":"https://api.github.com/repos/arhangeldim/messenger/languages","stargazers_url":"https://api.github.com/repos/arhangeldim/messenger/stargazers","contributors_url":"https://api.github.com/repos/arhangeldim/messenger/contributors","subscribers_url":"https://api.github.com/repos/arhangeldim/messenger/subscribers","subscription_url":"https://api.github.com/repos/arhangeldim/messenger/subscription","commits_url":"https://api.github.com/repos/arhangeldim/messenger/commits{/sha}","git_commits_url":"https://api.github.com/repos/arhangeldim/messenger/git/commits{/sha}","comments_url":"https://api.github.com/repos/arhangeldim/messenger/comments{/number}","issue_comment_url":"https://api.github.com/repos/arhangeldim/messenger/issues/comments{/number}","contents_url":"https://api.github.com/repos/arhangeldim/messenger/contents/{+path}","compare_url":"https://api.github.com/repos/arhangeldim/messenger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arhangeldim/messenger/merges","archive_url":"https://api.github.com/repos/arhangeldim/messenger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arhangeldim/messenger/downloads","issues_url":"https://api.github.com/repos/arhangeldim/messenger/issues{/number}","pulls_url":"https://api.github.com/repos/arhangeldim/messenger/pulls{/number}","milestones_url":"https://api.github.com/repos/arhangeldim/messenger/milestones{/number}","notifications_url":"https://api.github.com/repos/arhangeldim/messenger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arhangeldim/messenger/labels{/name}","releases_url":"https://api.github.com/repos/arhangeldim/messenger/releases{/id}","deployments_url":"https://api.github.com/repos/arhangeldim/messenger/deployments","created_at":"2016-02-21T13:11:43Z","updated_at":"2016-03-20T20:11:17Z","pushed_at":"2016-03-29T19:49:55Z","git_url":"git://github.com/arhangeldim/messenger.git","ssh_url":"git@github.com:arhangeldim/messenger.git","clone_url":"https://github.com/arhangeldim/messenger.git","svn_url":"https://github.com/arhangeldim/messenger","homepage":null,"size":901,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":34,"forks":38,"open_issues":34,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arhangeldim/messenger/pulls/12"},"html":{"href":"https://github.com/arhangeldim/messenger/pull/12"},"issue":{"href":"https://api.github.com/repos/arhangeldim/messenger/issues/12"},"comments":{"href":"https://api.github.com/repos/arhangeldim/messenger/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/arhangeldim/messenger/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/arhangeldim/messenger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arhangeldim/messenger/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/arhangeldim/messenger/statuses/e7a622a21e917b6e4d52cf6496f329e147e5e5c0"}}}}