{"action":"created","issue":{"url":"https://api.github.com/repos/JabRef/jabref/issues/1207","repository_url":"https://api.github.com/repos/JabRef/jabref","labels_url":"https://api.github.com/repos/JabRef/jabref/issues/1207/labels{/name}","comments_url":"https://api.github.com/repos/JabRef/jabref/issues/1207/comments","events_url":"https://api.github.com/repos/JabRef/jabref/issues/1207/events","html_url":"https://github.com/JabRef/jabref/pull/1207","id":148336113,"number":1207,"title":"Restructure importers ","user":{"login":"tobiasdiez","id":5037600,"avatar_url":"https://avatars.githubusercontent.com/u/5037600?v=3","gravatar_id":"","url":"https://api.github.com/users/tobiasdiez","html_url":"https://github.com/tobiasdiez","followers_url":"https://api.github.com/users/tobiasdiez/followers","following_url":"https://api.github.com/users/tobiasdiez/following{/other_user}","gists_url":"https://api.github.com/users/tobiasdiez/gists{/gist_id}","starred_url":"https://api.github.com/users/tobiasdiez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobiasdiez/subscriptions","organizations_url":"https://api.github.com/users/tobiasdiez/orgs","repos_url":"https://api.github.com/users/tobiasdiez/repos","events_url":"https://api.github.com/users/tobiasdiez/events{/privacy}","received_events_url":"https://api.github.com/users/tobiasdiez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JabRef/jabref/labels/cleanup","name":"cleanup","color":"A52A2A"},{"url":"https://api.github.com/repos/JabRef/jabref/labels/ready-for-review","name":"ready-for-review","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/JabRef/jabref/milestones/7","html_url":"https://github.com/JabRef/jabref/milestones/v3.4","labels_url":"https://api.github.com/repos/JabRef/jabref/milestones/7/labels","id":1579263,"number":7,"title":"v3.4","description":"","creator":{"login":"stefan-kolb","id":2141507,"avatar_url":"https://avatars.githubusercontent.com/u/2141507?v=3","gravatar_id":"","url":"https://api.github.com/users/stefan-kolb","html_url":"https://github.com/stefan-kolb","followers_url":"https://api.github.com/users/stefan-kolb/followers","following_url":"https://api.github.com/users/stefan-kolb/following{/other_user}","gists_url":"https://api.github.com/users/stefan-kolb/gists{/gist_id}","starred_url":"https://api.github.com/users/stefan-kolb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefan-kolb/subscriptions","organizations_url":"https://api.github.com/users/stefan-kolb/orgs","repos_url":"https://api.github.com/users/stefan-kolb/repos","events_url":"https://api.github.com/users/stefan-kolb/events{/privacy}","received_events_url":"https://api.github.com/users/stefan-kolb/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":14,"state":"open","created_at":"2016-02-12T08:16:00Z","updated_at":"2016-04-27T20:08:05Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-04-14T11:51:41Z","updated_at":"2016-04-29T19:54:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JabRef/jabref/pulls/1207","html_url":"https://github.com/JabRef/jabref/pull/1207","diff_url":"https://github.com/JabRef/jabref/pull/1207.diff","patch_url":"https://github.com/JabRef/jabref/pull/1207.patch"},"body":"The aim of this PR is to reduce the overlap between the Importer package and some code in GUI (in particular, the class OpenDatabaseAction).\r\nMoreover, #1080 and #1153 are fixed.\r\n\r\nIn detail, the following things were changed:\r\n- The abstract `ImportFormat` class is almost completely rewritten. Please have a look at this class. Almost all other changes are a direct consequence of the edits made to the ImportFormat class. The biggest change is that the import method returns a `ParserResult` instead of a list of entries (in this way, metadata can also be imported and error messages are communicated more effectively instead of throwing IOExceptions). Moreover, the import method operates on a reader instead of an input stream in order to reduce some common code in all importers.\r\n-  Add method `importDatabase(Path file, Charset encoding)` to the importer interface which opens the file and passes the stream to the other import method.\r\n- The BibTexImporter overwrites this new import method and uses the logic from `OpenDatabaseAction.loadDatabase` to determine the encoding of the bib file.\r\n- Change OpenDatabaseAction to operate against the BibTex importer. \r\n- Remove get/set isCustomImporter: was not really used (just for sorting - now everything is alphabetical)\r\n- Empty entries are no longer imported (thus a few test had to be changed)\r\n\r\nRemark: The methods getExtension and getDescription are not implemented by almost any importer. This should be done. Maybe this is something for the stupro?\r\n\r\n(Will add the changelog entry and add a few tests later)\r\n- [ ] Change in CHANGELOG.md described\r\n- [ ] Tests created for changes\r\n- [ ] Screenshots added (for bigger UI changes)\r\n"},"comment":{"url":"https://api.github.com/repos/JabRef/jabref/issues/comments/215862053","html_url":"https://github.com/JabRef/jabref/pull/1207#issuecomment-215862053","issue_url":"https://api.github.com/repos/JabRef/jabref/issues/1207","id":215862053,"user":{"login":"oscargus","id":8114497,"avatar_url":"https://avatars.githubusercontent.com/u/8114497?v=3","gravatar_id":"","url":"https://api.github.com/users/oscargus","html_url":"https://github.com/oscargus","followers_url":"https://api.github.com/users/oscargus/followers","following_url":"https://api.github.com/users/oscargus/following{/other_user}","gists_url":"https://api.github.com/users/oscargus/gists{/gist_id}","starred_url":"https://api.github.com/users/oscargus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscargus/subscriptions","organizations_url":"https://api.github.com/users/oscargus/orgs","repos_url":"https://api.github.com/users/oscargus/repos","events_url":"https://api.github.com/users/oscargus/events{/privacy}","received_events_url":"https://api.github.com/users/oscargus/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T19:54:58Z","updated_at":"2016-04-29T19:54:58Z","body":"I do not fully understand why the getCLIId method is removed? How is the importer selected from CLI now? \r\n\r\nAlso, since there is a method setCliId, maybe that should change name as well (as it appears as getCLIId is sometimes replaces with getId, somehow, it seems like getCLIId is a better name, but no strong opinions).\r\n\r\nMany changes are related to imports and replacing extension strings with a list of extension strings, right?"}}