SCHEMA SDAI_dictionary_schema; TYPE base_type = SELECT (simple_type, aggregation_type, named_type); END_TYPE; TYPE constructed_type = SELECT (enumeration_type, select_type); END_TYPE; TYPE underlying_type = SELECT (simple_type, aggregation_type, defined_type, constructed_type); END_TYPE; TYPE type_or_rule = SELECT (named_type, global_rule); END_TYPE; TYPE explicit_or_derived = SELECT (explicit_attribute, derived_attribute); END_TYPE; TYPE express_id = STRING; END_TYPE; TYPE info_object_id = STRING; END_TYPE; ENTITY schema_definition; name : express_id; identification : OPTIONAL info_object_id; INVERSE entities : SET [0:?] OF entity_definition FOR parent_schema; types : SET [0:?] OF defined_type FOR parent_schema; global_rules : SET [0:?] OF global_rule FOR parent_schema; external_schemas : SET [0:?] OF external_schema FOR native_schema; UNIQUE UR1 : identification; END_ENTITY; ENTITY interface_specification; current_schema_id : express_id; explicit_items : SET [1:?] OF explicit_item_id; implicit_items : SET [0:?] OF implicit_item_id; END_ENTITY; ENTITY interfaced_item ABSTRACT SUPERTYPE OF (ONEOF (explicit_item_id, implicit_item_id)); foreign_schema_id : express_id; END_ENTITY; ENTITY explicit_item_id ABSTRACT SUPERTYPE OF (ONEOF (used_item, referenced_item)) SUBTYPE OF ( interfaced_item ); local_definition : named_type; original_id : OPTIONAL express_id; END_ENTITY; ENTITY used_item SUBTYPE OF ( explicit_item_id ); END_ENTITY; ENTITY referenced_item SUBTYPE OF ( explicit_item_id ); END_ENTITY; ENTITY implicit_item_id SUBTYPE OF ( interfaced_item ); local_definition : type_or_rule; END_ENTITY; ENTITY external_schema; name : express_id; native_schema : schema_definition; INVERSE for_types : SET [1:?] OF domain_equivalent_type FOR owner; END_ENTITY; ENTITY domain_equivalent_type; external_type_id : express_id; native_type : named_type; owner : external_schema; END_ENTITY; ENTITY named_type ABSTRACT SUPERTYPE OF (ONEOF(entity_definition, defined_type)); name : express_id; where_rules : LIST [0:?] OF where_rule; parent_schema : schema_definition; END_ENTITY; ENTITY defined_type SUBTYPE OF (named_type); domain : underlying_type; END_ENTITY; ENTITY entity_definition SUBTYPE OF (named_type); supertypes : LIST [0:?] OF UNIQUE entity_definition; complex : BOOLEAN; instantiable : BOOLEAN; independent : BOOLEAN; INVERSE attributes : SET [0:?] OF attribute FOR parent_entity; uniqueness_rules : SET [0:?] OF uniqueness_rule FOR parent_entity; global_rules : SET [0:?] OF global_rule FOR entities; END_ENTITY; ENTITY attribute ABSTRACT SUPERTYPE OF (ONEOF(derived_attribute, explicit_attribute, inverse_attribute)); name : express_id; parent_entity : entity_definition; END_ENTITY; ENTITY derived_attribute SUBTYPE OF (attribute); domain : base_type; redeclaring : OPTIONAL explicit_or_derived; END_ENTITY; ENTITY explicit_attribute SUBTYPE OF (attribute); domain : base_type; redeclaring : OPTIONAL explicit_attribute; optional_flag : BOOLEAN; END_ENTITY; ENTITY inverse_attribute SUBTYPE OF (attribute); domain : entity_definition; redeclaring : OPTIONAL inverse_attribute; inverted_attr : explicit_attribute; min_cardinality : OPTIONAL bound; max_cardinality : OPTIONAL bound; duplicates : BOOLEAN; END_ENTITY; ENTITY uniqueness_rule; label : OPTIONAL express_id; attributes : LIST [1:?] OF attribute; parent_entity : entity_definition; END_ENTITY; ENTITY where_rule; label : OPTIONAL express_id; parent_item : type_or_rule; END_ENTITY; ENTITY global_rule; name : express_id; entities : LIST [1:?] OF entity_definition; where_rules : LIST [1:?] OF where_rule; parent_schema : schema_definition; END_ENTITY; ENTITY simple_type ABSTRACT SUPERTYPE OF (ONEOF(integer_type, real_type, string_type, binary_type, logical_type, boolean_type, number_type)); END_ENTITY; ENTITY number_type SUBTYPE OF (simple_type); END_ENTITY; ENTITY integer_type SUBTYPE OF (simple_type); END_ENTITY; ENTITY real_type SUBTYPE OF (simple_type); precision : OPTIONAL bound; END_ENTITY; ENTITY string_type SUBTYPE OF (simple_type); width : OPTIONAL bound; fixed_width : BOOLEAN; END_ENTITY; ENTITY binary_type SUBTYPE OF (simple_type); width : OPTIONAL bound; fixed_width : BOOLEAN; END_ENTITY; ENTITY logical_type SUBTYPE OF (simple_type); END_ENTITY; ENTITY boolean_type SUBTYPE OF (simple_type); END_ENTITY; ENTITY enumeration_type; elements : LIST [1:?] OF UNIQUE express_id; END_ENTITY; ENTITY select_type; selections : SET [1:?] OF named_type; END_ENTITY; ENTITY aggregation_type ABSTRACT SUPERTYPE OF (ONEOF(variable_size_aggregation_type, array_type)); element_type : base_type; END_ENTITY; ENTITY variable_size_aggregation_type ABSTRACT SUPERTYPE OF (ONEOF(set_type, bag_type, list_type)) SUBTYPE OF (aggregation_type); lower_bound : bound; upper_bound : OPTIONAL bound; END_ENTITY; ENTITY set_type SUBTYPE OF (variable_size_aggregation_type); END_ENTITY; ENTITY bag_type SUBTYPE OF (variable_size_aggregation_type); END_ENTITY; ENTITY list_type SUBTYPE OF (variable_size_aggregation_type); unique_flag : BOOLEAN; END_ENTITY; ENTITY array_type SUBTYPE OF (aggregation_type); lower_index : bound; upper_index : bound; unique_flag : BOOLEAN; optional_flag : BOOLEAN; END_ENTITY; ENTITY bound ABSTRACT SUPERTYPE OF (ONEOF(integer_bound, population_dependent_bound)); END_ENTITY; ENTITY population_dependent_bound SUBTYPE OF (bound); END_ENTITY; ENTITY integer_bound SUBTYPE OF (bound); bound_value : INTEGER; END_ENTITY; END_SCHEMA; -- SDAI_dictionary_schema