-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure importers/import managers... #14
Comments
In a branch "dates" I changed the hierarchy of some importers (I created a general |
Okay, I'll take a look at that branch. |
I've merged your stuff here: c484b5f. There's a bunch of import test failures (incorrect node counts) but nothing expected. |
Made `AbstractImporter<T>` more generic by using `T` for all `importItem` and `extractDates` methods. (I wouldn't call it fully generic, because some of these have `Map<String, Object>` as return type.) The field `documentContext` of type `T` has been removed from `AbstractImporter<T>`, because it was never used. Renamed `XmlImporter<T>` to `MapImporter` (it's no longer generic), since there is no relation to XML (see also issue EHRI#14) and it is the base implementation for importers of `Map<String, Object>` representations of nodes. `XmlImporterTest` is `MapImporterTest`. Subclasses of `MapImporter` no longer need to implement `extractDates(Object)`. These methods have been removed. Added or updated javadoc comments in several locations.
Refactor ImporterManagers + tests (fixes #14)
The importer and import manager classes have a fair few warts, mostly going back to their earliest genesis as an EAD-specific hack:
CsvImportManager
extendsXmlImportManager
CsvImportManager
andSaxImportManager
ImportManager
interface doesn't do much, and isn't really usedimportFile
,importFiles
signatures and overrides are pretty much just as confusing as when I first wrote them (sorry)Now that we have a more generic import system it would be nice to tidy this up a bit before looking at things like issue #10.
I am happy to file this under "things to do when bored of hacking CSS", but don't want to tread on your toes @bencomp and @lindareijnhoudt. Thoughts?
The text was updated successfully, but these errors were encountered: