omeka / omeka-s

Omeka S is a web publication system for universities, galleries, libraries, archives, and museums. It consists of a local network of independently curated exhibits sharing a collaboratively built pool of items, media, and their metadata.
GNU General Public License v3.0
410 stars 138 forks source link

Consider abstract Import and ImportJob classes and/or interfaces #298

Closed patrickmj closed 9 years ago

patrickmj commented 9 years ago

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

Here'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.

Import entities:

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.

Examples 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.

zerocrates commented 9 years ago

It seems to me that the best way to try this out is to try making a single module that hosts the various import options. It seems like it should be possible for many or most to differ only in the actual "guts" of the import. You could end up having only generic Job(s) and just an interface and some concrete implementations that job uses to handle the importing from the various services.

patrickmj commented 9 years ago

thanks. I'll poke around a little to see more of what that might entail and look like

patrickmj commented 9 years ago

what's your sense of whether this would make it harder or easier for people to build their own importers?

zerocrates commented 9 years ago

At worst, no change