Classes
Overview
This section describes the semantics of the BMM_CLASS meta-class, its sub-types, constituent parts and relationships. Classes in BMM are generators of types, and are what is authored (i.e. 'programmed') in order to create a model or program text.
The formally typed parts of a class are collectively known as features, and consist of functions, procedures, constants and properties, which appear in feature groups. Within a class, all features are contained in the features attribute (inherited from BMM_MODULE), with features of each specific type being referenced in a dedicated map (BMM_CLASS.properties etc). The following UML illustrates classes and relationships to constituent feature meta-types. Features are described in detail in the following section.
base.bmm.core Package - ClassesClass definitions are the definitional basis of a BMM model, i.e. they are the means of defining the types that are statically used in the model, and the dynamic types generated at runtime. Types are thus derived entities.
The top meta-class BMM_CLASS defines two properties inherent in classes defined in a model, and derived in resulting types: is_abstract and is_primitive. The Boolean attribute is_abstract indicates a class that cannot be directly instantiated. The attribute is_primitive indicates that a class is considered to be part of a primitive type set (typically corresponding to primitive types in another type system). Primitive status has no effect on BMM model semantics, and is provided as a convenience for visualisation and type-system mapping.
BMM distinguishes between simple and generic class definitions via two descendants of BMM_CLASS, i.e. BMM_SIMPLE_CLASS and BMM_GENERIC_CLASS, with the first providing a concrete form of BMM_CLASS that applies to non-generic classes, and the latter defining the additional semantics of generic classes. The meta-type BMM_ENUMERATION is a specialisation of BMM_SIMPLE_CLASS used to represent enumeration classes in BMM models. The meta-types are further described below.
Simple Classes
The simplest type of class definition in a model is an instance of the meta-type BMM_SIMPLE_CLASS, and has a 1:1 relationship with its type. Such classes might be specified in the following abstract syntax:
class DvQuantity
{
feature
// feature definitions
}
class Observation
{
feature
// feature definitions
}
Generic Classes
The generic class meta-type BMM_GENERIC_CLASS adds generic parameters to BMM_CLASS, enabling formal generic parameters to be represented. Each such parameter is expressed using an instance of BMM_PARAMETER_TYPE which names the parameter and optionally allows a type constraint to be associated with it, in the usual object-oriented fashion. In BMM, formal parameters have single-letter names, such as 'T', 'U' etc, following typical usage in programming languages. A generic class may also be primitive. Generic classes can be defined in a syntax similar to the following.
//
// a primitive generic class with an open type parameter
//
primitive class List <T>
feature
// feature definitions
//
// a generic class with a constrained type parameter
//
class DvInterval <T:DvOrdered>
feature
// feature definitions
//
// a primitive generic class two type parameters
//
primitive class HashMap <K:Ordered, V>
feature
// feature definitions
The following example shows a generic class Interval<T:Ordered>, which is a class Interval with one formal parameter T constrained to be of type Ordered or any descendant.
Range-Constrained Classes
The value range of any defined type is by default open, meaning that its instances may take any value allowed by the type definition. For primitive types such as String and Integer, this means that any String or Integer value is a valid instance of their respective types. For complex types, instances are composed of hierarchies of values which are similarly unconstrained with respect to their types.
A useful derived form of any concrete type definition (i.e. instance of BMM_EFFECTIVE_TYPE in a model) is one that constrains the legal values of its instances to a particular set of values. The Pascal language provided a well-known precedent, 'sub-range types' that could restrict primitive type value ranges. BMM supports two kinds of range constraint: enumeration and 'value sets'. The additional meta-classes are shown below.
bmm.core.range_constrained Package - Constrained-range Meta-Types, including EnumerationEnumerated Types
In modern programming languages, the enumerated type is the most common kind of range constraint mechanism. In Java for example, an enumeration is a finite set of labels each associated with a singleton value object - either automatically assigned integers, or else programmatically associated instances of any other kind. Enumerated types are supported in BMM via the BMM_ENUMERATION meta-type and descendants.
An enumerated type could in theory be based on any BMM defined type, i.e. any simple or generic type, since instances of either could be constrained. BMM makes the simplification that an enumerated type can only be based on a BMM simple type, which means that in the defined model, an enumeration of a closed generic type Gen<T_subst> is achieved by first defining a simple type based on the closed generic type via inheritance, e.g. a type Gen_T_subst that inherits from Gen<T_subst> can be used as the ancestor of a BMM enumeration type.
For this reason, the BMM_ENUMERATION meta-type is defined as a descendant of BMM_SIMPLE_CLASS, and may have only one ancestor. The value enumeration is represented via a set of enumeration labels (item_names) and constant values (item_values), the latter of which must be of the type represented in the concrete model by the instance of the ancestor class.
Since String and Integer valued enumerations are by far the most common in real models, two descendant classes BMM_ENUMERATION_STRING and BMM_ENUMERATION_INTEGER are provided, which fix the values and types to String and Integer respectively.
The following diagram shows the BMM instance structure corresponding to an attribute declaration lifecycle: TaskLifecycle in a class Order.
The following shows the same class in an abstract syntax.
// an Integer-based enumeration
enumeration class TASK_LIFECYCLE
feature -- Enumeration Literals
planned = 0;
available = 1;
cancelled = 2;
aborted = 3;
abandoned = 4;
underway = 5;
suspended = 6;
resumed = 7;
completed = 8;
The following screenshot shows how this enumeration class appears within a BMM model.
The following shows another enumeration class, this time based on the String type.
// a String-based enumeration
enumeration class ContractStatus
feature -- Enumeration Literals
initial = "Initial";
cancelled = "Cancelled";
active = "Active";
completed = "Completed";
The types String and Integer are assumed to be defined via primitive classes of the same names.
Value-set Types
Another form of range constraint that occurs in many models is the use of 'coded terms' that represent codes from e.g. ISO or IANA value sets such as ISO 639 (languages) and IANA media types. These are particularly prevalent in type systems used in the biosciences where object models routinely include attributes of a Coded Term type that refer to terminologies such as SNOMED CT, WHO ICD10 etc. In such models, it is typical to want to define an attribute being not just of a Coded Term type, but also limited to a particular terminology (such as a coded attribute representing 'language'), or even a specific 'value set' from such a terminology.
The same kind of constraint may be applied to any kind of model type, for example a type representing Medication may be constrained to be instantiated only as instances defined by a medications database. This kind of constraint is known here as a value set, following the common usage in the biomedical sciences, and is supported in a different way than enumerations. The latter is a common programming concept which always involves a dedicated type representing the enumeration. Since the required value-sets are represented explicitly in the model but in an external database or other resource, the constraint is limited to a reference to the relevant resource, and is applied directly to the use of a type within a feature definition, rather than requiring the definition of a new type.
Accordingly, BMM provides the attribute value_constraint: BMM_VALUE_SET_SPEC defined on BMM_MODEL_TYPE. The BMM_VALUE_SET_SPEC meta-type contains two String attributes resource_id and value_set_id which may be used to define a resource (equivalently a namespace) and an identifier of a value set within that resource. BMM does not impose any particular format or resolution algorithm on these identifiers - it is assumed that they can be correctly defined and used within the context of the concrete model usage.
Consequently, an attribute within a standard concrete model such as language: CodedTerm could now be expressed notionally as language: CodedTerm <<iso::639-*>> or language: CodedTerm <<iso::languages>>. The construction within the <<>> is parsed into two pieces around the :: separator, which are then used to populate the BMM_VALUE_SET_SPEC for a type.
The following diagram shows the meta-model structure corresponding to an attribute declaration language: CodedText whose instances are constrained to be from a value-set iso_639-2 within the resource namespace iso.
The following shows a possible abstract syntax value-set type definition.
// a Value-set type
class Document
feature
property language: CodedText <<"iso::iso_639-2">> [1];
Class Qualifiers
The following sub-sections describe qualifiers that may be used on any class definition to achieve a specific status within the model system. BMM qualifiers are designed to map to typical features in programming languages.
Abstract Classes
Any class definition in a BMM model may be marked as 'abstract', to indicate that it cannot be directly instantiated. This qualifier generally maps to the concept of abstract classes in most OOPLs. It may be specified in an abstract syntax as follows.
abstract class ENTRY
feature
// feature definitions
Primitive Type Classes
Class definitions within a BMM model may be marked as 'primitive', enabling them to be visualised and queried as a separate group without otherwise changing the semantics of the entity in the BMM meta-type system. This is normally done to distinguish 'built-in' types used by a model from the classes for which the model was created. An abstract syntax definition may look as follows:
primitive class Integer
feature
// feature definitions
primitive class String
feature
// feature definitions
The following shows part of a BMM model in which a number of classes are classified as primitive (shown in light and dark grey).
Primitive classes are normal BMM classes, other than being marked primitive for convenience, and do not have different semantics.
Class Invariants
A class defined within a model may include invariants, i.e. assertions relating to its state that hold true before and after all public routine calls. Assertions are instances of the class BMM_ASSERTION, which is a tagged Boolean-valued Expression.
The following shows classes with invariants.
//
// a class with simple invariants
//
class COMPOSITION
feature
// feature definitions
invariant
Is_archetype_root: is_archetype_root
Content_valid: content /= Void implies not content.is_empty
//
// a class with more complex invariants
//
class VERSIONED_COMPOSITION
feature
// feature definitions
invariant
Archetype_node_id_valid: all_versions.for_all (
agent (v: VERSION) {
v.archetype_node_id.is_equal (all_versions.first.archetype_node_id);
}
)
Persistent_validity: all_versions.for_all (
agent (v: VERSION) {
v.is_persistent = all_versions.first.data.is_persistent;
}
)
Inheritance
Inheritance in BMM is a relation between a class and one or more types, rather than classes, as in many class-based formalisms. This is primarily to allow classes to be based on specific generic types, rather than just the 'open' type represented by the underlying classes. Multiple inheritance is permitted, with same-named features from different types being treated as clashes needing resolution. See [inheritance_semantics] for a detailed description.
Model Theoretic Questions
The class meta-model as defined here entails certain choices that have consequences, including:
-
All Enumeration types are based on literal values (i.e. not only names), which may be of any concrete type, including constructed types.
Class Definitions
BMM_CLASS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_CLASS (abstract) |
|||
|---|---|---|---|---|
Description |
Meta-type corresponding a class definition in an object model. Inheritance is specified by the
|
|||
Inherit |
||||
Attributes |
Signature |
Meaning |
||
0..1 |
List of immediate inheritance parents. |
|||
1..1 |
package: |
Package this class belongs to. |
||
0..1 |
properties: |
List of attributes defined in this class. |
||
1..1 |
source_schema_id: `String ` |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
||
0..1 |
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|||
1..1 |
is_override: `Boolean ` |
True if this definition overrides a class of the same name in an included schema. |
||
0..1 |
constants: |
List of constants defined in this class. |
||
0..1 |
functions: |
List of functions defined in this class. |
||
0..1 |
procedures: |
List of procedures defined in this class. |
||
0..1 |
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
||
0..1 |
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
||
0..1 |
invariants: |
|||
0..1 |
Subset of |
|||
0..1 |
Subset of |
|||
0..1 |
feature_groups: |
List of feature groups in this class. |
||
Functions |
Signature |
Meaning |
||
1..1 |
type (): |
Generate a type object that represents the type for which this class is the definer. |
||
0..1 |
List of all inheritance parent class names, recursively. |
|||
0..1 |
Compute all descendants by following |
|||
0..1 |
List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be |
|||
0..1 |
Same as |
|||
0..1 |
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|||
1..1 |
package_path (): `String ` |
Fully qualified package name, of form: |
||
1..1 |
class_path (): `String ` |
Fully qualified class name, of form: |
||
1..1 |
is_primitive (): `Boolean ` |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
||
1..1 |
is_abstract (): `Boolean ` |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
||
0..1 |
features (): |
List of all feature definitions introduced in this class. |
||
0..1 |
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
||
0..1 |
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
||
Invariants |
Inv_constructors: |
|||
Inv_converters: |
||||
| BMM_CLASS (abstract) | |||
|---|---|---|---|
Meta-type corresponding a class definition in an object model. Inheritance is specified by the
|
|||
Inherits: BMM_DECLARATION, BMM_MODULE |
|||
Attributes |
|||
name: `String ` [1..1] |
Name of this model element. |
||
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|||
scope: |
Model within which module is defined. |
||
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|||
List of immediate inheritance parents. |
|||
package: |
Package this class belongs to. |
||
properties: |
List of attributes defined in this class. |
||
source_schema_id: `String ` [1..1] |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
||
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|||
is_override: `Boolean ` [1..1] |
True if this definition overrides a class of the same name in an included schema. |
||
constants: |
List of constants defined in this class. |
||
functions: |
List of functions defined in this class. |
||
procedures: |
List of procedures defined in this class. |
||
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
||
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
||
invariants: |
|||
Subset of |
|||
Subset of |
|||
feature_groups: |
List of feature groups in this class. |
||
Functions |
|||
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
||
(abstract) type (): |
Generate a type object that represents the type for which this class is the definer. |
||
List of all inheritance parent class names, recursively. |
|||
Compute all descendants by following |
|||
List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be |
|||
Same as |
|||
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|||
package_path (): `String ` [1..1] |
Fully qualified package name, of form: |
||
class_path (): `String ` [1..1] |
Fully qualified class name, of form: |
||
is_primitive (): `Boolean ` [1..1] |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
||
is_abstract (): `Boolean ` [1..1] |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
||
features (): |
List of all feature definitions introduced in this class. |
||
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
||
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
||
Invariants |
|||
Inv_constructors: |
|||
Inv_converters: |
|||
{
"name": "BMM_CLASS",
"documentation": "Meta-type corresponding a class definition in an object model. Inheritance is specified by the `_ancestors_` attribute, which contains a list of _types_ rather than classes. Inheritance is thus understood in BMM as a stated relationship between classes. The equivalent relationship between types is conformance.\n\nNOTE: unlike UML, the `_name_` is just the root name, even if the class is generic. Use `_type_name()_` to obtain the qualified type name.",
"is_abstract": true,
"ancestors": [
"BMM_MODULE"
],
"properties": {
"ancestors": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "ancestors",
"documentation": "List of immediate inheritance parents.",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"package": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "package",
"documentation": "Package this class belongs to.",
"is_mandatory": true,
"type": "BMM_PACKAGE"
},
"properties": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "properties",
"documentation": "List of attributes defined in this class.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"BMM_PROPERTY"
]
}
},
"source_schema_id": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "source_schema_id",
"documentation": "Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing.",
"is_mandatory": true,
"type": "String"
},
"immediate_descendants": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "immediate_descendants",
"documentation": "List of computed references to base classes of immediate inheritance descendants, derived when members of `_ancestors_` are attached at creation time.",
"type_def": {
"container_type": "List",
"type": "BMM_CLASS"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"is_override": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_override",
"documentation": "True if this definition overrides a class of the same name in an included schema.",
"is_mandatory": true,
"type": "Boolean"
},
"constants": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "constants",
"documentation": "List of constants defined in this class.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"BMM_CONSTANT"
]
}
},
"functions": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "functions",
"documentation": "List of functions defined in this class.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"BMM_FUNCTION"
]
}
},
"procedures": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "procedures",
"documentation": "List of procedures defined in this class.",
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"BMM_PROCEDURE"
]
}
},
"is_primitive": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_primitive",
"documentation": "True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as `String`, `Date`, `Hash<K,V>` etc.",
"type": "Boolean",
"default": false
},
"is_abstract": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "is_abstract",
"documentation": "True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type.",
"type": "Boolean",
"default": false
},
"invariants": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "invariants",
"type_def": {
"container_type": "List",
"type": "BMM_ASSERTION"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"creators": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "creators",
"documentation": "Subset of `_procedures_` that may be used to initialise a new instance of an object, and whose execution will guarantee that class invariants are satisfied.",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"converters": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "converters",
"documentation": "Subset of `_creators_` that create a new instance from a single argument of another type.",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"feature_groups": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "feature_groups",
"documentation": "List of feature groups in this class.",
"type_def": {
"container_type": "List",
"type": "BMM_FEATURE_GROUP"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"type": {
"name": "type",
"documentation": "Generate a type object that represents the type for which this class is the definer.",
"is_abstract": true,
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "BMM_MODEL_TYPE"
}
},
"all_ancestors": {
"name": "all_ancestors",
"documentation": "List of all inheritance parent class names, recursively.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"all_descendants": {
"name": "all_descendants",
"documentation": "Compute all descendants by following `_immediate_descendants_`.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"suppliers": {
"name": "suppliers",
"documentation": "List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be `Any` and this can always be assumed anyway). This list includes primitive types.\n",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"suppliers_non_primitive": {
"name": "suppliers_non_primitive",
"documentation": "Same as `suppliers` minus primitive types, as defined in input schema.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"supplier_closure": {
"name": "supplier_closure",
"documentation": "List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be `Any` and this can always be assumed anyway). This list includes primitive types.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"package_path": {
"name": "package_path",
"documentation": "Fully qualified package name, of form: `package.package`.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"class_path": {
"name": "class_path",
"documentation": "Fully qualified class name, of form: `package.package.CLASS` with package path in lower-case and class in original case.\n",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
},
"is_primitive": {
"name": "is_primitive",
"documentation": "True if this class is designated a primitive type within the overall type system of the schema. Set from schema.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"is_abstract": {
"name": "is_abstract",
"documentation": "True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "Boolean"
}
},
"features": {
"name": "features",
"documentation": "List of all feature definitions introduced in this class.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "BMM_CLASS_FEATURE"
},
"is_nullable": true
},
"flat_features": {
"name": "flat_features",
"documentation": "Consolidated list of all feature definitions from this class and all inheritance ancestors.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "BMM_CLASS_FEATURE"
},
"is_nullable": true
},
"flat_properties": {
"name": "flat_properties",
"documentation": "List of all properties due to current and ancestor classes, keyed by property name.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "BMM_PROPERTY"
},
"is_nullable": true
}
},
"invariants": {
"Inv_constructors": "for_all p in creators : procedures.has(p)",
"Inv_converters": "for_all p in converters : creators.has(p) and p.arity() = 1"
}
}
BMM_SIMPLE_CLASS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_SIMPLE_CLASS |
|
|---|---|---|
Description |
Definition of a simple class, i.e. a class that has no generic parameters and is 1:1 with the type it generates. |
|
Inherit |
||
Functions |
Signature |
Meaning |
1..1 |
type (): |
Generate a type object that represents the type of this class. Can only be an instance of |
| BMM_SIMPLE_CLASS | |
|---|---|
Definition of a simple class, i.e. a class that has no generic parameters and is 1:1 with the type it generates. |
|
Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Model within which module is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
List of immediate inheritance parents. |
|
package: |
Package this class belongs to. |
properties: |
List of attributes defined in this class. |
source_schema_id: `String ` [1..1] |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|
is_override: `Boolean ` [1..1] |
True if this definition overrides a class of the same name in an included schema. |
constants: |
List of constants defined in this class. |
functions: |
List of functions defined in this class. |
procedures: |
List of procedures defined in this class. |
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
invariants: |
+ Inherited from BMM_CLASS |
Subset of |
|
Subset of |
|
feature_groups: |
List of feature groups in this class. |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
type (): |
Generate a type object that represents the type of this class. Can only be an instance of |
List of all inheritance parent class names, recursively. |
|
Compute all descendants by following |
|
List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be |
|
Same as |
|
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|
package_path (): `String ` [1..1] |
Fully qualified package name, of form: |
class_path (): `String ` [1..1] |
Fully qualified class name, of form: |
is_primitive (): `Boolean ` [1..1] |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
is_abstract (): `Boolean ` [1..1] |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
features (): |
List of all feature definitions introduced in this class. |
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
Invariants |
|
Inv_constructors: |
|
Inv_converters: |
|
{
"name": "BMM_SIMPLE_CLASS",
"documentation": "Definition of a simple class, i.e. a class that has no generic parameters and is 1:1 with the type it generates.",
"ancestors": [
"BMM_CLASS"
],
"functions": {
"type": {
"name": "type",
"documentation": "Generate a type object that represents the type of this class. Can only be an instance of `BMM_SIMPLE_TYPE` or a descendant.",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "BMM_SIMPLE_TYPE"
}
}
}
}
BMM_GENERIC_CLASS Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_GENERIC_CLASS |
|
|---|---|---|
Description |
Definition of a generic class in an object model. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
1..1 |
generic_parameters: |
List of formal generic parameters, keyed by name. These are defined either directly on this class or by the inclusion of an ancestor class which is generic. |
Functions |
Signature |
Meaning |
0..1 |
Add suppliers from generic parameters. |
|
1..1 |
type (): |
Generate a fully open |
1..1 |
generic_parameter_conformance_type ( |
For a generic class, type to which generic parameter |
| BMM_GENERIC_CLASS | |
|---|---|
Definition of a generic class in an object model. |
|
Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Model within which module is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
List of immediate inheritance parents. |
|
package: |
Package this class belongs to. |
properties: |
List of attributes defined in this class. |
source_schema_id: `String ` [1..1] |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|
is_override: `Boolean ` [1..1] |
True if this definition overrides a class of the same name in an included schema. |
constants: |
List of constants defined in this class. |
functions: |
List of functions defined in this class. |
procedures: |
List of procedures defined in this class. |
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
invariants: |
+ Inherited from BMM_CLASS |
Subset of |
|
Subset of |
|
feature_groups: |
List of feature groups in this class. |
generic_parameters: |
List of formal generic parameters, keyed by name. These are defined either directly on this class or by the inclusion of an ancestor class which is generic. |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
type (): |
Generate a fully open |
List of all inheritance parent class names, recursively. |
|
Compute all descendants by following |
|
Add suppliers from generic parameters. |
|
Same as |
|
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|
package_path (): `String ` [1..1] |
Fully qualified package name, of form: |
class_path (): `String ` [1..1] |
Fully qualified class name, of form: |
is_primitive (): `Boolean ` [1..1] |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
is_abstract (): `Boolean ` [1..1] |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
features (): |
List of all feature definitions introduced in this class. |
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
generic_parameter_conformance_type ( |
For a generic class, type to which generic parameter |
Invariants |
|
Inv_constructors: |
|
Inv_converters: |
|
{
"name": "BMM_GENERIC_CLASS",
"documentation": "Definition of a generic class in an object model.",
"ancestors": [
"BMM_CLASS"
],
"properties": {
"generic_parameters": {
"_type": "P_BMM_GENERIC_PROPERTY",
"name": "generic_parameters",
"documentation": "List of formal generic parameters, keyed by name. These are defined either directly on this class or by the inclusion of an ancestor class which is generic.",
"is_mandatory": true,
"type_def": {
"root_type": "Hash",
"generic_parameters": [
"String",
"BMM_PARAMETER_TYPE"
]
}
}
},
"functions": {
"suppliers": {
"name": "suppliers",
"documentation": "Add suppliers from generic parameters.",
"result": {
"_type": "P_BMM_CONTAINER_TYPE",
"container_type": "List",
"type": "String"
},
"is_nullable": true
},
"type": {
"name": "type",
"documentation": "Generate a fully open `BMM_GENERIC_TYPE` instance that corresponds to this class definition",
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "BMM_GENERIC_TYPE"
}
},
"generic_parameter_conformance_type": {
"name": "generic_parameter_conformance_type",
"documentation": "For a generic class, type to which generic parameter `a_name` conforms e.g. if this class is `Interval <T:Comparable>` then the Result will be the single type `Comparable`. For an unconstrained type `T`, the Result will be `Any`.",
"parameters": {
"a_name": {
"_type": "P_BMM_SINGLE_FUNCTION_PARAMETER",
"name": "a_name",
"type": "String"
}
},
"result": {
"_type": "P_BMM_SIMPLE_TYPE",
"type": "String"
}
}
}
}
BMM_ENUMERATION Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_ENUMERATION |
|
|---|---|---|
Description |
Definition of an enumeration class, understood as a class whose value range is constrained extensionally, i.e. by an explicit enumeration of named singleton instances. Only one inheritance ancestor is allowed in order to provide the base type to which the range constraint is applied. The common notion of a set of literals with no explicit defined values is represented as the degenerate subtype |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, … are assumed. |
|
0..1 |
item_values: |
Optional list of specific values. Must be 1:1 with |
Functions |
Signature |
Meaning |
1..1 |
Map of |
|
| BMM_ENUMERATION | |
|---|---|
Definition of an enumeration class, understood as a class whose value range is constrained extensionally, i.e. by an explicit enumeration of named singleton instances. Only one inheritance ancestor is allowed in order to provide the base type to which the range constraint is applied. The common notion of a set of literals with no explicit defined values is represented as the degenerate subtype |
|
Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS, BMM_SIMPLE_CLASS |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Model within which module is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
List of immediate inheritance parents. |
|
package: |
Package this class belongs to. |
properties: |
List of attributes defined in this class. |
source_schema_id: `String ` [1..1] |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|
is_override: `Boolean ` [1..1] |
True if this definition overrides a class of the same name in an included schema. |
constants: |
List of constants defined in this class. |
functions: |
List of functions defined in this class. |
procedures: |
List of procedures defined in this class. |
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
invariants: |
+ Inherited from BMM_CLASS |
Subset of |
|
Subset of |
|
feature_groups: |
List of feature groups in this class. |
The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, … are assumed. |
|
item_values: |
Optional list of specific values. Must be 1:1 with |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
type (): |
Generate a type object that represents the type of this class. Can only be an instance of |
List of all inheritance parent class names, recursively. |
|
Compute all descendants by following |
|
List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be |
|
Same as |
|
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|
package_path (): `String ` [1..1] |
Fully qualified package name, of form: |
class_path (): `String ` [1..1] |
Fully qualified class name, of form: |
is_primitive (): `Boolean ` [1..1] |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
is_abstract (): `Boolean ` [1..1] |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
features (): |
List of all feature definitions introduced in this class. |
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
Map of |
|
Invariants |
|
Inv_constructors: |
|
Inv_converters: |
|
{
"name": "BMM_ENUMERATION",
"documentation": "Definition of an enumeration class, understood as a class whose value range is constrained extensionally, i.e. by an explicit enumeration of named singleton instances.\n\nOnly one inheritance ancestor is allowed in order to provide the base type to which the range constraint is applied.\n\nThe common notion of a set of literals with no explicit defined values is represented as the degenerate subtype `BMM_ENUMERATION_INTEGER`, whose values are 0, 1, ...",
"ancestors": [
"BMM_SIMPLE_CLASS"
],
"properties": {
"item_names": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "item_names",
"documentation": "The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, ... are assumed.",
"type_def": {
"container_type": "List",
"type": "String"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
},
"item_values": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "item_values",
"documentation": "Optional list of specific values. Must be 1:1 with `_item_names_` list.",
"type_def": {
"container_type": "List",
"type": "BMM_PRIMITIVE_VALUE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
},
"functions": {
"name_map": {
"name": "name_map",
"documentation": "Map of `_item_names_` to `_item_values_` (stringified).",
"result": {
"_type": "P_BMM_GENERIC_TYPE",
"root_type": "Hash",
"generic_parameters": [
"String",
"String"
]
}
}
}
}
BMM_ENUMERATION_STRING Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_ENUMERATION_STRING |
|
|---|---|---|
Description |
String-based enumeration meta-type. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
item_values: |
Optional list of specific values. Must be 1:1 with |
| BMM_ENUMERATION_STRING | |
|---|---|
String-based enumeration meta-type. |
|
Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS, BMM_SIMPLE_CLASS, BMM_ENUMERATION |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Model within which module is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
List of immediate inheritance parents. |
|
package: |
Package this class belongs to. |
properties: |
List of attributes defined in this class. |
source_schema_id: `String ` [1..1] |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|
is_override: `Boolean ` [1..1] |
True if this definition overrides a class of the same name in an included schema. |
constants: |
List of constants defined in this class. |
functions: |
List of functions defined in this class. |
procedures: |
List of procedures defined in this class. |
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
invariants: |
+ Inherited from BMM_CLASS |
Subset of |
|
Subset of |
|
feature_groups: |
List of feature groups in this class. |
The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, … are assumed. |
|
item_values: |
Optional list of specific values. Must be 1:1 with |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
type (): |
Generate a type object that represents the type of this class. Can only be an instance of |
List of all inheritance parent class names, recursively. |
|
Compute all descendants by following |
|
List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be |
|
Same as |
|
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|
package_path (): `String ` [1..1] |
Fully qualified package name, of form: |
class_path (): `String ` [1..1] |
Fully qualified class name, of form: |
is_primitive (): `Boolean ` [1..1] |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
is_abstract (): `Boolean ` [1..1] |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
features (): |
List of all feature definitions introduced in this class. |
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
Map of |
|
Invariants |
|
Inv_constructors: |
|
Inv_converters: |
|
{
"name": "BMM_ENUMERATION_STRING",
"documentation": "String-based enumeration meta-type.",
"ancestors": [
"BMM_ENUMERATION"
],
"properties": {
"item_values": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "item_values",
"documentation": "Optional list of specific values. Must be 1:1 with `_item_names_` list.",
"type_def": {
"container_type": "List",
"type": "BMM_STRING_VALUE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
}
}
BMM_ENUMERATION_INTEGER Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_ENUMERATION_INTEGER |
|
|---|---|---|
Description |
Integer-based enumeration meta-type. |
|
Inherit |
||
Attributes |
Signature |
Meaning |
0..1 |
item_values: |
Optional list of specific values. Must be 1:1 with |
| BMM_ENUMERATION_INTEGER | |
|---|---|
Integer-based enumeration meta-type. |
|
Inherits: BMM_DECLARATION, BMM_MODULE, BMM_CLASS, BMM_SIMPLE_CLASS, BMM_ENUMERATION |
|
Attributes |
|
name: `String ` [1..1] |
Name of this model element. |
Optional documentation of this element, as a keyed list. It is strongly recommended to use the following key /type combinations for the relevant purposes:
Other keys and value types may be freely added. |
|
scope: |
Model within which module is defined. |
Optional meta-data of this element, as a keyed list. May be used to extend the meta-model. |
|
List of immediate inheritance parents. |
|
package: |
Package this class belongs to. |
properties: |
List of attributes defined in this class. |
source_schema_id: `String ` [1..1] |
Reference to original source schema defining this class. Useful for UI tools to determine which original schema file to open for a given class for manual editing. |
List of computed references to base classes of immediate inheritance descendants, derived when members of |
|
is_override: `Boolean ` [1..1] |
True if this definition overrides a class of the same name in an included schema. |
constants: |
List of constants defined in this class. |
functions: |
List of functions defined in this class. |
procedures: |
List of procedures defined in this class. |
is_primitive: |
True if this class represents a type considered to be primitive in the type system, i.e. any typically built-in or standard library type such as |
is_abstract: |
True if this class is marked as abstract, i.e. direct instances cannot be created from its direct type. |
invariants: |
+ Inherited from BMM_CLASS |
Subset of |
|
Subset of |
|
feature_groups: |
List of feature groups in this class. |
The list of names of the enumeration. If no values are supplied, the integer values 0, 1, 2, … are assumed. |
|
item_values: |
Optional list of specific values. Must be 1:1 with |
Functions |
|
is_root_scope (): |
True if this declaration entity is the root of the declaration hierarchy. |
type (): |
Generate a type object that represents the type of this class. Can only be an instance of |
List of all inheritance parent class names, recursively. |
|
Compute all descendants by following |
|
List of names of immediate supplier classes, including concrete generic parameters, concrete descendants of abstract statically defined types, and inherited suppliers. (Where generics are unconstrained, no class name is added, since logically it would be |
|
Same as |
|
List of names of all classes in full supplier closure, including concrete generic parameters; (where generics are unconstrained, no class name is added, since logically it would be |
|
package_path (): `String ` [1..1] |
Fully qualified package name, of form: |
class_path (): `String ` [1..1] |
Fully qualified class name, of form: |
is_primitive (): `Boolean ` [1..1] |
True if this class is designated a primitive type within the overall type system of the schema. Set from schema. |
is_abstract (): `Boolean ` [1..1] |
True if this class is abstract in its model. Value provided from an underlying data property set at creation or construction time. |
features (): |
List of all feature definitions introduced in this class. |
flat_features (): |
Consolidated list of all feature definitions from this class and all inheritance ancestors. |
flat_properties (): |
List of all properties due to current and ancestor classes, keyed by property name. |
Map of |
|
Invariants |
|
Inv_constructors: |
|
Inv_converters: |
|
{
"name": "BMM_ENUMERATION_INTEGER",
"documentation": "Integer-based enumeration meta-type.",
"ancestors": [
"BMM_ENUMERATION"
],
"properties": {
"item_values": {
"_type": "P_BMM_CONTAINER_PROPERTY",
"name": "item_values",
"documentation": "Optional list of specific values. Must be 1:1 with `_item_names_` list.",
"type_def": {
"container_type": "List",
"type": "BMM_INTEGER_VALUE"
},
"cardinality": {
"lower": 0,
"upper_unbounded": true
}
}
}
}
BMM_VALUE_SET_SPEC Class
-
Definition
-
Effective
-
BMM
-
UML
Class |
BMM_VALUE_SET_SPEC |
|
|---|---|---|
Description |
Definition of a range-constrained class whose value range is defined by reference to a 'value set' within an external resource, e.g. a reference data service. |
|
Attributes |
Signature |
Meaning |
1..1 |
resource_id: `String ` |
Identifier of a resource (typically available as a service) that contains legal values of a specific type. This is typically a URI but need not be. |
1..1 |
value_set_id: `String ` |
Identifier of a value set within the resource identified by |
| BMM_VALUE_SET_SPEC | |
|---|---|
Definition of a range-constrained class whose value range is defined by reference to a 'value set' within an external resource, e.g. a reference data service. |
|
Attributes |
|
resource_id: `String ` [1..1] |
Identifier of a resource (typically available as a service) that contains legal values of a specific type. This is typically a URI but need not be. |
value_set_id: `String ` [1..1] |
Identifier of a value set within the resource identified by |
{
"name": "BMM_VALUE_SET_SPEC",
"documentation": "Definition of a range-constrained class whose value range is defined by reference to a 'value set' within an external resource, e.g. a reference data service.",
"properties": {
"resource_id": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "resource_id",
"documentation": "Identifier of a resource (typically available as a service) that contains legal values of a specific type. This is typically a URI but need not be.",
"is_mandatory": true,
"type": "String"
},
"value_set_id": {
"_type": "P_BMM_SINGLE_PROPERTY",
"name": "value_set_id",
"documentation": "Identifier of a value set within the resource identified by `_resource_id_`, which specifies the set of legal values of a type. This might be a URI, but need not be.",
"is_mandatory": true,
"type": "String"
}
}
}