[PATCH 2 of 2 saem_ref v4] [ark] Insert "external" ARK identifiers into ark table

Philippe Pepiot philippe.pepiot at logilab.fr
Thu Feb 22 16:20:36 CET 2018


On 22/02/2018, Denis Laxalde wrote:
> Denis Laxalde a écrit :
> > # HG changeset patch
> > # User Denis Laxalde <denis.laxalde at logilab.fr>
> > # Date 1519302948 -3600
> > #      Thu Feb 22 13:35:48 2018 +0100
> > # Node ID e688cd2db7f5e5393ad42bf2dc4a54c6027f99d6
> > # Parent  edf7a85fa32058508b8dffea3cd6508eca748f00
> > # Available At http://hg.logilab.org/review/cubes/saem_ref
> > #              hg pull http://hg.logilab.org/review/cubes/saem_ref -r e688cd2db7f5
> > # EXP-Topic ark/unique-overall
> > [ark] Insert "external" ARK identifiers into ark table
> > 
> > When calling set_ark_and_cwuri() (from a hook upon entity addition or
> > from a dataimport metadata generator), we now insert a record into "ark"
> > table when an "ark" value is specified in entity.cw_edited (meaning the
> > ARK identifier is externally given). Afterwards, the value returned by
> > insert_ark() is used to update cw_edited dict to ensure consistency with
> > parsed value (in particular, users may specify the "ark:/" scheme, which
> > we do not store).
> > 
> > When an external ARK identifier is given, we only check it is correctly
> > formatted but don't check for our internal constraints (presence of a
> > prefix and control character, etc.).
> > 
> > By inserting external ARK identifiers in this "ark" table, we can now
> > ensure uniqueness of values across entity types, thus solving a major
> > integrity bug.
> > 
> > Notice the change in test_ccplugin.py, where an external ark "000/123"
> > was specified for inserted concept scheme; this ark is not transformed
> 
> should be: "this ark is now transformed"
> 

Series applied with updated commit message, thanks!

> > into "0/123" because postgres "ark" table has an integer column for
> > "naan". Henceforth, we use the *real* ark when calling ctl import
> > command.
> 



More information about the saem-devel mailing list