REWERSE-RP-2007-147

Matteo Baldoni, Guido Boella, Leendert van der Torre:
Adding Roles to Relationship Patterns.


Complete Text [
.pdf, 76KB]
In: Proceedings of WOA 2007: Dagli oggetti agli agenti, Agenti e Industrie: Applicazioni tecnologiche degli agenti software (WOA 2007), Genova, Italy (24th - 25th September 2007), 112-125, September 2007
© Seneca Edizioni

Abstract
In this paper we study how roles can be added to patterns modelling relationships in Object Oriented programming, and which new relationship patterns can be introduced using roles. Relationships can be introduced in programming languages either by reducing them to attributes of the objects which participate in the relationship, or by modelling the relationship itself as a class whose instances have the participants of the relationships among their attributes. However, even if roles have been recognized as an essential component of relationships, also in modelling languages like UML, they have not been introduced in Object Oriented programming when it is necessary to model relationships. Introducing roles allows to add attributes and behaviors to the participants in the relationship, rather than to the relationship itself, and to distinguish natural types as classes participating in the relationships from the roles the participants acquire in the relationships. In this paper we show how the role model proposed in powerJava can be used to endow relationships with roles, both in the relationship as attribute and in the relationship object pattern. Finally, since these patterns have different advantages and limitations, we propose a third pattern based on roles which benefits from the advantages of the two previous patterns when modelling relationships.

URL:
http://rewerse.net/publications/rewerse-publications.html#REWERSE-RP-2007-147

BibTeX:

@inproceedings{REWERSE-RP-2007-147,
	author = {Matteo Baldoni and Guido Boella and Leendert van der Torre},
	title = {Adding Roles to Relationship Patterns},
	booktitle = {Proceedings of WOA 2007: Dagli oggetti agli agenti, Agenti e Industrie: Applicazioni tecnologiche degli agenti software, Genova, Italy (24th--25th September 2007)},
	year = {2007},
	pages = {112--125},
	url = {http://rewerse.net/publications/rewerse-publications.html#REWERSE-RP-2007-147}
}