UserAttributes

Header Image
Content:
UserAttributes : Public Package
User attributes in EAST-ADL are primarily intended to provide a mechanism for augmenting the elements of an EAST-ADL model with customized meta-information. All instances of metaclass Identifiable can have user attributes attached to them. The scope and structuring of this meta-information can be defined on a per-project basis by defining user attributes for certain types of EAST-ADL elements with UserElementTypes and UserAttributeDefinitions.<br/><br/>Since EAST-ADL Requirements are, in their most general form, simple objects with all information contained in user-customized, project-specific attributes, the concept of user attributes is also suitable for defining those attributes of requirements. In that sense, basic Requirements in EAST-ADL can be seen as "empty" elements which only provide a node to which user attributes can be attached in order to supply the Requirement with all necessary information, including its main textual description. However, in the case when the Requirement is the context in which the available user attributes are defined, the containing RequirementsModel of the Requirements is the point where user element types are stored (c.f. association "requirementType" of RequirementsModel) and these are only applicable within this container. In this use case, UserElementType corresponds to ReqIF's SpecType.<br/><br/>The role of user attributes within the overall EAST-ADL is thus twofold: they (1) provide a means to customize the language to specific company and project needs and (2) constitute an important part of the requirements support of the language.<br/><br/>User attribute values are characterized by user attribute definitions contained in UserElementTypes. The latter are identified by a key attribute. Whenever interoperability with third parties is required, an internet domain naming scheme should be used in order to produce universally unique keys, similar to package names in the Java programming language. For example, a company with a home page URL of "www.example.com" could use the key "com.example.MyPort" for a user element type representing a custom type of port. For more details refer to the documentation of attribute key in metaclass UserElementType.<br/><br/>In order to attach a user attribute value to an instance of a subclass of Identifiable (e.g. DesignFunctionType "WiperSystem") a UserAttributedElement is created that points to this instance (i.e. instance "WiperSystem") via association attributedElement and contains the actual value as an instance of metaclass EAValue. In addition, the UserAttributedElement has to point to a UserElementType containing an appropriate UserAttributeDefinition in order to identify the user attribute, i.e. specify the meaning of the value and its type. For more details, refer to the documentation of UserAttributedElement.<br/><br/>User attributes in EAST-ADL serve a similar purpose to stereotypes in UML2 but are intended as a more light-weight and simpler mechanism, especially with respect to tool implementation.<br/>