BESSER OCL#

class besser.BUML.metamodel.ocl.rules.BagType(name)[source]#

Bases: CollectionType

A class to define the Bag Type

Parameters:

name – Name of the expression

class besser.BUML.metamodel.ocl.rules.BooleanLiteralExpression(name: str, value: bool)[source]#

Bases: LiteralExpression

A Boolean literal Expression of type LiteralExpression

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

  • value – value of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.CallExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define call expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.Classifier(name=None)[source]#

Bases: object

A class to define classifier

Parameters:

name (str) – the name of the classifier

class besser.BUML.metamodel.ocl.rules.CollectionItem(name, item)[source]#

Bases: CollectionLiteralPart

A class to define the Collection Item

Parameters:

name – Name of the expression

value#

Value of the item

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

Get the value of item

set(value)[source]#

set the value of item

class besser.BUML.metamodel.ocl.rules.CollectionLiteralExp(name, type)[source]#

Bases: LiteralExp

A class to define the Collection Literal Expression

Parameters:
  • name – Name of the expression

  • type – type of expression

kind#

type of expression

collectionItems#

Items in the collection literal expression

_abc_impl = <_abc._abc_data object>#
add(item)[source]#

Method to add item in the collection items

class besser.BUML.metamodel.ocl.rules.CollectionLiteralPart(name)[source]#

Bases: TypedElement

A class to define the Collection Literal Part

Parameters:

name – Name of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.CollectionRange(name)[source]#

Bases: CollectionLiteralPart

A class to define collection range

Parameters:

name – name of expression

first#

first item of collection

last#

last item of collection

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.CollectionType(name)[source]#

Bases: DataType

A class to define the Collection Type

Parameters:

name – Name of the expression

class besser.BUML.metamodel.ocl.rules.DataType(name)[source]#

Bases: Classifier

A class to define the data type

Parameters:

name – Name of the expression

class besser.BUML.metamodel.ocl.rules.FeatureCallExp(name: str, type: Type)[source]#

Bases: CallExp

A class to define feature call expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.IfExp(name: str, type: Type, ifcond=None, elseExp=None, thenExp=None)[source]#

Bases: OCLExpression

A class to represents IfExpressions

Parameters:
  • name – name of constraint

  • type – type of constraint

  • ifcond – If Condition of constraint

  • elseExp – Else expression of constraint

  • Exp (then) – then expression of constraint

_abc_impl = <_abc._abc_data object>#
property elseCondition: OCLExpression#

Get the else Condition of expression

property ifCondition: OCLExpression#

Get the if Condition of expression

property thenExpression: OCLExpression#

Get the then expression of OCLexpression

class besser.BUML.metamodel.ocl.rules.InfixOperator(operator)[source]#

Bases: object

A class to define Infinix Operator Expression

Parameters:

operator – Operator of the expression

operator#

Operator of the expression

get_infix_operator()[source]#

Get the infinix Operator

class besser.BUML.metamodel.ocl.rules.IntegerLiteralExpression(name: str, value: int)[source]#

Bases: LiteralExpression

A Integer literal Expression of type LiteralExpression

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

  • value – value of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.InvalidLiteralExp(name: str, type: Type)[source]#

Bases: LiteralExp

A class to define invalid literal expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.IterateExp(name: str, type: Type)[source]#

Bases: LoopExp

A class to define Iterate expression

Parameters:
  • name – name of expression

  • type – type of expression

result#

variable to store the result

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.IteratorExp(name: str, type: Type)[source]#

Bases: LoopExp

A class to define Iterator expression

Parameters:
  • name – name of expression

  • type – type of expression

name#

name of expression

Type:

str

type#

type of expression

Type:

besser.BUML.metamodel.structural.structural.Type

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.LetExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define Let expression

Parameters:
  • name – name of expression

  • type – type of expression

OCLExpression#

OCL expression of the LetExp

variable#

variable of the Let expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.LiteralExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define Literal expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.LiteralExpression(name: str, type: Type, value: Any)[source]#

Bases: OCLExpression

A literal value part of an OCL expression

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

  • type – type of the expression.

  • value – value of the expression

value#

value of the expression

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

Get the Value of Expression

class besser.BUML.metamodel.ocl.rules.LoopExp(name: str, type: Type)[source]#

Bases: CallExp

A class to define loop expression

Parameters:
  • name – name of the expression

  • type – type of the expression

name#

name of the expression

Type:

str

type#

type of the expression

Type:

besser.BUML.metamodel.structural.structural.Type

body#

a list to store expressions in the body of loop expression

iterator#

list to store all the iterators

_abc_impl = <_abc._abc_data object>#
addIterator(iterator)[source]#

add iterator to the expression

add_body(body)[source]#

Add expression to the body

property get_body#

Get body of the expression

property get_iterator#

add iterator of the expression

class besser.BUML.metamodel.ocl.rules.MessageExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define message expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.NavigationCallExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define navigation call expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.NullLiteralExp(name: str, type: Type)[source]#

Bases: LiteralExp

A class to define null literal expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.NumericLiteralExp(name: str, type: Type)[source]#

Bases: PrimitiveLiteralExp

A class to define numeric literal expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.OCLConstraint(name: str, context: Class, expression: OCLExpression, language: str = 'OCL')[source]#

Bases: Constraint

A class to represents OCL constriants, i.e. constraints written with the OCL language

Parameters:
  • name – name of constraint

  • context – class of constraint

  • expression – expression of constraint

  • language – Language of constraint

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.OCLExpression(name: str, type: Type)[source]#

Bases: TypedElement

The OCLExpression is the Superclass of all OCL elements with.

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

  • type – type of the expression.

source#

the source of expression

Type:

OCLExpression

_referredOperation#

points to any refferred operation that the expression has.

_abc_impl = <_abc._abc_data object>#
property referredOperation: Any#

Get the referredOperation of OCL Expression

property source: Any#

Get the source of OCL Expression

class besser.BUML.metamodel.ocl.rules.OperationCallExpression(name: str, operation: str, arguments: list[OCLExpression])[source]#

Bases: OCLExpression

Expression that returns the value of a given Operation on a given set of ordered arguments The operation could also be a reference to any operation in an existing class but for now we stick to simple arithmetic comparison operations from the standard OCL library.

An Operation Call Expression of type OCL expression.

Parameters:
  • name – Name of the function

  • operation – Operation of the expression

  • arguments – Arguments of the function

operation#

Operation of the expression

arguments#

Arguments of the function

_abc_impl = <_abc._abc_data object>#
add(item)[source]#

Add in the arguments of Operation

property arguments: list[OCLExpression]#

Get the arguments of Operation

property operation: str#

Get the operation of Expression

class besser.BUML.metamodel.ocl.rules.OrderedSetType(name)[source]#

Bases: CollectionType

A class to define the Ordered Set Type

Parameters:

name – Name of the expression

class besser.BUML.metamodel.ocl.rules.Parameter(val)[source]#

Bases: object

A class to define parameter

Parameters:

val – Value of the parameter

value#

Value of the parameter

get_value()[source]#

Get the value of parameter in the expression

class besser.BUML.metamodel.ocl.rules.PrimitiveLiteralExp(name: str, type: Type)[source]#

Bases: LiteralExp

A class to define primitive literal expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.PropertyCallExpression(name: str, property: Property)[source]#

Bases: OCLExpression

A Property Call Expression of type OCLExpression

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

  • property – property of the expression

property#

Property of the expression

_abc_impl = <_abc._abc_data object>#
property property: Property#

Get the Property of Expression

class besser.BUML.metamodel.ocl.rules.RealLiteralExpression(name: str, value: float)[source]#

Bases: LiteralExpression

A Real literal Expression of type LiteralExpression

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

  • value – value of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.SequenceType(name)[source]#

Bases: CollectionType

A class to define the Sequence Type

Parameters:

name – Name of the expression

class besser.BUML.metamodel.ocl.rules.SetType(name)[source]#

Bases: CollectionType

A class to define the Set Type

Parameters:

name – Name of the expression

class besser.BUML.metamodel.ocl.rules.State[source]#

Bases: object

A class to define state

class besser.BUML.metamodel.ocl.rules.StateExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define the state expressions of type OCL expression

Parameters:
  • name – name of the expression

  • type – type of the expression

ReferedState#

Referred state of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.StringLiteralExpression(name: str, value: str)[source]#

Bases: LiteralExpression

A String literal Expression of type LiteralExpression

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

  • value – value of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.TypeExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define the type expression of the type OCL Expressions

Parameters:
  • name – name of the classifier

  • type – type of expressions

referedType#

classifier of the expression

_abc_impl = <_abc._abc_data object>#
class besser.BUML.metamodel.ocl.rules.Variable(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define the variable in the OCL expression

Parameters:
  • name – name of the expression

  • type – type of the expression

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

Get the value of variable in the expression

set_value(val)[source]#

set the value of variable in the expression

class besser.BUML.metamodel.ocl.rules.VariableExp(name: str, type: Type)[source]#

Bases: OCLExpression

A class to define the variable expression of the type OCL expression

Parameters:
  • name – Name of the expression

  • type – Type of the expression

name#

name of the expression

Type:

str

variable#

variable of the expression

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

Get the value of variable in the expression

set_refferred_variable(val)[source]#

Set the value of variable in the expression