raiseAlert(String Message):Void
The raiseAlert method is used by all other methods
of the ontologyClass if they want to report an
anomaly. The method will then report to a log and
other appropriate systems that can take action.
acceptBusinessLogic(Object
businessLogic):Void
All the dynamic rules of the system should separate
from the instances. We propose storing business
logic instances in a list and execute them
accordingly. Similar with the Strategy Design
pattern, this method accepts instances of Business
Logic and stores them in the list businessLogic. This
allow us to change the dynamic behaviour of the
system even at run time.
All the ‘get’ methods of determiner and
ontologyClass class will be linked with the ‘provide’
interface of the component while the interaction
methods will be linked through the require interface
with the transformation of the second antecedent of
the affordance.
The transformation T will transform the ontology
chart (OC) to component diagram (CD). Since
ontology chart resides at the computational
independent model level and the component diagram
at the platform independent model level, this is a
CIM to PIM transformation.
7.1.3 Inner Structure Explaination
Each affordance such as Person can have many
determiners ontologically dependent on it, such as
name, telephone, address and so on. Each
determiner can have many instances associated with
it, for example a person may had a previous name,
or many telephones, previous addresses and so on.
The determiners class will be responsible for holding
this information. The class has two linked lists called
index and universal. The is used for storing meta
information about the determiners, such as the type
of the value that they hold, their name and unique id.
The linked list universal holds instances of the class
valueInstance that will hold the name of the
determiner, the value, the start time and the finish
time. The determiners class methods for searching,
retrieving and adding instances of determiners.
Apart from determiners we also store all other
affordances that are directly ontologically dependent
to the component but do not themselves transform to
a component. For example, let us assume that a
person owns a book. The person is an agent and will
be transformed to a component, ‘owns’ is a
relationship and ‘book’ is an entity which would be
transformed to an entity component. In this case the
relationship ‘owns’ would be converted to a
ontologyClass class and placed in the person
component. The ontologyClass class will have the
name of the affordance; in our examples this will be
owns and instances of various ownerships. This is
because a person may have owned different books
over the past or owns more than one books at
present. Its ownership instance will hold information
such as which person owned which books and when.
The ontologyClass has methods for adding,
searching, and finishing instances. Each
particularInstance can have zero to many
determiners within it. All the get methods of
determiner and ontologyClass class will be linked
with the provide interface of the component while
the interaction methods will be linked through the
require interface with the transformation of the
second antecedent of the affordance.
Every time we generate a component we include
the structure definer above. This way every time we
generate a component the system will generate a
class inside which will have the name of the label of
the affordance and will be of type ontologyClass.
This class will have a list inside, which will store all
the particulars and their determiners value. To do
this, we need to define a new type which will have
the name of the label of the affordance and the word
instance. Inside this class, we will add attributes of
type determiner for every determiner dependant that
the affordance has. Then we will create two
provided interfaces and link the ontology class with
them. We will call them ReadOnlyInterface and
ReadWriteInterface. The first will include all the
public get methods of the ontologyClass while the
second will include all the public methods of the
ontologyClass.
7.2 Linking Component Interfaces
Before linking components together we need to
understand the permissions rights. As we have
shown in the previous section, affordances have
antecedents and dependants. The dependant is
ontologically depended to the antecedent. The
multiplicity is one to many from the antecedent to
the dependant. An affordance can be ontologically
depended to another, directly or indirectly. For
example consider a bank, a loan that the bank offers
and a determiner amount.
The property of the loan is directly ontologically
depended on the loan and indirectly to the bank.
Affordances have less access rights to the
ONTOLOGY BASED UML2 COMPONENT ARCHITECTURE GENERATION
319