#\#CIF_2.0
##############################################################################
#                                                                            #
#       TEST DICTIONARY THAT CONTAINS DEFINITIONS WITH INCORRECTLY USED      #
#                      DEFINITION REPLACED BY ATTRIBUTES                     #
#                                                                            #
##############################################################################
data_DEFINITION_REPLACED_BY_DIC
_dictionary.title            TEST_DEFINITION_REPLACED_BY_DIC
_dictionary.class            Instance
_dictionary.version          1.0.0
_dictionary.date             2021-10-13
_dictionary.uri              https://www.fake.org/test_definition_replaced_by.dic
_dictionary.ddl_conformance  4.2.0
_dictionary.namespace        SoftwareTest
_description.text
;
 This dictionary purposely contains definitions with an incorrectly used
 '_definition_replaced.by' attribute.
;
loop_
_dictionary_audit.version
_dictionary_audit.date
_dictionary_audit.revision
1.0.0 2021-10-13 'Initial release of the dictionary.'

save_TEST_DEFINITION_REPLACED_BY_HEAD

_definition.id               TEST_DEFINITION_REPLACED_BY_HEAD
_definition.scope            Category
_definition.class            HEAD
_definition.update           2021-10-13
_description.text
;
 The HEAD category of the dictionary.
;
_name.category_id            TEST_DEFINITION_REPLACED_BY_DIC
_name.object_id              TEST_DEFINITION_REPLACED_BY_HEAD

save_

save_VALID_DEFINITION_REPLACED_BY

_definition.id               VALID_DEFINITION_REPLACED_BY
_definition.scope            Category
_definition.class            Set
_definition.update           2021-10-13
_description.text
;
 Data items in the VALID_DEFINITION_REPLACED_BY category contain
 definitions that correctly use the '_definition_replaced.by'
 attribute.
;
_name.category_id            TEST_DEFINITION_REPLACED_BY_HEAD
_name.object_id              VALID_DEFINITION_REPLACED_BY

save_

save_valid_definition_replaced_by.new_item

_definition.id               '_valid_definition_replaced_by.new_item'
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that is properly referenced by a different data item
 using the '_definition_replaced.by' data item.
;
_name.category_id            valid_definition_replaced_by
_name.object_id              new_item
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_valid_definition_replaced_by.old_item

_definition.id               '_valid_definition_replaced_by.old_item'
_definition_replaced.id      1
_definition_replaced.by      '_valid_definition_replaced_by.new_item'
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that properly references a different data item
 using the '_definition_replaced.by' data item.
;
_name.category_id            valid_definition_replaced_by
_name.object_id              old_item
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_valid_definition_replaced_by.inapplicable

_definition.id               '_valid_definition_replaced_by.inapplicable'
_definition_replaced.id      1
_definition_replaced.by      .
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that states that the '_definition_replaced.by' data item
 has a CIF inapplicable value ('.').
;
_name.category_id            valid_definition_replaced_by
_name.object_id              inapplicable
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_valid_definition_replaced_by.unknown

_definition.id               '_valid_definition_replaced_by.unknown'
_definition_replaced.id      1
_definition_replaced.by      ?
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that states that the '_definition_replaced.by' data item
 has a CIF unknown value ('?').
;
_name.category_id            valid_definition_replaced_by
_name.object_id              unknown
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_INVALID_DEFINITION_REPLACED_BY

_definition.id               INVALID_DEFINITION_REPLACED_BY
_definition.scope            Category
_definition.class            Set
_definition.update           2021-10-13
_description.text
;
 Data items in the INVALID_DEFINITION_REPLACED_BY category contain
 definitions that incorrectly use the '_definition_replaced.by'
 attribute.
;
_name.category_id            TEST_DEFINITION_REPLACED_BY_HEAD
_name.object_id              INVALID_DEFINITION_REPLACED_BY

save_

save_invalid_definition_replaced_by.defined_item

_definition.id               '_invalid_definition_replaced_by.defined_item'
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that is properly referenced by a different data item
 using the '_definition_replaced.by' data item.
;
_name.category_id            invalid_definition_replaced_by
_name.object_id              defined_item
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_invalid_definition_replaced_by.dot

_definition.id               '_invalid_definition_replaced_by.dot'
_definition_replaced.id      1
_definition_replaced.by      '.'
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that states that the '_definition_replaced.by' attribute
 has a literal dot character ('.') as the value.
;
_name.category_id            invalid_definition_replaced_by
_name.object_id              dot
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_invalid_definition_replaced_by.self_reference

_definition.id               '_invalid_definition_replaced_by.self_ref'
_definition_replaced.id      1
_definition_replaced.by      '_invalid_definition_replaced_by.self_ref'
_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that incorrectly references itself using
 the '_definition_replaced.by' attribute.
;
_name.category_id            invalid_definition_replaced_by
_name.object_id              self_ref
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_invalid_definition_replaced_by.multiple_undefined_refs

_definition.id               '_invalid_definition_replaced_by.multiple_undefined_refs'

loop_
_definition_replaced.id
_definition_replaced.by
1 '_invalid_definition_replaced_by.undefined_1'
2 '_invalid_definition_replaced_by.defined_item'
3 '_invalid_definition_replaced_by.undefined_2'

_definition.scope            Item
_definition.update           2021-10-13
_description.text
;
 Data item that incorrectly references itself using
 the '_definition_replaced.by' attribute.
;
_name.category_id            invalid_definition_replaced_by
_name.object_id              self_reference
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_INVALID_DEFINITION_REPLACED_BY_IN_CATEGORY

_definition.id               INVALID_DEFINITION_REPLACED_BY_IN_CATEGORY
_definition_replaced.id      1
_definition_replaced.by      '_invalid_reference_item'
_definition.scope            Category
_definition.class            Set
_definition.update           2021-10-13
_description.text
;
 Definition of the INVALID_DEFINITION_REPLACED_BY_IN_CATEGORY category
 contains the _definition_replaced.by attribute with an incorrect value.
;
_name.category_id            TEST_DEFINITION_REPLACED_BY_HEAD
_name.object_id              INVALID_DEFINITION_REPLACED_BY_IN_CATEGORY

save_
