Class: NaryAssociation

Defined in: web-src/coffee/model/uml/naryassociation.coffee
Inherits: model.MyModel

Overview

A Link between two classes or more classes.

This give support for two (using from() or to()) or more classes.

Instance Method Summary

Constructor Details

# (void) constructor(classes, name = null, position)

Parameters:

  • classes ( Array<Class> ) An array of Class objects, the first class is the "from" and the second is the "to" class in a two-linked relation.

Instance Method Details

# (void) get_role()

Following functions returns each one of the roles associated "u" roles mean user defined roles and f = from/t = to. "d" roles mean default roles and f = from/t = to. They take the class name.

# (void) add_roleTo_assoc(role)

# (void) set_roles(user_d_role, class_r, mult, role)

Set the roles. Roles are first citizen objects so that more resposabilities are assigned.

Parameters:

  • user_d_role ( string ) is a user define role for the current link.
  • class_r ( string ) is the class associated to the current role. This name is also used as default role name.
  • mult ( string ) is the cardinality for the current role.

# (void) get_assoc_labels()

# (void) add_class(class_a)

# (void) has_role(role)

# (void) has_role_to_class(class_a)

# (void) remove_role(role)

# (void) set_from(class_from)

@param class_from an instance of Class.

# (void) get_from()

# (void) set_to(class_to)

# (void) get_to()

# (void) get_classes()

# (void) set_association_class(associationClass)

# (void) get_association_class()

# (void) is_two_linked()

True if a two-linked relation. False otherwise.

# (?) has_parent(parentclass)

Implement in the subclass if necesary.

Parameters:

  • parentclass ( Class ) The Class instance to check.

Returns:

  • ( ? ) — true if this is a generalization class and has the given parent instance. false otherwise.

# (?) has_association_class()

Check is n-ary association is with class

Returns:

  • ( ? ) — true if association is with class. Otherwise, false.

# (void) to_json()

# (void) create_joint(factory, csstheme = null)

# (boolean) same_elts(other)

Compare the relevant elements of these links.

Parameters:

Returns:

  • boolean

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: