1. 02 Oct, 2019 2 commits
  2. 02 May, 2019 1 commit
    • Denis Laxalde's avatar
      [profile gen] Account for bdo's user cardinality or its parent's in... · fcb890e6d9d7
      Denis Laxalde authored
      [profile gen] Account for bdo's user cardinality or its parent's in "Integrity" element (CONSEJIRA-663)
      
      See also https://jira.mtpl.bs.fr.atos.net/browse/CONSEJIRA-663
      
      For more details, quoting verbatim the customer request for future reference:
      
      | Sur les documents multi occurrences (0-n ou 1-n) ou même si l’archive
      | est multi occurrence (0-n ou 1-n), il y a une balise integrity qui est
      | liée au document dans le bordereau de versement que l’on génère.
      | Or, dans le XSD du profil, la balise integrity du document ne possède
      | pas l'attribut : maxOccurs="unbounded"
      | Donc lors de l'envoi à Asalae du versement, Asalae fait une vérification
      | par rapport au profil et affiche une erreur a cause de la balise
      | integrity qui est présente plusieurs fois.
      |
      | Pour moi le correctif à faire doit porter sur le XSD et le RNG sur la
      | balise integrity pour qu'elle soit multi-occurrence possible dans les cas
      | suivants :
      |
      |   *   Si le document (Document) est en multi occurrence (0-n ou 1-n)
      |       donc avec un attribut maxOccurs="unbounded"
      |   *   Si une UA (Contains) supérieure au document est en multi
      |       occurrence (0-n ou 1-n) donc avec un attribut
      |       maxOccurs="unbounded"
      
      | si une UA supérieur est en cardinalité max unbounded, alors
      | l'integrity sur les documents en dessous doit forcément être en
      | unbounded également
      
      | il faut que l'integrity soit en facultative ou multi occurrence si une
      | UA supérieure est facultative ou en multi occurrence.
      
      This is essentially achieved by looking for the upper parent archive
      units of a data object then their cardinality to produce the Integrity element.
      
      Adding tests for new integrity_cardinality() function based on customer
      examples.
      fcb890e6d9d7
  3. 19 Jun, 2018 1 commit
    • Denis Laxalde's avatar
      Make generation of xml:id attribute configurable through an adapter · d945aaa3f821
      Denis Laxalde authored
      The idea is to have the generation of xml:id attribute configurable
      based on entity context. So we create an entity adapter IXmlId that
      default to the current implementation. This will be extended in
      cubicweb-saem_ref where we'd want to use the ARK identifier to produce
      this xml:id attribute.
      
      In profile_generation module, we rename eid2xmlid function as xmlid and
      make it accept an entity.
      d945aaa3f821
  4. 14 Dec, 2017 1 commit
  5. 11 Dec, 2017 1 commit
  6. 07 Nov, 2017 3 commits
  7. 03 Nov, 2017 1 commit
  8. 02 Nov, 2017 1 commit
  9. 03 Nov, 2017 1 commit
  10. 16 Oct, 2017 1 commit
  11. 12 Oct, 2017 1 commit
  12. 01 Sep, 2017 1 commit
  13. 29 Aug, 2017 1 commit
    • Sylvain Thénault's avatar
      [profile gen] Ensure data-objects are exported before sub-units in SEDA 0.2 · 68c5f87f8677
      Sylvain Thénault authored
      else this won't be conform to the SEDA 0.2schema. But notice this is the
      opposite in SEDA 1.0. In this case, test cases were fine but the problem was
      actually the same: data-objects and sub-units order was random, and it's not
      anymore.
      
      As we are here, add eid so we get a total ordering, which is an expected
      property so that exported profiles are consistent during time. This should be
      enough until we want to control ordering from the UI.
      
      Closes extranet #33070904
      68c5f87f8677
  14. 24 Aug, 2017 1 commit
  15. 01 Jun, 2017 2 commits
  16. 18 May, 2017 1 commit
  17. 30 Mar, 2017 3 commits
    • Sylvain Thénault's avatar
      [profile gen] Export URL for keyword reference content · 3da29cc2d6c8
      Sylvain Thénault authored
      not text. Consistently with SEDA 1/0.2 export.
      3da29cc2d6c8
    • Sylvain Thénault's avatar
      [profile scheme] Use the cwuri_url static method to generate URLs for SEDA 2 export · dd0fa3ba2760
      Sylvain Thénault authored
      as this was already done for SEDA 1/0.2 export.
      
      Move method from SEDA 1 export to the common base class with SEDA 2 export to
      make it available there and avoid duplication. Also SEDA 2 test needs update
      since this method return cwuri instead of absolute_url.
      
      Related to extranet #15934739
      dd0fa3ba2760
    • Sylvain Thénault's avatar
      [profile gen] Be more resilient about supported concept's languages · 455ce14bb7bf
      Sylvain Thénault authored
      Export used to chose concept value by searching for label with the following
      language code:
      
      1. version specific (seda-2, seda-1 or seda-02)
      2. seda
      3. en
      
      and crash if no matching label was found. But it seems we don't want it to crash
      because we use some concept which has e.g. only a concept in 'fr' language code.
      At some point we may want to improve this, depending on the relation (internal
      seda vocabulary vs open vocabulary such as keyword reference), but for now,
      let's add 'fr' to the expected language list and fallback to any language if
      none has been found so the export doesn't fail.
      
      Related to extranet #15934212
      455ce14bb7bf
  18. 29 Mar, 2017 3 commits
    • Sylvain Thénault's avatar
      [cleanup] Import in alphabetical order · 8f9c8fd47867
      Sylvain Thénault authored
      8f9c8fd47867
    • Sylvain Thénault's avatar
      [profile gen] Stop fixing order of binary/physical data objects · 370716d04b28
      Sylvain Thénault authored
      Before this cset, data objects were inserted one after another in some random
      order, but in the RNG semantics this was forcing their order. To avoid this,
      we've to put them in a rng:group node.
      
      Several strategies have been considered to achieve this:
      
      * change the underlying XSD representation, but this would require either
        changing the data model or handling a difference between the representation
        used to generate the schema and the one used to generate the RNG profile,
      
      * add some special case when a data object node is generated, but this would
        require handling some state to see if the rng:group has already been inserted,
      
      * add a postprocessing step doing the job all at once using lxml's API.
      
      It appeared to me that the two first strategies where too much tricky and less
      readable than the third one.
      
      Related to #17066567
      370716d04b28
    • Sylvain Thénault's avatar
      [profile gen] Drop support for SEDA 2.0 XSD export · 377976b673e0
      Sylvain Thénault authored
      XSD isn't able to properly export SEDA 2.0, stop supporting it all together.
      377976b673e0
  19. 17 Mar, 2017 1 commit
  20. 09 Mar, 2017 4 commits
  21. 23 Feb, 2017 1 commit
  22. 20 Feb, 2017 1 commit
  23. 27 Jan, 2017 1 commit
  24. 20 Jan, 2017 1 commit
    • Sylvain Thénault's avatar
      [xsd2yams] Skip KeywordContent · 4286fd72c879
      Sylvain Thénault authored
      This is a mandatory and unique children of Keyword, so it may be skipped while
      this ease thing to get a different UI for 'simple keyword' vs 'concept keyword'
      that still has to be done.
      
      Related to #16070921
      4286fd72c879
  25. 17 Jan, 2017 1 commit
  26. 11 Jan, 2017 3 commits
    • Sylvain Thénault's avatar
      [profile gen] Add a special case for path through data_object_reference_id · 5f607c9702cb
      Sylvain Thénault authored
      This relation is explicitly marked as composite in shema/__init__.py to ease the
      case of simplified profiles, where we want data objects to appear as children of
      archive unit instead of references as expected by SEDA 2. Doing this, we
      introduced a bug in SEDA 2 profile generation where the target value (hence the
      referenced data object) was also considered as the 'cardinality entity' (the one
      defining the cardinality / annotation) for the associated XML element. This led
      to using the data object's cardinality / annotation for the *reference* element.
      5f607c9702cb
    • Sylvain Thénault's avatar
      Skip intermediary SEDAContent entity · fff66bc4fa29
      Sylvain Thénault authored
      In SEDA 2.1, only one Content node is permitted per archive unit (2.0 allow
      multiple ones). This allows to skip the SEDAContent entity in our model and to
      attach all its children to its parent
      (SEDASeqAltArchiveUnitArchiveUnitRefIdManagement).
      
      This patch replaces occurences of SEDAContent/seda_content and should have test
      to green but there is still some work to do on the UI side.
      
      Related to #16684017
      fff66bc4fa29
    • Sylvain Thénault's avatar
  27. 10 Jan, 2017 1 commit
    • Sylvain Thénault's avatar
      Stop using unique identifier on archive unit and data objects · 5fb5bf38f962
      Sylvain Thénault authored
      They have been introduced at a first glance to handle references during profile
      generation as well as display of 'first class' element in the UI. The main problem is
      that they clash when using the 'import archive unit' feature, since one may not
      import the same unit twice without changing the id first. Another problem is
      that their purpose is not clear to end-user.
      
      This changeset remove the attribute, use eid instead during profile generation
      and fix tests. UI and proper migration will be handled in later csets.
      
      Related #16070476
      5fb5bf38f962