[PATCH saem_ref v2] [seda] Handle all target types for seda_archive_unit relation in archive unit ARK attribution

Philippe Pepiot philippe.pepiot at logilab.fr
Tue May 15 12:09:04 CEST 2018

On 15/05/2018, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1526308617 -7200
> #      Mon May 14 16:36:57 2018 +0200
> # Node ID 2f47a5deb560ea6c14c0e2e8ad47815ea99afa85
> # Parent  03cc50b258bb113a5352a406da447772bc091c2d
> # Available At http://hg.logilab.org/review/cubes/saem_ref
> #              hg pull http://hg.logilab.org/review/cubes/saem_ref -r 2f47a5deb560
> # EXP-Topic CONSEJIRA-491
> [seda] Handle all target types for seda_archive_unit relation in archive unit ARK attribution
> Relation seda_archive_unit may have SEDAArchiveTransfer and
> SEDASeqAltArchiveUnitArchiveUnitRefIdManagement entity types as object.
> Previously, we only handled the first case which occurs when a
> SEDAArchiveUnit is related directly to a SEDAArchiveTransfer. However,
> when relating a SEDAArchiveUnit to another SEDAArchiveUnit our previous
> assumption (that the target of seda_archive_unit relation has an
> "ark_naa" relation) breaks, thus making it impossible to insert such a
> relation.
> We thus check the entity type of target of this relation in ARK locator
> and generator for SEDAArchiveUnit. In case a
> SEDASeqAltArchiveUnitArchiveUnitRefIdManagement entity type is obtained,
> we use the "container" relation to obtain the archive transfer and its
> ARK NAA. There might be a "business" way to obtain this information but,
> given the complexity of the data model, I could not find it.
> The consequence of this *fix* is that ARK identifiers of nested
> SEDAArchiveUnit are now always qualified with respect to their parent.
> This does not change if the parent is a SEDAArchiveTransfer but this
> changes if it is another SEDAArchiveUnit since, previously, the nested
> entity would simply have had an unqualified ARK: hopefully, it makes
> sense from a business perspective...

Applied, thanks!

More information about the saem-devel mailing list