attributes class decoration - RHEAGROUP/Kalliope GitHub Wiki

Kalliope Attributes

The POCO classes of the Kalliope library are decorated with C# attributes to provide the description, generalization and containment relationship of each of the classes. The property attribute is used to make aspects such as the property name, type and multiplicity explicit. The attributes are used by the code-generators to generate DTO's (and decorate them).

The following attributes can be identified:

Name Description
DomainAttribute The Domain attribute is used to decorate POCO classes to state whether the class is an abstract class and the name of the super class (generalization).
ContainerAttribute The Container attribute is used to decorate POCO classes that take part in a Composition relationship at the contained end. Container attribute has a property that specifies the name of the container property of the container class that contains the current class.
PropertyAttribute The Property attribute is used to decorate properties of POCO classes to be able to use reflection to determine the kind of property it is.
DescriptionAttribute The Description attribute is used to decorate POCO classes and properties with the description as stated in the ORM DSL or in the ORM XSD
CalculatedAttribute The Calculated attribute is used to decorate POCO classes and properties with the description of how this calculated property is calculated. This description is only for information purposes. The implementation logic of the calculation itself is done using classes that derive from ICalculationModule in Kalliope.Dal. Logic in these classes are executed after Assembler has converted all DTO's to POCO's
IgnoreAttribute The Ignore attribute is used to decorate POCO classes that shall be ignored for any code generation purposes

The information that is used to determine which attribute to use, and what value its properties must have, is derived (reverse engineered) from the ORM DSL and the ORM XSD. These files can be found here:

Read more about the Kalliope data model here