#\#CIF_2.0
##############################################################################
#                                                                            #
#       TEST DICTIONARY THAT CONTAINS DEFINITIONS WITH INCORRECTLY USED      #
#                         ENUMERATION DEFAULT VALUES                         #
#                                                                            #
##############################################################################
data_TEST_ENUMERATION_DEFAULT_VALUES_DIC
_dictionary.title            TEST_ENUMERATION_DEFAULT_VALUES_DIC
_dictionary.class            Instance
_dictionary.version          1.0.0
_dictionary.date             2021-08-21
_dictionary.uri              http://www.fake.org/enumeration_default_values.dic
_dictionary.ddl_conformance  4.0.2
_dictionary.namespace        TestEnumerationDefaultDic
_description.text
;
 This dictionary purposely contains definitions with an incorrectly used
 _enumeration_default.value attribute.
;
loop_
_dictionary_audit.version
_dictionary_audit.date
_dictionary_audit.revision
1.0.0 2021-08-21 'Creating the dictionary.'

save_TEST_ENUMERATION_DEFAULT_VALUES_HEAD

_definition.id               TEST_ENUMERATION_DEFAULT_VALUES_HEAD
_definition.scope            Category
_definition.class            HEAD
_definition.update           2021-08-21
_description.text
;
 The HEAD category of the dictionary.
;
_name.category_id            TEST_ENUMERATION_DEFAULT_VALUES_DIC
_name.object_id              TEST_ENUMERATION_DEFAULT_VALUES_HEAD
save_

save_VALID_ENUMERATION_DEFAULT_VALUES

_definition.id               VALID_ENUMERATION_DEFAULT_VALUES
_definition.scope            Category
_definition.class            Set
_definition.update           2021-08-21
_description.text
;
 Data items in the VALID_ENUMERATION_DEFAULT_VALUES category contain
 definitions that properly use the '_enumeration_default.value' attribute.
;
_name.category_id            TEST_ENUMERATION_DEFAULT_VALUES_HEAD
_name.object_id              VALID_ENUMERATION_DEFAULT_VALUES

save_

save_valid_enumeration_default_values.ref_item

_definition.id               '_valid_enumeration_default_values.ref_item'
_definition.update           2021-08-21
_description.text
;
 Data item that is referenced by other definition using
 the '_enumeration.def_index_id' attribute.
;
_name.category_id            valid_enumeration_default_values
_name.object_id              ref_item
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text

save_

save_valid_enumeration_default_values.without_state

_definition.id               '_valid_enumeration_default_values.without_state'
_definition.update           2021-08-21
_description.text
;
 Data item definition that correctly uses the '_enumeration_default.value'
 attribute and does not contain the '_enumeration_set.state' attribute.
;
_name.category_id            valid_enumeration_default_values
_name.object_id              without_state
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text
_enumeration.def_index_id    '_valid_enumeration_default_values.ref_item'
loop_
    _enumeration_default.index 
    _enumeration_default.value
        a state_1
        b state_2
        c state_1

save_

save_valid_enumeration_default_values.with_state

_definition.id               '_valid_enumeration_default_values.with_state'
_definition.update           2021-08-21
_description.text
;
 Data item definition that correctly uses the '_enumeration_default.value'
 attribute in combination with the '_enumeration_set.state' attribute.
;
_name.category_id            valid_enumeration_default_values
_name.object_id              with_state
_type.purpose                State
_type.source                 Assigned
_type.container              Single
_type.contents               Text
_enumeration.def_index_id    '_valid_enumeration_default_values.ref_item'
loop_
    _enumeration_set.state
        state_1
        state_2
loop_
    _enumeration_default.index 
    _enumeration_default.value
        a state_1
        b state_2
        c state_1

save_

save_valid_enumeration_default_values.special_defaults

_definition.id               '_valid_enumeration_default_values.special_defaults'
_definition.update           2021-08-21
_description.text
;
 Data item definition that correctly uses the '_enumeration_default.value'
 attribute in combination with the '_enumeration_set.state' attribute.
 Note, that the '_enumeration_default.value' attribute values purposely
 include CIF special values '.' and '?'.
;
_name.category_id            valid_enumeration_default_values
_name.object_id              special_defaults
_type.purpose                State
_type.source                 Assigned
_type.container              Single
_type.contents               Text
_enumeration.def_index_id    '_valid_enumeration_default_values.ref_item'
loop_
    _enumeration_set.state
        state_1
        state_2
loop_
    _enumeration_default.index 
    _enumeration_default.value
        a state_1
        b state_2
        c state_1
        e ?
        f .

save_

save_valid_enumeration_default_values.special_states

_definition.id               '_valid_enumeration_default_values.special_states'
_definition.update           2021-08-21
_description.text
;
 Data item definition that correctly uses the '_enumeration_default.value'
 attribute in combination with the '_enumeration_set.state' attribute.
 Note, that the '_enumeration_set.state' attribute values purposely
 include CIF special values '.' and '?'.
 
;
_name.category_id            valid_enumeration_default_values
_name.object_id              special_states
_type.purpose                State
_type.source                 Assigned
_type.container              Single
_type.contents               Text
_enumeration.def_index_id    '_valid_enumeration_default_values.ref_item'
loop_
    _enumeration_set.state
        state_1
        state_2
        ?
        .
loop_
    _enumeration_default.index 
    _enumeration_default.value
        a state_1
        b state_2
        c state_1

save_

save_INVALID_ENUMERATION_DEFAULT_VALUES

_definition.id               INVALID_ENUMERATION_DEFAULT_VALUES
_definition.scope            Category
_definition.class            Set
_definition.update           2021-08-21
_description.text
;
 Data items in the INVALID_ENUMERATION_DEFAULT_VALUES category contain
 definitions that incorrectly use the '_enumeration_default.value' attribute.
;
_name.category_id            TEST_ENUMERATION_DEFAULT_VALUES_HEAD
_name.object_id              INVALID_ENUMERATION_DEFAULT_VALUES

save_

save_invalid_enumeration_default_values.missing_ref

_definition.id               '_invalid_enumeration_default_values.missing_ref'
_definition.update           2021-08-21
_description.text
;
 Data item definition that contains the '_enumeration_default.value'
 attribute, but not the '_enumeration.def_index_id' attribute.
;
_name.category_id            invalid_enumeration_default_values
_name.object_id              undefined_ref
_type.purpose                Describe
_type.source                 Assigned
_type.container              Single
_type.contents               Text
loop_
    _enumeration_default.index 
    _enumeration_default.value
        a state_1
        b state_2
        c state_1

save_

save_invalid_enumeration_default_values.state_mismatch

_definition.id               '_invalid_enumeration_default_values.state_mismatch'
_definition.update           2021-08-21
_description.text
;
 Data item definition that contains '_enumeration_default.value' attribute
 values that are not among the values of the '_enumeration_set.state' attribute.
;
_name.category_id            invalid_enumeration_default_values
_name.object_id              state_mismatch
_type.purpose                State
_type.source                 Assigned
_type.container              Single
_type.contents               Text
_enumeration.def_index_id    '_valid_enumeration_default_values.ref_item'
loop_
    _enumeration_set.state
        state_1
        state_2
loop_
    _enumeration_default.index 
    _enumeration_default.value
        a state_1
        b state_2
        c state_1
        d state_4
        e '?'
        f '.'

save_
