Object model#

Bases: object

An attribute link is a named slot in an instance, which holds the value of an attribute

Parameters:
  • name (str) – the name of the attribute link

  • value (DataValue) – the value of the attribute.

  • attribute (Property) – the attribute or property from the structural metamodel.

name#

inherited from NamedElement, represents the name of the attribute link.

Type:

str

value#

the value of the attribute.

Type:

DataValue

attribute#

the attribute or property from the structural metamodel.

Type:

Property

property attribute: Property#

Get the attribute.

Type:

Property

property value: DataValue#

Get value of the attribute.

Type:

DataValue

class besser.BUML.metamodel.object.object.DataValue(classifier: Type, value, name='')[source]#

Bases: Instance

An DataValue represent the value of a property or attribute of an Object.

Parameters:
  • classifier (Type) – the classifier of the DataValue. It could be for example a Class or a PrimitiveDataType of the structural metamodel.

  • value – value of the property Instance.

classifier#

Inherited from Instance, represents the classifier of the DataValue instance.

Type:

Type

value#

value of the property Instance.

_abc_impl = <_abc._abc_data object>#
property value#

Method to retrieve Value

class besser.BUML.metamodel.object.object.Instance(name: str, classifier: Type)[source]#

Bases: NamedElement

The instance defines an entity to which a set of operations can be applied and which has a state that stores the effects of the operations.

Parameters:
  • name (str) – the name of the instance

  • classifier (Type) – the classifier of the instance. It could be for example a Class or a PrimitiveDataType of the structural metamodel.

name#

inherited from NamedElement, represents the name of the instance.

Type:

str

classifier#

the classifier of the instance. It could be for example a Class or a PrimitiveDataType of the structural metamodel.

Type:

Type

_abc_impl = <_abc._abc_data object>#
property classifier: Type#

Get the classifier.

Type:

Type

Bases: NamedElement

A link represent a relationship between objects.

Parameters:
  • name (str) – the name of the Link

  • association (Association) – the Association that represents the Link

  • connections – list of link ends.

name#

inherited from NamedElement, represents the name of the Link

Type:

str

association#

the Association that represents the Link

Type:

Association

connections#

list of link ends.

_abc_impl = <_abc._abc_data object>#
add_to_connection(linkEnd)[source]#

Method to add linkend

property association#

Method to retrieve the association

Type:

Association

property connections#

Method to retrieve the connections

Type:

list[LinkEnd]

class besser.BUML.metamodel.object.object.LinkEnd(name: str, association_end: Property, object: Object)[source]#

Bases: NamedElement

A link end is an end point of a link.

Parameters:
  • name (str) – the name of the LinkEnd

  • association_end (Property) – the end represeted by the LinkEnd

  • object (Object) – the object pointed to by the LinkEnd

name#

inherited from NamedElement, represents the name of the LinkEnd

Type:

str

association_end#

the end of the link

Type:

Property

object#

the object pointed to by the LinkEnd

Type:

Object

_abc_impl = <_abc._abc_data object>#
property association_end#

Method to retrieve the association end

Type:

Property

property object#

Method to retrieve the object

Type:

Object

class besser.BUML.metamodel.object.object.Object(name: str, classifier: Type, slots: list[AttributeLink] = [])[source]#

Bases: Instance

An object is an instance that originates from a class.

Parameters:
  • name (str) – the name of the object instance

  • classifier (Type) – the classifier of the object instance. It could be for example a Class or a PrimitiveDataType of the structural metamodel.

  • slots (list[AttributeLink]) – list of properties of the instance

name#

inherited from NamedElement, represents the name of the object instance.

Type:

str

classifier#

Inherited from Instance, represents the classifier of the object.

Type:

Type

slots#

list of properties of the instance

Type:

list[AttributeLink]

_abc_impl = <_abc._abc_data object>#

Link: Add an link to the set of object links.

Link: Remove a link to the set of object links.

add_slot(slot: AttributeLink)[source]#

Method to add attribute link to slots

set[LinkEnd]: Get the set of link ends of the object.

Get the set of links involving the object.

Type:

set[Link]

property slots: list[AttributeLink]#

Get the slots.

Type:

list[AttributeLink]

class besser.BUML.metamodel.object.object.ObjectModel(name: str, instances: set[Instance], links: set[Link])[source]#

Bases: NamedElement

An object model is the root element that comprises a number of instances and links.

Parameters:

name (str) – the name of the object model

name#

inherited from NamedElement, represents the name of the model

Type:

str

association#

the Association that represents the Link

Type:

Association

connections#

list of link ends.

_abc_impl = <_abc._abc_data object>#
property instances#

Method to retrieve the instances

Type:

Association

Method to retrieve the links

Type:

Association