Commit b6e90d5f authored by Yann Voté's avatar Yann Voté
Browse files

[code gen] Skip RelatedObjectRef element on Content elements

parent e21f74ee42a6
......@@ -342,11 +342,6 @@ class SEDASource(AnyEntity):
fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality', 'source'])
value_attr = 'source'
class SEDARelatedObjectReference(AnyEntity):
__regid__ = 'SEDARelatedObjectReference'
fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
value_attr = None
class SEDACreatedDate(AnyEntity):
__regid__ = 'SEDACreatedDate'
fetch_attrs, cw_fetch_order = fetch_config(['user_cardinality'])
......
......@@ -359,9 +359,6 @@ msgstr ""
msgid "New SEDARegisteredDate"
msgstr ""
msgid "New SEDARelatedObjectReference"
msgstr ""
msgid "New SEDARelatedTransferReference"
msgstr ""
......@@ -1065,7 +1062,7 @@ msgstr ""
msgid "SEDAIsPartOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_part_of.object"
msgctxt "inlined:SEDAContent.seda_is_part_of.object"
msgid "SEDAIsPartOf"
msgstr ""
......@@ -1075,7 +1072,7 @@ msgstr ""
msgid "SEDAIsVersionOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_version_of.object"
msgctxt "inlined:SEDAContent.seda_is_version_of.object"
msgid "SEDAIsVersionOf"
msgstr ""
......@@ -1294,7 +1291,7 @@ msgstr ""
msgid "SEDAReferences"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_references.object"
msgctxt "inlined:SEDAContent.seda_references.object"
msgid "SEDAReferences"
msgstr ""
......@@ -1307,16 +1304,6 @@ msgstr ""
msgid "SEDARegisteredDate_plural"
msgstr ""
msgid "SEDARelatedObjectReference"
msgstr ""
msgctxt "inlined:SEDAContent.seda_related_object_reference.object"
msgid "SEDARelatedObjectReference"
msgstr ""
msgid "SEDARelatedObjectReference_plural"
msgstr ""
msgid "SEDARelatedTransferReference"
msgstr ""
......@@ -1342,7 +1329,7 @@ msgstr ""
msgid "SEDAReplaces"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_replaces.object"
msgctxt "inlined:SEDAContent.seda_replaces.object"
msgid "SEDAReplaces"
msgstr ""
......@@ -1419,7 +1406,7 @@ msgstr ""
msgid "SEDARequires"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_requires.object"
msgctxt "inlined:SEDAContent.seda_requires.object"
msgid "SEDARequires"
msgstr ""
......@@ -2355,12 +2342,6 @@ msgstr ""
msgid "This SEDARegisteredDate:"
msgstr ""
msgid "This SEDARelatedObjectReference"
msgstr ""
msgid "This SEDARelatedObjectReference:"
msgstr ""
msgid "This SEDARelatedTransferReference"
msgstr ""
......@@ -2989,14 +2970,14 @@ msgstr ""
msgid "add a SEDAIsPartOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_part_of.object"
msgctxt "inlined:SEDAContent.seda_is_part_of.object"
msgid "add a SEDAIsPartOf"
msgstr ""
msgid "add a SEDAIsVersionOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_version_of.object"
msgctxt "inlined:SEDAContent.seda_is_version_of.object"
msgid "add a SEDAIsVersionOf"
msgstr ""
......@@ -3149,20 +3130,13 @@ msgstr ""
msgid "add a SEDAReferences"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_references.object"
msgctxt "inlined:SEDAContent.seda_references.object"
msgid "add a SEDAReferences"
msgstr ""
msgid "add a SEDARegisteredDate"
msgstr ""
msgid "add a SEDARelatedObjectReference"
msgstr ""
msgctxt "inlined:SEDAContent.seda_related_object_reference.object"
msgid "add a SEDARelatedObjectReference"
msgstr ""
msgid "add a SEDARelatedTransferReference"
msgstr ""
......@@ -3179,7 +3153,7 @@ msgstr ""
msgid "add a SEDAReplaces"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_replaces.object"
msgctxt "inlined:SEDAContent.seda_replaces.object"
msgid "add a SEDAReplaces"
msgstr ""
......@@ -3247,7 +3221,7 @@ msgstr ""
msgid "add a SEDARequires"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_requires.object"
msgctxt "inlined:SEDAContent.seda_requires.object"
msgid "add a SEDARequires"
msgstr ""
......@@ -3891,10 +3865,6 @@ msgctxt "SEDARegisteredDate"
msgid "container"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgid "container"
msgstr ""
msgctxt "SEDARelatedTransferReference"
msgid "container"
msgstr ""
......@@ -5864,7 +5834,7 @@ msgstr ""
msgid "seda_is_part_of_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_is_part_of_object"
msgstr ""
......@@ -5878,7 +5848,7 @@ msgstr ""
msgid "seda_is_version_of_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_is_version_of_object"
msgstr ""
......@@ -6359,7 +6329,7 @@ msgstr ""
msgid "seda_references_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_references_object"
msgstr ""
......@@ -6377,20 +6347,6 @@ msgctxt "SEDAContent"
msgid "seda_registered_date_object"
msgstr ""
msgid "seda_related_object_reference"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgid "seda_related_object_reference"
msgstr ""
msgid "seda_related_object_reference_object"
msgstr ""
msgctxt "SEDAContent"
msgid "seda_related_object_reference_object"
msgstr ""
msgid "seda_related_transfer_reference"
msgstr ""
......@@ -6461,7 +6417,7 @@ msgstr ""
msgid "seda_replaces_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_replaces_object"
msgstr ""
......@@ -6549,7 +6505,7 @@ msgstr ""
msgid "seda_requires_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_requires_object"
msgstr ""
......@@ -7721,10 +7677,6 @@ msgctxt "SEDARegisteredDate"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDARelatedTransferReference"
msgid "user_cardinality"
msgstr ""
......
......@@ -362,9 +362,6 @@ msgstr ""
msgid "New SEDARegisteredDate"
msgstr ""
msgid "New SEDARelatedObjectReference"
msgstr ""
msgid "New SEDARelatedTransferReference"
msgstr ""
......@@ -1068,7 +1065,7 @@ msgstr ""
msgid "SEDAIsPartOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_part_of.object"
msgctxt "inlined:SEDAContent.seda_is_part_of.object"
msgid "SEDAIsPartOf"
msgstr ""
......@@ -1078,7 +1075,7 @@ msgstr ""
msgid "SEDAIsVersionOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_version_of.object"
msgctxt "inlined:SEDAContent.seda_is_version_of.object"
msgid "SEDAIsVersionOf"
msgstr ""
......@@ -1297,7 +1294,7 @@ msgstr ""
msgid "SEDAReferences"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_references.object"
msgctxt "inlined:SEDAContent.seda_references.object"
msgid "SEDAReferences"
msgstr ""
......@@ -1310,16 +1307,6 @@ msgstr ""
msgid "SEDARegisteredDate_plural"
msgstr ""
msgid "SEDARelatedObjectReference"
msgstr ""
msgctxt "inlined:SEDAContent.seda_related_object_reference.object"
msgid "SEDARelatedObjectReference"
msgstr ""
msgid "SEDARelatedObjectReference_plural"
msgstr ""
msgid "SEDARelatedTransferReference"
msgstr ""
......@@ -1345,7 +1332,7 @@ msgstr ""
msgid "SEDAReplaces"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_replaces.object"
msgctxt "inlined:SEDAContent.seda_replaces.object"
msgid "SEDAReplaces"
msgstr ""
......@@ -1422,7 +1409,7 @@ msgstr ""
msgid "SEDARequires"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_requires.object"
msgctxt "inlined:SEDAContent.seda_requires.object"
msgid "SEDARequires"
msgstr ""
......@@ -2358,12 +2345,6 @@ msgstr ""
msgid "This SEDARegisteredDate:"
msgstr ""
msgid "This SEDARelatedObjectReference"
msgstr ""
msgid "This SEDARelatedObjectReference:"
msgstr ""
msgid "This SEDARelatedTransferReference"
msgstr ""
......@@ -2992,14 +2973,14 @@ msgstr ""
msgid "add a SEDAIsPartOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_part_of.object"
msgctxt "inlined:SEDAContent.seda_is_part_of.object"
msgid "add a SEDAIsPartOf"
msgstr ""
msgid "add a SEDAIsVersionOf"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_is_version_of.object"
msgctxt "inlined:SEDAContent.seda_is_version_of.object"
msgid "add a SEDAIsVersionOf"
msgstr ""
......@@ -3152,20 +3133,13 @@ msgstr ""
msgid "add a SEDAReferences"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_references.object"
msgctxt "inlined:SEDAContent.seda_references.object"
msgid "add a SEDAReferences"
msgstr ""
msgid "add a SEDARegisteredDate"
msgstr ""
msgid "add a SEDARelatedObjectReference"
msgstr ""
msgctxt "inlined:SEDAContent.seda_related_object_reference.object"
msgid "add a SEDARelatedObjectReference"
msgstr ""
msgid "add a SEDARelatedTransferReference"
msgstr ""
......@@ -3182,7 +3156,7 @@ msgstr ""
msgid "add a SEDAReplaces"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_replaces.object"
msgctxt "inlined:SEDAContent.seda_replaces.object"
msgid "add a SEDAReplaces"
msgstr ""
......@@ -3250,7 +3224,7 @@ msgstr ""
msgid "add a SEDARequires"
msgstr ""
msgctxt "inlined:SEDARelatedObjectReference.seda_requires.object"
msgctxt "inlined:SEDAContent.seda_requires.object"
msgid "add a SEDARequires"
msgstr ""
......@@ -3894,10 +3868,6 @@ msgctxt "SEDARegisteredDate"
msgid "container"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgid "container"
msgstr ""
msgctxt "SEDARelatedTransferReference"
msgid "container"
msgstr ""
......@@ -5876,7 +5846,7 @@ msgstr ""
msgid "seda_is_part_of_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_is_part_of_object"
msgstr ""
......@@ -5890,7 +5860,7 @@ msgstr ""
msgid "seda_is_version_of_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_is_version_of_object"
msgstr ""
......@@ -6371,7 +6341,7 @@ msgstr ""
msgid "seda_references_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_references_object"
msgstr ""
......@@ -6389,20 +6359,6 @@ msgctxt "SEDAContent"
msgid "seda_registered_date_object"
msgstr ""
msgid "seda_related_object_reference"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgid "seda_related_object_reference"
msgstr ""
msgid "seda_related_object_reference_object"
msgstr ""
msgctxt "SEDAContent"
msgid "seda_related_object_reference_object"
msgstr ""
msgid "seda_related_transfer_reference"
msgstr ""
......@@ -6473,7 +6429,7 @@ msgstr ""
msgid "seda_replaces_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_replaces_object"
msgstr ""
......@@ -6561,7 +6517,7 @@ msgstr ""
msgid "seda_requires_object"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgctxt "SEDAContent"
msgid "seda_requires_object"
msgstr ""
......@@ -7733,10 +7689,6 @@ msgctxt "SEDARegisteredDate"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDARelatedObjectReference"
msgid "user_cardinality"
msgstr ""
msgctxt "SEDARelatedTransferReference"
msgid "user_cardinality"
msgstr ""
......
......@@ -1242,21 +1242,6 @@ class content_source(RelationDefinition):
inlined = True
constraints = []
@seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
annotable=False)
class SEDARelatedObjectReference(EntityType):
u""""""
class content_related_object_reference(RelationDefinition):
name = 'seda_related_object_reference'
subject = 'SEDARelatedObjectReference'
object = 'SEDAContent'
cardinality = '1?'
composite = fulltext_container = 'object'
inlined = True
constraints = []
@seda_profile_element(cardinalities=['0..1', '1'], default_cardinality='0..1',
annotable=False)
class SEDACreatedDate(EntityType):
......@@ -1566,10 +1551,10 @@ class SEDAIsVersionOf(EntityType):
u""""""
class related_object_reference_is_version_of(RelationDefinition):
class content_is_version_of(RelationDefinition):
name = 'seda_is_version_of'
subject = 'SEDAIsVersionOf'
object = 'SEDARelatedObjectReference'
object = 'SEDAContent'
cardinality = '1*'
composite = fulltext_container = 'object'
inlined = True
......@@ -1581,10 +1566,10 @@ class SEDAReplaces(EntityType):
u""""""
class related_object_reference_replaces(RelationDefinition):
class content_replaces(RelationDefinition):
name = 'seda_replaces'
subject = 'SEDAReplaces'
object = 'SEDARelatedObjectReference'
object = 'SEDAContent'
cardinality = '1*'
composite = fulltext_container = 'object'
inlined = True
......@@ -1596,10 +1581,10 @@ class SEDARequires(EntityType):
u""""""
class related_object_reference_requires(RelationDefinition):
class content_requires(RelationDefinition):
name = 'seda_requires'
subject = 'SEDARequires'
object = 'SEDARelatedObjectReference'
object = 'SEDAContent'
cardinality = '1*'
composite = fulltext_container = 'object'
inlined = True
......@@ -1611,10 +1596,10 @@ class SEDAIsPartOf(EntityType):
u""""""
class related_object_reference_is_part_of(RelationDefinition):
class content_is_part_of(RelationDefinition):
name = 'seda_is_part_of'
subject = 'SEDAIsPartOf'
object = 'SEDARelatedObjectReference'
object = 'SEDAContent'
cardinality = '1*'
composite = fulltext_container = 'object'
inlined = True
......@@ -1626,10 +1611,10 @@ class SEDAReferences(EntityType):
u""""""
class related_object_reference_references(RelationDefinition):
class content_references(RelationDefinition):
name = 'seda_references'
subject = 'SEDAReferences'
object = 'SEDARelatedObjectReference'
object = 'SEDAContent'
cardinality = '1*'
composite = fulltext_container = 'object'
inlined = True
......
......@@ -302,9 +302,7 @@ class SEDAXSDExportFuncTC(XmlTestMixin, CubicWebTC):
create('SEDAKeywordContent', reverse_seda_keyword_content=kw)
history_item = create('SEDACustodialHistoryItem', seda_custodial_history_item=content)
create('SEDAwhen', seda_when=history_item)
related_ref = create('SEDARelatedObjectReference',
seda_related_object_reference=content)
version_of = create('SEDAIsVersionOf', seda_is_version_of=related_ref)
version_of = create('SEDAIsVersionOf', seda_is_version_of=content)
alt2 = create('SEDAAltIsVersionOfArchiveUnitRefId',
reverse_seda_alt_is_version_of_archive_unit_ref_id=version_of)
create('SEDADataObjectReference', seda_data_object_reference=alt2)
......@@ -325,7 +323,6 @@ class SEDAXSDExportFuncTC(XmlTestMixin, CubicWebTC):
self.unit_eid = unit.eid
self.unit_alt_seq_eid = unit_alt_seq.eid
self.appraisal_rule_eid = appraisal_rule.eid
self.related_ref_eid = related_ref.eid
def check_xsd_profile(self, xsd_data, profile_file):
"""Check that the a SEDA profile is exported as expected and can be used to validate an
......
......@@ -142,7 +142,6 @@ ives['SEDANeedReassessingAuthorization'] = 'subobject'
ives['SEDAStorageRule'] = 'subobject'
ives['SEDAHeight'] = 'subobject'
ives['SEDALanguage'] = 'subobject'
ives['SEDARelatedObjectReference'] = 'subobject'
ives['SEDASeqDisseminationRuleRule'] = 'subobject'
ives['SEDAAltReuseRulePreventInheritance'] = 'subobject'
ives['SEDAClassificationRule'] = 'subobject'
......@@ -328,8 +327,6 @@ abaa.tag_object_of(('*', 'seda_recipient_to', '*'), False)
abaa.tag_subject_of(('*', 'seda_recipient_to', '*'), False)
abaa.tag_subject_of(('*', 'seda_source', '*'), False)
abaa.tag_object_of(('*', 'seda_source', '*'), False)
abaa.tag_subject_of(('*', 'seda_related_object_reference', '*'), False)
abaa.tag_object_of(('*', 'seda_related_object_reference', '*'), False)
abaa.tag_subject_of(('*', 'seda_created_date', '*'), False)
abaa.tag_object_of(('*', 'seda_created_date', '*'), False)
abaa.tag_subject_of(('*', 'seda_transacted_date', '*'), False)
......@@ -743,8 +740,6 @@ afs.tag_object_of(('*', 'seda_recipient_to', '*'), 'main', 'hidden')
afs.tag_subject_of(('*', 'seda_recipient_to', '*'), 'main', 'attributes')
afs.tag_subject_of(('*', 'seda_source', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_source', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_related_object_reference', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_related_object_reference', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_created_date', '*'), 'main', 'hidden')
afs.tag_object_of(('*', 'seda_created_date', '*'), 'main', 'inlined')
afs.tag_subject_of(('*', 'seda_transacted_date', '*'), 'main', 'hidden')
......
......@@ -64,6 +64,7 @@ JUMP_ELEMENTS = set([
'Management',
'CustodialHistory',
'Gps',
'RelatedObjectReference',
])
XSD2YAMS = {
'string': 'String',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment