sqlalchemy: change JSON type to native one.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
jsonalchemy: update `parser.py` for pyparsing 2

* Transform hardcoded decorators into extensions inside the parser
  folder. The new decorators are cataloged as `before`, `on` and `after`
  depending on when they should be evaluated.

* All the decorators that before needed always a tuple now works as
  `@decorator(*args)`.

* Remove `@inherit_from` decorator from field definitions as it is
  replaced by `@extend` and `@override`.

* New decorator extension added `@connect(field_name[, function])` to
  link to fields and propagate changes from one to the other and vice
  versa.

* Remove `include` form field definitions as now registries are used.

* Replace `checker` section by `schema` to perform simple validations,
  like type or length. For more complex check use the checker module.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
jsonalchemy: add `jsonext` as common namespace

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
jsonalchemy: update readers and SmartJson

* Update all parsers to work with the new structutre of the field and
  model definitions, meaning using the extensions properly.

* When translating a new blob there is no need any more to go through
  the `readers` registry, instead call `Reader.translate`. See the
  method docs for more info.

* Update SmartJson to work also with new extensions and decorators
  structure.

* Update JSON for marc producer to adapt it to the new extension
  behavior.

* Add first version of sphinx documentation (to be completed).

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
records: update to new JSONAlchemy

* Add `persistent_identifier` property to the record base object.

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
documents: update field and model definitions

Signed-off-by: Esteban J. G. Gabancho <egabancho@gmail.com>
jsonalchemy: fix `six.iteritems` typo

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
documents: fix for model creation

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jsonalchemy: import and PEP8 fixes

Co-authored-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
jsonalchemy: UUID validation fix

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
jsonalchemy: `uuid` and `objectid` validator fix

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
base: config PEP8 improvements

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jsonalchemy: validator test fix

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
jsonalchemy: bug fixes

* Fix record tests when using '001' marc tag.

* Implement `_prepare_blob` method for json_reader to use the model
  field names when using a JSON input.

* Fix model inheritance when overriding fields.

* Fix validation when using models and override fields.

* Enhance `creation_date` field definition.

* PEP8 fixes.

Signed-off-by: Esteban J. G. Gabancho <egabancho@gmail.com>
jsonalchemy: model resolver fix

Signed-off-by: Esteban J. G. Gabancho <egabancho@gmail.com>
bibdocfile: fix for undefined docname in get_text

Signed-off-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
jsonalchemy: extension model fix

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>
previewer: PDFtk previewer

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
annotations: initial commit

* Allow annotating any page.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>
annotations: file attachments skeleton

* Can be enabled via the ANNOTATIONS_ATTACHMENTS configuration
  parameter.

Signed-off-by: Adrian-Tudor Panescu <adrian.tudor.panescu@cern.ch>