Qualifiers

Qualifiers enable meta-data to be associated with modeled elements, and can provide additional information about the element such as a human readable description for a structure or property, or if a particular property is readable or writable.

[Description("example of a structure"), Version("0.0.1")]
Structure schema_structureName {
[Description("String valued property"), Write(true)]
String pname = "pValue";
Sint32 [] ivector = {2, 4, 3};
Boolean bName;
};

Qualifiers precede the model element associated with them, and are indicated by a comma separated list enclosed by square brackets. Each qualifier starts with a name, followed by a value enclosed in parenthesis (for non-array values) or by curly braces (for array valued qualifiers).  For a particular model element, the value of the qualifier is determined as follows:

  1. If the qualifier is set on that element, it has the value specified.
  2. If the qualifier policy is not restricted, and the qualifier has been set on one or more model elements closer to the root of its propagation graph, then the qualifier has the value specified closest to the element.
  3. If the qualifier has a default value when defined, it takes that value.
  4. Else it has no value (i.e., the qualifier is null).

Each qualifier has a scope that defines the type of element (e.g., property or class) it can apply to, a propagation policy that defines how it is propagated across elements within an inheritance hierarchy, and a data type that defines the type of value it can take along with an optional default value. For Boolean-valued qualifiers, the presence of a qualifier without a value implies that its value is true, i.e., Write(true) and Write both imply that the value of the qualifier Write is true.

A qualifier scope can be one of the following:

Scope Description
Enumeration The qualifier applies to Enumerations.
Structure The qualifier applies to Structures.
Class The qualifier applies to Classes.
Association The qualifier applies to Association classes. Note that Fusion does not distinguish between normal classes and association classes, but allows definitions as associations to enable interoperability with DMTF defined specifications.
Interface The qualifier applies to Interface definitions.
Method The qualifier applies to method definitions.
Parameter The qualifier applies to method parameter definitions.
Property The qualifier applies to properties.
Reference The qualifier applies to reference properties.
Any The qualifier applies to any model element that can support qualifiers.

A qualifier Policy can be of the following types:

Policy Description
Restricted A restricted qualifier applies only to the element it applies to, but does not propagate further to sub types of the element it is defined on.
DisableOverride The qualifier propagates to sub types, but cannot be overridden to take a new value by sub types.
EnableOverride The qualifier propagates to sub types, and can be overridden to take a new value further down the propagation graph. If no policy is declared on a qualifier (i.e., the policy value is null), it is assumed to have the policy EnableOverride.

Standard Qualifiers

Certain qualifiers are "standard" (known to Fusion), and do not need to be defined. These include the following:

Name Type Default value Scope Policy
Abstract Boolean false CLASS,ASSOCIATION,STRUCTURE Restricted
AggregationKind String None REFERENCE DisableOverride
ArrayType String Bag PROPERTY,PARAMETER,METHOD,REFERENCE DisableOverride
BitMap String[] null METHOD,PROPERTY,PARAMETER null
BitValues String[] null METHOD,PROPERTY,PARAMETER null
Counter Boolean false METHOD,PROPERTY,PARAMETER DisableOverride
Deprecated String[] null ANY Restricted
Description String null ANY null
EmbeddedObject Boolean false METHOD,PROPERTY,PARAMETER DisableOverride
Experimental Boolean false ANY Restricted
Gauge Boolean false METHOD,PROPERTY,PARAMETER DisableOverride
In Boolean true PARAMETER DisableOverride
IsPUnit Boolean false METHOD,PROPERTY,PARAMETER null
Key Boolean false PROPERTY,REFERENCE DisableOverride
MappingStrings String[] null ANY null
Max UInt32 null REFERENCE null
Min UInt32 0 REFERENCE null
ModelCorrespondence String[] null ANY null
OCL String[] null CLASS,ASSOCIATION,STRUCTURE,INTERFACE,PROPERTY,METHOD,PARAMETER null
Out Boolean false PARAMETER DisableOverride
Override Boolean false METHOD,PROPERTY,REFERENCE,PARAMETER Restricted
PackagePath String null CLASS,ENUMERATION,STRUCTURE,INTERFACE null
PUnit String null METHOD,PROPERTY,PARAMETER null
Read Boolean true PROPERTY,REFERENCE null
Required Boolean false METHOD,PROPERTY,REFERENCE,PARAMETER DisableOverride
Static Boolean false METHOD,PROPERTY,REFERENCE DisableOverride
Terminal Boolean false CLASS,ENUMERATION,STRUCTURE null
Version String null INTERFACE,CLASS,ASSOCIATION,ENUMERATION,STRUCTURE Restricted
Write Boolean false PROPERTY,REFERENCE null
XMLNamespaceName String null PARAMETER,PROPERTY,REFERENCE,METHOD null
Implements String[] null CLASS,STRUCTURE Restricted

Abstract

If the value of an Abstract qualifier is true, the qualified association, class, or structure is abstract and serves only as a base. It is not possible to create instances of abstract associations or classes, to define values of abstract structures, or to use abstract types as a type of a typed element (except for reference types). Interface classes are implicitly abstract.

AggregationKind

The AggregationKind qualifier applies to binary associations on a reference property. The value of AggregationKind qualifier indicates the type of the aggregation relationship. A value of none (default)  indicates that the relationship is not an aggregation. Alternatively the value can be sharedto indicate a shared aggregation or composite to indicate a composition.

ArrayType

The value of an ArrayType qualifier specifies that the qualified property, reference, parameter, or method return is an array of the specified type. The following types are understood:

Value Description
bag The set of element values may contain duplicates, the order of elements is not preserved, and elements may be removed or added.
set The set of element values shall not contain duplicates, the order of elements is not preserved, and elements may be removed or added.
ordered The set of element values may contain duplicates and elements may be removed or added. Except on element addition, removal, or on element value change, the order of elements is preserved.
orderedSet The set of element values shall not contain duplicates and elements may be removed or added. The order of elements is preserved, except on element addition, removal, or on element value change.
indexed The set of element values may contain duplicates, the order of elements is preserved, and individual elements shall not be removed or added.

Note: The Fusion core model ignores this qualifier, and all treats all arrays as being indexed.

BitMap

This qualifier specifies a set of bit positions that are significant within a method return, parameter or property having an unsigned integer type. Bits are labeled by positions, with the least significant bit having a position of zero (0) and the most significant bit having the position of M, where M is one (1) less than the size of the unsigned integer type. For instance, for a integer constrained to 16 bits, M is 15. The values of the array are unsigned integer bit positions, each represented as a string. The position of a specific value in the Bitmap array defines an index used to select a string literal from the BitValues array.

BitValues

This qualifier specifies a set of literals that corresponds to the respective bit positions specified in a corresponding BitMap qualifier type. The position of a specific value in the Bitmap array defines an index used to select a string literal from the BitValues array.

Counter

If specified as true, the Counter qualifier asserts that the qualified element represents a counter. The type of the qualified element should be an unsigned integer with values that monotonically increase until the value reaches a constraint limit or until the maximum value of the corresponding integer. At that point, counter overflows to its minimum constrained value or zero (0), whichever is greater, and starts monotonically increasing again.

Deprecated

This qualifier indicates that the qualified element has been deprecated, and may be removed in the next major version of the schema following the deprecation. If values are provided, they represent elements that replace the deprecated element.

Description

This qualifier provides a human-readable description of the qualified element.

EmbeddedObject

If specified, the corresponding element contains an encoding of an instance value or an encoding of a class definition.

Experimental

When true, this qualifier specifies that the qualified element is 'experimental' and is under development. The implications of experimental status are specified by the organization that owns the element. If false, the qualified element has 'final' status. Elements with 'final' status should not be modified in backwards incompatible ways within a major schema version. Elements with 'experimental' status may be modified in backwards incompatible ways in any schema version, including within a major schema version.

When an enumeration, structure, class, or association is Experimental, its properties, methods, literals, and local types also have 'experimental' status. However, when an enumeration, structure, class, or association has 'final' status, its properties, methods, literals,  and local types may individually have the Experimental qualifier applied with a value of true. Experimental elements for which a decision is made to not take them final should be removed from their schema.

Gauge

If true, the qualified integer element represents a gauge. The type of the qualified element should be an integer with values that can increase or decrease. The value is qualified to be within the range of the elements type and within the range of specified by any applied OCL constraints.

In

This qualifier indicates that the corresponding parameter represents an input value for the method within which the parameter is declared.

Note: All parameters in Fusion are treated as input parameters. This qualifier is only present for compatibility with DMTF specifications.

IsPUnit

If the value is true, this qualifier asserts that the value of the qualified string element represents a programmatic unit of measure. The value of the string element follows the syntax for programmatic units, as defined in ANNEX D of the DMTF CIM Metamodel Version 3 specification.

Key

The Key qualifier asserts that the qualified property or reference is a key property. In the scope in which it is instantiated, a separately addressable instance of a class or value of a structure is identified by its class or structure name and the name value pairs of all key properties. The values of key properties and key references are determined once at instance or value creation time and should not be modified afterwards. Properties of an array type, properties qualified with EmbeddedObject or EmbeddedInstance should not be qualified with Key. Key properties and Key references should not be Null.

MappingStrings

This qualifier takes array values, each of which represents a corresponding element specified in another standard. Appendix F of the DMTF CIM specification specifies the mapping format. Within Fusion, the form Bind.CF|class_name is used to indicate that class_name represents a java class that implements the corresponding element for reference properties.

Max

The value of the Max qualifier specifies the maximum cardinality associated with a reference. If not specified, the cardinality is assumed unbounded.

Min

The value of the Min qualifier specifies the minimum cardinality associated with a reference. If not specified, the minimum cardinality is assumed to be zero.

ModelCorrespondence

The value of the ModelCorrespondence qualifier specifies that the qualified element is related to another element within the schema. The nature of the relationship is assumed to be described in the documentation provided by the organization defining the schema.

OCL

Values of the OCL qualifier specify OCL statements on the qualified element. Each OCL qualifier has zero (0) or more literal strings that each hold the value of one OCL statement. The context (i.e., self) of a specified OCL statement is the qualified element. All names used in an OCL statement are local to that element.

Out

This qualifier indicates that the corresponding parameter is an output parameter for a method.

Note: Fusion does not support output parameters. This qualifier is used only for compatibility with DMTF specifications. The Fusion metamodel allows methods to return structure values, which should be used to return multiple values from methods.

Override

If the value of an Override qualifier is true, the qualified element is merged with the inherited element of the same name in the ancestry of the containing type (association, class, or structure), and replaces the inherited element. The ancestry of an element is the set of elements that results from recursively determining its ancestor elements. The merged element is inherited by sub types of the type that contains the qualified element.

PackagePath

A package is a logical grouping of class, association, structure, enumeration, and package elements. All elements within a package are required to have unique names. Packages may be nested and are used to organize elements of a model as defined in UML (see the Unified Modeling Language: Superstructure specification). The value of this qualifier specifies a schema relative name for a package. If a value is not specified, or is specified as Null, the package path is assumed to be the schema name of the qualified element, followed by "::default".

PUnit

If the value of this qualifier is not Null, the value of the qualified numeric element is in the specified programmatic unit of measure.

Read

If the value of this qualifier is true, the qualified property can be read.

Required

If the value of a Required qualifier is true then the qualified property or reference is required to have a value specified for it. Note that the specified value can be null, but cannot be left unspecified (i.e., the property cannot have no value).

Static

This qualifier specifies that the corresponding method or property is static. A static property or method is not instance-specific and extends across all instances within some execution environment.

Terminal

If present, this qualifier specifies that the corresponding element cannot be further sub typed.

Version

The value of this qualifier specifies the version of the qualified element. The version increments when changes are made to the element. The string representing the version comprises three decimal integers separated by periods; that is, Major.Minor.Update.

Note: A version change applies only to elements that are local to the class. In other words, the version change of a superclass does not require the version in the subclass to be updated.

Write

If the value of this qualifier is true, the qualified property can be written.

XMLNamespaceName

If the value of this qualifier is not Null, then the value shall identify an XML schema and this qualifier asserts that values of the qualified element conforms to the specified XML schema.

Implements

This qualifier lists one or more interface classes (or structures) that are implemented by the qualified class (or structure).