- 01 Sep, 2017 2 commits
-
-
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 explanation. Closes #17098404
-
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
-
- 31 Aug, 2017 1 commit
-
-
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
-
- 29 Aug, 2017 1 commit
-
-
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
-
- 24 Aug, 2017 3 commits
-
-
Sylvain Thénault authored
Ensure language priority.
-
Sylvain Thénault authored
We should override the concepts_language class attribute else we'll use the inherited 'seda-1' language.
-
Sylvain Thénault authored
this will ease testing of other things in this module (as in following cset).
-
- 01 Jun, 2017 1 commit
-
-
Sylvain Thénault authored
It should appears first for SEDA 1.0 and after custodial history in SEDA 0.2. Update export test accordingly and add Description to SEDA 0.2 validation test. Closes extranet #23707701
-
- 18 May, 2017 1 commit
-
-
Sylvain Thénault authored
RNG doesn't handle ID/IDREF as XSD: it doesn't handle having some tag's *content* of such type, as it is the case in SEDA 2 ObjectReferenceId element. See https://www.oasis-open.org/committees/relax-ng/compatibility.html#id for details. To fix this, 'downgrade' ID into NCName. This was already done when some data object was referenced, but it should actually be done systematically. Closes #17078970
-
- 11 Apr, 2017 1 commit
-
-
Sylvain Thénault authored
-
- 31 Mar, 2017 1 commit
-
-
Sylvain Thénault authored
-
- 30 Mar, 2017 4 commits
-
-
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 authored
not text. Consistently with SEDA 1/0.2 export.
-
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 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
-
- 29 Mar, 2017 3 commits
-
-
Sylvain Thénault authored
-
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
-
Sylvain Thénault authored
XSD isn't able to properly export SEDA 2.0, stop supporting it all together.
-
- 09 Mar, 2017 2 commits
-
-
Sylvain Thénault authored
This is a bit tough since in SEDA 0.2, Integrity element are defined as children of the root transfer node, hence we have to reuse the kind of reference trick we have in SEDA 0.2 export: document export a seda:profid attribute whose value is the referenced by default value on the UnitIdentifier element associated to the digest (and algorithm) definition. Related to #16687452
-
Sylvain Thénault authored
Using Integrity element of the document (data object). Related to #16687452
-
- 03 Mar, 2017 4 commits
-
-
Sylvain Thénault authored
-
Sylvain Thénault authored
-
Sylvain Thénault authored
This includes some random reording in the uicfg (due to reordering of the schema?).
-
Sylvain Thénault authored
it's not required anymore and doesn't apply to transfer request (To be confirmed by Baptiste)
-
- 23 Feb, 2017 1 commit
-
-
Philippe Pepiot authored
Depend on cubicweb >= 3.24
-
- 20 Jan, 2017 3 commits
-
-
Sylvain Thénault authored
Now that we have a different ui for simple vs reference keyword, cardinality on keyword reference is no more meaningful and hidden in the UI, since we would like to always have cardinality=1 for reference keyword when generating profiles. The easiest way to do so is to set proper default value, else by removing the attribute we would have to do extra customization to the SEDA 2 profile generator to consider that it shouldn't use the cardinality in the SEDA 2 XSD (0..1). Closes #16070921
-
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
-
Sylvain Thénault authored
-
- 11 Jan, 2017 4 commits
-
-
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.
-
Sylvain Thénault authored
This is not anymore necessary for the web UI which may now inline this into the archive unit creation form.
-
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
-
Sylvain Thénault authored
* make it mandatory ; * update migration script removing id to copy existing value to annotation before removal ; * regenerate test data file since this change adds exported annotations. Along the way, add missing escaping when displaying user_annotation, by using printable_value. Related to #16070476
-
- 10 Jan, 2017 1 commit
-
-
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
-
- 05 Jan, 2017 2 commits
-
-
Sylvain Thénault authored
for instance in case of restrictionEndDate, it was returning [(content entity, restriction end date entity)] instead of [(restriction end date entity, None)] This was only causing cardinality error (eg you get the content entity's cardinality instead of the restriction end date's one) which have been unnoticed until a cardinality uncompatible with attribute was used on a content node. Closes #16688086
-
Sylvain Thénault authored
because the later may only be used inside an attribute in Relax NG, while in SEDA we want to use it as tag content. This should not be problem if the profile is also checked against the SEDA 2 XSD. Closes #16687696
-
- 06 Jan, 2017 1 commit
-
-
Sylvain Thénault authored
Closes #16687771
-
- 11 Jan, 2017 1 commit
-
-
Sylvain Thénault authored
-
- 05 Jan, 2017 1 commit
-
-
Sylvain Thénault authored
-
- 04 Jan, 2017 2 commits
-
-
Sylvain Thénault authored
-
Sylvain Thénault authored
-