RandomSec/extensions/database
Tom Morris 83ed9ffdaf
Refactor importer APIs - Fixes #2963 (#2978)
* Make sure data directory is directory, not a file

* Add a test for zip archive import

Also tests the saving of the archive file name and source filename

* Add TODOs - no functional changes

* Cosmetic cleanups

* Revert importer API changes for archive file name parameter

Fixes #2963
- restore binary compatibility to the API
- hoist the handling of both fileSource and archiveFileName from
TabularImportingParserBase and TreeImportingParserBase to
ImportingParserBase so that there's only one copy. These 3 classes are
all part of the internal implementation, so there should be no
compatibility issue.

* Revert weird flow of control for import options metadata

This reverts the very convoluted control flow that was introduced
when adding the input options to the project metadata. Instead
the metadata is all handled in the importer framework rather than
having to change APIs are have individual importers worry about
it.

The feature never had test coverage, so that is still to be added.

* Add test for import options in project metadata & fix bug

Fixes bug where same options object was being reused and overwritten,
so all copies in the list ended up the same.
2020-07-23 18:36:14 +02:00
..
licenses database extension with classpath fix 2018-01-13 20:24:56 -06:00
module Fix i18n. Fixes #2805 (#2847) 2020-06-30 08:22:12 +02:00
src/com/google/refine/extension/database Refactor importer APIs - Fixes #2963 (#2978) 2020-07-23 18:36:14 +02:00
tests Replaced some deprecated methods 2020-02-24 23:51:41 -06:00
.eclipse-pmd database extension with classpath fix 2018-01-13 20:24:56 -06:00
.eslintrc.json database extension with classpath fix 2018-01-13 20:24:56 -06:00
.travis.yml database extension with classpath fix 2018-01-13 20:24:56 -06:00
pom.xml Bump mockito-core from 3.4.2 to 3.4.4 (#2965) 2020-07-20 14:48:41 +02:00
README.md database extension with classpath fix 2018-01-13 20:24:56 -06:00

This project is an extension for OpenRefine that provides a way to import database data using JDBC.

INSTALL

  1. Before installing this extension download OpenRefine code from http://code.google.com/p/google-refine/source/checkout.

  2. Pull this extension's code into folder database under folder /extensions. For more information on how to write a OpenRefine extensions and where to put the files see http://code.google.com/p/google-refine/wiki/WriteAnExtension

The folder structure should resemble this: grefine-all/ ----------/extensions --------------/database ------------------/module ------------------/src ------------------build.xml ------------------README (this file)

  1. Update build.xml in folder /extensions with build and clean ant tasks for database:
<target name="clean">
    <echo message="cleaning extensions" />
    <ant dir="sample/" target="clean" />
    <ant dir="jython/" target="clean" />
    <ant dir="freebase/" target="clean" />
    <ant dir="gdata/" target="clean" />
    <ant dir="database/" target="clean" />
</target>
  1. If using Eclipse, make sure that you build project with ant