{"action":"created","issue":{"url":"https://api.github.com/repos/omeka/omeka-s/issues/298","labels_url":"https://api.github.com/repos/omeka/omeka-s/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/omeka/omeka-s/issues/298/comments","events_url":"https://api.github.com/repos/omeka/omeka-s/issues/298/events","html_url":"https://github.com/omeka/omeka-s/issues/298","id":94588899,"number":298,"title":"Consider abstract Import and ImportJob classes and/or interfaces","user":{"login":"patrickmj","id":153262,"avatar_url":"https://avatars.githubusercontent.com/u/153262?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickmj","html_url":"https://github.com/patrickmj","followers_url":"https://api.github.com/users/patrickmj/followers","following_url":"https://api.github.com/users/patrickmj/following{/other_user}","gists_url":"https://api.github.com/users/patrickmj/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickmj/subscriptions","organizations_url":"https://api.github.com/users/patrickmj/orgs","repos_url":"https://api.github.com/users/patrickmj/repos","events_url":"https://api.github.com/users/patrickmj/events{/privacy}","received_events_url":"https://api.github.com/users/patrickmj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/omeka/omeka-s/labels/question","name":"question","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-12T18:26:02Z","updated_at":"2015-07-13T19:04:25Z","closed_at":null,"body":"With four modules now doing imports from different types of sources (Zotero, DSpace, Fedora, Omeka 2), I think we're ready to make decisions about abstracting functionality and practices\r\n\r\nHere's info that I'm recording so far in all but Zotero Import that seems useful. Mostly these get stored on a subclass of Entity, but in the Job classes there are also properties just to tally the data up.\r\n\r\nImport entities:\r\n\r\n* id\r\n* job_id\r\n* comment  // workflow information about the import (owner is also useful, and traced through job_id)\r\n* added_count // number of items added from the import\r\n* updated_count // number of items updated from the import\r\n* version // only in ZoteroImport, but seems likely to be useful where it can be determined (DSpace, e.g., isn't good at making this clear)\r\n\r\n`added_count` and `updated_count` clearly depend on another mechanism for keeping track. So far in my stuff, that's been in separate entities for each imported item and its relationship to the external content. That's a bit dependent on the data that the external system uses and reports.\r\n\r\nExamples of the classes that might be abstracted this way are all the `{module}/src//Job/Import.php` job classes and all the `{module}/src/Entity/{module}Import.php` entity classes."},"comment":{"url":"https://api.github.com/repos/omeka/omeka-s/issues/comments/121024250","html_url":"https://github.com/omeka/omeka-s/issues/298#issuecomment-121024250","issue_url":"https://api.github.com/repos/omeka/omeka-s/issues/298","id":121024250,"user":{"login":"patrickmj","id":153262,"avatar_url":"https://avatars.githubusercontent.com/u/153262?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickmj","html_url":"https://github.com/patrickmj","followers_url":"https://api.github.com/users/patrickmj/followers","following_url":"https://api.github.com/users/patrickmj/following{/other_user}","gists_url":"https://api.github.com/users/patrickmj/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickmj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickmj/subscriptions","organizations_url":"https://api.github.com/users/patrickmj/orgs","repos_url":"https://api.github.com/users/patrickmj/repos","events_url":"https://api.github.com/users/patrickmj/events{/privacy}","received_events_url":"https://api.github.com/users/patrickmj/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T19:04:25Z","updated_at":"2015-07-13T19:04:25Z","body":"thanks. I'll poke around a little to see more of what that might entail and look like"}}