Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Model

A Model is an artifact that includes all the meta-elements described in B-MERODE (business object types, fsms, methods, etc.) It also allows to export and import models. Furthermore, it can be used to evaluate the model's consistency.

Models are mutable

specfield

id (string) : unique id of the model

specfield

businessObjectTypes : set of BusinessObjectTypes included in the model

specfield

attributeTypes : set of AttributeTypes included in the model

specfield

businessEventTypes : set of BusinessEventTypes included in the model

specfield

existenceDependencies: set of ExistenceDependency objects included in the model

specfield

finiteStateMachines : set of FSMs included in the model

specfield

states : set of States included in the model's FSMs

specfield

transitions: set of Transitions included in the model's FSMs

specfield

methods: set of Methods inlcuded in the model

specfield

ept: EventParticipantTable applicable to the model

specfield

art: AttributeReadingTable applicable to the model

specfield

iars: set of InstanceAccessRules applicable to the model

Hierarchy

  • Model

Index

Constructors

constructor

  • new Model(id: string): Model
  • Creates a new model m so that:

    • m.id = id &&
    • m.businessObjectTypes = [] &&
    • m.attributeTypes = [] &&
    • m.businessEventTypes = [] &&
    • m.existenceDependencies = [] &&
    • m.finiteStateMachines = [] &&
    • m.states = [] &&
    • m.transitions = [] &&
    • m.methods = [] &&
    • m.ept = null &&
    • m.apt = null &&
    • m.instanceAccessRules = []

    Parameters

    • id: string

      Unqiue ID of the model

    Returns Model

Properties

Private attributeReadingTable

attributeReadingTable: AttributeReadingTable

Private attributeTypes

attributeTypes: Map<string, AttributeType>

Private businessEventTypes

businessEventTypes: Map<string, BusinessEventType>

Private businessObjectTypes

businessObjectTypes: Map<string, BusinessObjectType>

Private eventParticipantTable

eventParticipantTable: EventParticipantTable

Private existenceDependencies

existenceDependencies: Map<string, ExistenceDependency>

Private finiteStateMachines

finiteStateMachines: Map<string, FSM>

Private id

id: string

Private instanceAccessRules

instanceAccessRules: Set<InstanceAccessRule>

Private methods

methods: Map<string, Method>

Private states

states: Map<string, State>

Private transitions

transitions: Map<string, Transition>

Methods

addAttributeType

  • modifies

    this

    effects

    this_post.attributeTypes = this.attributeTypes U { at }

    Parameters

    Returns void

addBusinessEventType

  • modifies

    this

    effects

    this_post.businessEventTypes = this.businessEventTypes U { businessEventType }

    Parameters

    Returns void

addBusinessObjectType

  • modifies

    this

    effects

    this_post.businessObjectTypes = this.businessObjectTypes U { bot }

    Parameters

    Returns void

addExistenceDependency

  • modifies

    this

    effects

    this_post.existenceDependencies = this.existenceDependencies U { ed }

    Parameters

    Returns void

Private addFSM

  • addFSM(fsm: FSM): void
  • modifies

    this

    effects

    this_post.finiteStateMachines = this.finiteStateMachines U { fsm }

    Parameters

    • fsm: FSM

      FSM to add to this

    Returns void

addInstanceAccessRule

  • modifies

    this

    effects

    this_post.instanceAccessRules = this.instanceAccessRules U { iar }

    Parameters

    Returns void

addMethod

  • addMethod(method: Method): void
  • modifies

    this

    effects

    this_post.methods = this.methods U { method }

    Parameters

    • method: Method

      Method to add to this

    Returns void

Private addState

  • addState(state: State): void
  • modifies

    this

    effects

    this_post.states = this.states U { state }

    Parameters

    • state: State

      State to add to this

    Returns void

Private addTransition

  • modifies

    this

    effects

    this_post.transitions = this.transitions U { transition }

    Parameters

    • transition: Transition

      Transition to add to this

    Returns void

getAttributeType

getBusinessEventType

getBusinessEventTypes

getBusinessObjectType

getBusinessObjectTypeFromName

  • throws

    An error in case there is no business object type in this, with botName as a name

    willreturn

    Otherwise, returns a business object type "bot" so that bot.name = botName && bot is in this

    Parameters

    • botName: string

      Name of the business object type to retrieve

    Returns BusinessObjectType

getBusinessObjectTypes

package

  • modifies

    this

    effects

    this_post.ept = a default EPT generated for this in case this.ept is not defined

    willreturn

    a JSON that represents the serialized version of this

    Returns IModelPackage

setAttributeReadingTable

setEventParticipantTable

Static Private loadAttributeReadingTableFromModel

Static Private loadAttributeTypeFromModel

Static Private loadBusinessEventTypesFromModel

Static Private loadBusinessObjectTypeFromModel

Static Private loadEventParticipantTableFromModel

Static Private loadExistenceDependencyFromModel

Static loadFromFile

  • loadFromFile(filePath: string): Model
  • willreturn

    a new model m that is imported from the serialized model format file located at filePath

    Parameters

    • filePath: string

      Path where the file containing the serialized model can be found

    Returns Model

Static Private loadFsmFromModel

  • willreturn

    a FSM loaded from the serialized model format

    Parameters

    • model: Model

      Model being loaded from a file

    • modelElement: IFSMModelFormat

      FSM to be loaded, in the serialized model format

    Returns FSM

Static Private loadInstanceAccessRuleFromModel

Static Private loadMethodFromModel

  • willreturn

    a new method imported from the serialized model format

    Parameters

    • model: Model

      the model being loaded from a file

    • modelElement: IMethodModelFormat

      the method to import in the serialized model format

    Returns Method

Static Private loadStateFromModel

  • willreturn

    a state loaded from the serialized model format.

    Parameters

    • modelElement: IStateModelFormat

      state to be loaded, in the serialized model format.

    Returns State

Static Private loadTransitionFromModel

Generated using TypeDoc