1. 22 Oct, 2021 1 commit
  2. 21 Oct, 2021 1 commit
  3. 17 Aug, 2021 1 commit
  4. 03 Aug, 2021 1 commit
  5. 11 Jan, 2021 1 commit
  6. 02 Oct, 2019 6 commits
  7. 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
  8. 23 Apr, 2019 1 commit
    • Denis Laxalde's avatar
      [test] Specify bdo's user_cardinality in test_seda_0_2_bordereau_ref · 1fe87336af7c
      Denis Laxalde authored
      In the next changeset, binary data object's user_cardinality will be
      accounted for when inserting the "Integrity" element in profile whereas
      it is currently hard-coded to "0..1" (see xsd_integrity() method of
      SEDA1XSDExport and SEDA02XSDExport classes). In order to prevent changes
      to generated profile with respect to the "seda_02_bordereau_ref.xml"
      file, we set the value of user_cardinality created bdo in this test.
  9. 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.
  10. 14 Dec, 2017 2 commits
  11. 11 Dec, 2017 1 commit
  12. 03 Nov, 2017 1 commit
  13. 02 Nov, 2017 1 commit
  14. 03 Nov, 2017 1 commit
  15. 12 Oct, 2017 3 commits
  16. 01 Sep, 2017 3 commits
    • Sylvain Thénault's avatar
      [test] Cleanup · efbecdc4fc5b
      Sylvain Thénault authored
    • Sylvain Thénault's avatar
      [profile gen] Ensure same name children are ordered accorded to their cardinality · 4941eab6a289
      Sylvain Thénault authored
      As explained in the previous commit, we want items with cardinality = 1 first
      then the one with cardinality != 1 if any. See previous commit for detailed
      Closes #17098404
    • Sylvain Thénault's avatar
      [hooks] Ensure we don't have several children with cardinality != 1 · 39d1d971e058
      Sylvain Thénault authored
      By trying to validate several profiles using Jing (in Asalae), it appears that
      it isn't possible to validate a profile where there are several elements with
      the same name with optional or/and multiple cardinality, e.g. with a profile
      telling we expect  1..n Document followed by 1 Document, a transfer with two
      documents won't be accepted, telling a required document is missing. This is
      much probably because the validator "eats" the two documents for the first rule,
      then it misses one to satisfy the second rule.
      In order to avoid generating such insatisfyable profiles, while not changing
      much the UI for now, we decided to add hook preventing usage of several sibling
      children with a cardinality != 1 during edition, and then at RNG profile
      generation time to put the one with cardinality != 1 as last children. That way
      profiles should always be validable.
      This patch introduces the hooks preventing insatisfyable profiles to be created.
      The next one will ensure the order of RNG export.
      Two hooks are added to check for unhandled case one for new watched relations
      and the other for update cardinalities.
      Added test cases for the 3 most prominent cases: archive unit, document and
      keywords, with more coverage in the first one and only simple check for the two
      others. Also, some test have to be updated to follow this change. Notice diff of
      exported RNG isn't nice to read but is actually only removal of a surrounding
      "oneOrMore" element.
      Related to #17098404
  17. 31 Aug, 2017 1 commit
    • Sylvain Thénault's avatar
      [schema] Use 1 as default cardinality for seda elements · a88e6cc83189
      Sylvain Thénault authored
      This has several advantages:
      * it's consistent with xsd/rng defaults
      * it simplifies code
      * it may avoid undesired validation error once #17098404 will be fixed
      This requires several test update, fixed by a mix of test case update or
      expected data update to minimize the changes.
      Related to #17098404
  18. 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
      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
  19. 24 Aug, 2017 3 commits
  20. 01 Jun, 2017 1 commit
  21. 18 May, 2017 1 commit
  22. 11 Apr, 2017 1 commit
  23. 31 Mar, 2017 1 commit
  24. 30 Mar, 2017 4 commits
    • Sylvain Thénault's avatar
      [schema] Make description level mandatory · 746ad8fb9838
      Sylvain Thénault authored
      This is an enum in the original xsd while we don't output possible values
      currently, so in the mean time make it mandatory, it's still a bit better than
      relying on the original schema for that, and it makes sense from a business POV
      to force specification of description level of an archive unit.
      A lot of tests have to be updated, some of them because output value is now
      different, others because we've to introduce a scheme+concept to handle the
      validation, but they were not expecting that.
      Closes #16687907
    • 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.
    • 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
    • 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
  25. 29 Mar, 2017 1 commit