WWW.DISSERS.RU


...
    !

Pages:     | 1 |   ...   | 34 | 35 || 37 | 38 |   ...   | 54 |

l Each node of the presentation model graph G is a form of some entity; arcs between nodes are possible pr Software Engineering transitions between forms (corresponding to arcs in the logical model graph); arcs are directional, direction is given from the form involved to the forms which can be called from the current form:

Gpr = (Vpr,E ), where Vpr = {f1,f2,..., fn }, E = {r1,r2,..., rm }, n,m N pr pr ri = (f,fk ), where i = 1..m ; j,k = 1..n j Here pairs (e, e ) and (f, f ) are directed. That means graphs G and G are oriented.

j k j k l pr Graphs G and G are, in general, multigraphs, in which cycles and loops are possible, and so, the incident nodes pr l of the arc is not enough to identify this arc. Thats why arcs must be marked with unique names, for e1,e2 Vl there must not be two arcs (e1,e2)El, having identical types and names. It is the same for graph G.

pr The building process of the presentation model graph is in the reflection of the logical model graph G on the set l of nodes and arcs of the presentation graph G. In every moment the presentation model graph can be pr determined short. Let us see the building process of a new node f of graph G.

pr The Elementary Graph of the Presentation Model Node f G goes to some form for entity e G. This entity can be named the main entity form (we write pr l ME(f ) = e ). So, we have: (f Gpr )(eGl : ME(f ) = e). The inverse proposition is also true. If we review the completely specified presentation model graph G, i.e. the graph where there aret any undetermined nodes any pr more, then (e Gl )(f Gpr :ME(f ) = e). Arcs, incoming into node e of graph G, that means arcs for l transition to parent entities in the relation of 1:̻, 0..1:̻, 0..1:1 type, are included into the presentation model graph (except two-forked graphs). Outgoing and two-forked arcs (arcs connecting reviewing entity with child entities) will be described later. Any arc in graph G goes to some arc in graph G, i.e.

pr l (ri = (fj,fk ) Epr )(ri = (ek,ej ) El : ME(fj ) = ej,ME(fk ) = ek ).

Such graph model corresponds to the simplest case when for the reflection of every entity its own form is used and transitions between forms are realized by the relations of 1:M, 0..1:̻, or 0..1:1 type, which exists between main entities of forms, in direction from child entity (from M side) to parent one (to 1 side). Let us view the example in Figure 1.

e e f 5 2 5 f e f e f e f 4 G G l pr Figure 1. Reflection of the logical model graph on the presentation model graph In graph G there are 5 nodes corresponding to 5 entities of data domain. Its own form is built for each of them:

l ei = ME(fi ), where i = 1,5. Entity e has got two parent relations with entities e and e, entity e has got one 1 2 5 parent entity e. Therefore, there will be three arcs in graph G, corresponding to the relations 1:M of graph 1 pr G. The building of graph G goes according to gradual addition of nodes and its arcs into sets V and E l pr pr pr accordingly. Thats why while building new node f Vpr for node e Vl it can happen that there is no node f Vpr for node e Vl yet, to which we must prolong arc from node f. Missing node f must be built to avoid hanging arcs. We mark built node f as indefinite (udef). Such node has got one or several incoming arcs (in particular, arc (f,f )Epr ).

Fourth International Conference I.TECH 2006 Attributes Reflection Besides relations with other entities every entity is characterized by the set of its attributes. These attributes must be reflected by the elements of user interface application and must be included in the presentation model.

The creation of node f in graph G is the reflection of logical model attributes to the controls of the presentation pr level. Any node e Vl has got the set of attributes Attr(e) = {a0,a1,...,an },nN, where attribute a is the key attribute of entity ( a0 = key(e) ). In common case entity can have several key attributes (a compound key). But this situation can be taken to the viewed case by the addition of artificial key.The key attribute is used only on the logical level and is inaccessible for user on the presentation level.

Any non-key attribute ai, where i = 1,n, can be either own attribute of the entity (the set of such attributes Attrown(e) ), or an attribute, realizing the relation with parent entity, i.e. outer attribute ( Attrparent (e) ). The key attribute is also in the set of own attributes. All own attributes have got a type Type(a), which sets possible i attribute values and operations, applicable to these values, and also the method of attribute values input and output. Every attribute a connecting with parent node e Vl is corresponding to any incoming in node e (but not i in two-forked) arc (e,e)El ( rel(ai ) = (e,e) ). The reflection of such arcs in graph G is set by the algorithms, pr described in the work. We can also speak about the type of such attribute. The type coincides with the type of the key attribute of parent entity e.

Node f of graph G includes in itself the set of the controls AttrCtrl(f ) = {ac1,...,acn }, corresponding with pr attributes of entity e = ME(f ). The key attribute does not go into the presentation model. Each control will have the type, defining by the type of corresponding attribute or parent relation.

Compound Forms Sometimes it is comfortable to include into the form information not only about one object of data domain but also the information connected with this object, i.e. the information about objects of several entities. Then each node of the presentation model graph will correspond to the subset of nodes of the logical model graph. The fulfillment of such reflection depends on the semantics of data domain and it can be done by user-administrator.

On the base of the built presentation model graph the extended graph can be built, nodes of which will be compound forms. Let us view the process of building such a graph. Let us have node f of graph G, which pr corresponds to node e of graph G, i.e. ME(f)=e. Lets mark by G(f) some set of nodes and arcs, complying with l l node f of the presentation model graph. In graph G(f) every node is corresponded to node of the logical model l graph, and arc is corresponded with the arc of the logical model graph. Now in the set of nodes there can be several nodes, corresponding to one and the same entity. The same is for arcs: in the set of arcs of graph G(f) l there can be several arcs, reflecting one and the same arc of the logical model graph. The set of nodes and arcs of graph G(f) is marked correspondingly V(f) and E(f). Initially, the set of nodes of graph consists from one node, l l l corresponding to entity e, and the arcs set is empty: Vl (f ) = {ME(f )}, El (f ) =.

Let us view the arbitrary node e of the logical model graph G. Node e can be connected with the other nodes of l graph G, i.e. there is a set of incident arcs to this node. Let us break this set on two subsets: the set of incoming l arcs E (e) E and the set of outgoing and two-forked arcs E (e) E. The first set connects node e with the parent l child l set of parent entities for this node Eparent (e) = {rp1,...,rpn },n{0} N, where rpi = (ei,e),ei Vl,i = 1,n, and the second set with the set of child entities Echild (e) = {rch1,...,rchn },n{0} N, where rchi = (e,ei ),ei Vl,i = 1,n.

Software Engineering In the example in Figure 1, relations (e5,e1) and (e2,e1) make up the set of parent relations for entity e, and relations (e1,e3) and (e1,e4 ) the set of child relations.

Let us suppose that it is necessary to reflect on the form the information about the child entity of the main entity of form f. Let us examine the main entity e (ME(f)=e) and identical node to it e, representing child entity for entity e.

ch So, rch Echild (e) : rch = (e,ech ).

For including of node e into graph G(f) it is necessary to:

ch l 1. Include node e into the set V(f), and arc r into the set E(f);

ch l ch l 2. Include arc (f,fch), where ME(f)=e, ME(f )=e, into the set E. This arc will correspond to arc (e,ech )El.

ch ch pr To delete node e from graph G(f) it is necessary to fulfil the reverse transformation of the sets V(f), E(f) E :

ch l l l pr 1. Exclude arc (f,fch), where ME(f) = e, ME(f )=e, from the set E ;

ch ch pr 2. Delete arc r from the set E(f), node e must be excluded from the set V(f).

ch l ch l Let us now have node e, incidental to the main entity e of form f (ME(f)=e) which is parent for it, p i.e. rp Eparent (e) : rp = (ep,e). Including and deleting node e from the set V(f) occurs in the following way. For p l adding parent node to the main entity of the form it will be enough:

1. Include node e into the set V(f), and arc r into the set E(f);

p l p l 2. Include arcs, corresponding to the relations between node e and its parent nodes, i.e. for r Eparent (ep ) p we include arc (f,fr ), where ME(fr ) = er,r = (er,ep ) ;

3. Delete arc (f,fp), where ME(f)=e, ME(f )=e, from the set E of graph G. This arc corresponds to arc p p pr rp (ep,e)El.

Deleting of parent node from the main entity of the form includes the following steps:

1. Include arc (f,fp), where ME(f)=e, ME(f )=e, into the set E of graph G. This arc corresponds to arc p p pr rp (ep,e)El ;

2. Exclude arcs corresponding with relations of node e with parent nodes, i.e. for r Eparent (ep ) we delete p corresponding to it arc (f,fr ), where ME(fr ) = er,r = (er,ep ) ;

3. Delete arc r from the set E(f), node e must be excluded from the set V(f).

p l p l Let us give the example, showing described operations of including of nodes into the form structure for entity e.

In Figure 2 the logical model graph is shown. Let us discuss the fragment of the presentation model graph, built for the form entity e. Figure 2b shows the simplest presentation model graph, built according the logical model graph. In Figure 2c there is the form structure f after including into it child relation (e,ech1) and, so, adding relation (f,fch1) into graph G. In Figure 2d parent relation (ep2,e) is included into the form structure, besides in pr graph G connections (f,fp21), (f,fp22) are added and connection (f,fp2) is deleted.

pr Similarly we can view adding and deleting operations for other entities, including in subgraph G(f). In order to l view these operations in details, we introduce the definition of parent entity of level n.

Fourth International Conference I.TECH 2006 ech ep 2 ep fp 1 e f ep fp 2 ep ep fp 3 ech G G l pr a) b) fp fp fp f e ep e fp fp ech ech fch fp fch fp 1 f G pr G pr c) d) the scope of form f Figure 2. Including parent and child entities into the form structure Let us have entity e Vl. The parent of the first level for this entity can be any entity, relation of which with entity e n n n n n is in set E (e). If entity ep-1 is a parent of level n-1 for entity e, then entity ep : (ep,ep-1)Eparent (ep-1) will be parent n a parent of level n for entity e. The parent set of level n for entity e we will mark Eparent (e). E1 (e) = Eparent (e).

parent For example, in Figure 2a Eparent (ech2) = {(ep21,ep2),(ep22,ep2 )}.

The discussed above operation of the addition of node ep Eparent (e) to the set V(f) was described for e, which l p is the parent of the first level for node e. For node e, including in the set V(f), and also for any node from the set p l V(f), which is a parent of arbitrary level for node e, we can define the similar operations of deleting\adding parent l and child entities.

We can examine node f Gpr and entity e=ME(f). We will take any node e, which is parent of arbitrary level of node e. We must notice that described below algorithms will be right for the case, when e = e.

Let us have node e, which is incidental to node e of form f and which is child for her:

ch rch Echild (e ) : rch = (e,ech ).

For including node e into graph G(f) it is necessary to execute the following algorithm:

ch l 1. Add node e into the set V(f), and arc r into the set E(f);

ch l ch l 2. Add arc (f,fch), where ME(f)=e, ME(f )=e, into the set E. This arc corresponds to arc (e,ech )El ;

ch ch pr In order to delete node e from graph G(f) it is necessary to fulfill the reverse transformation of the sets V(f), E(f) ch l l l and E :

pr 1. Exclude arc (f,fch), where ME(f)=e, ME(f )=e, from the set E ;

ch ch pr 2. Delete arc r from the set E(f), node e must be deleted from the set V(f).

ch l ch l Let us now have node e, incidentical to node e of form f and which is parent for it, i.e.

p rp Eparent (e ) : rp = (ep,e ).

Addition of parent node into the form structure is in the following:

1. Add node e into the set V(f), and arc r into the set E(f);

p l p l 2. Add arcs, corresponding to relations between node e and parent nodes, i.e. for r Eparent (ep ) we add p Software Engineering (f,fr ), where ME(fr ) = er,r = (er,ep ) ;

3. Delete arc (f,fp), where ME(f)=e, ME(f )=e, from the set E of graph G. This arc corresponds to arc p p pr rp (ep,e )El.

Deleting of parent node from form structure consists of the following steps:

1. Add arc (f,fp ), where ME(f)=e, ME(f )=e, into the set E of graph G. This arc corresponds to arc p p pr pr (ep,e )El ;

2. Delete arcs, corresponding to the relations between node e and parent nodes, i.e. for r Eparent (ep ) we p delete corresponding arc to it (f,fr ), where ME(fr ) = er,r = (er,ep ) ;

3. Delete arc r from the set E(f);

p l 4. Fulfill cascading deleting of all parent nodes which are in G(f), i.e. apply recursively the algorithm to every l i i node ep Vl (f ) : ep Eparent (ep ) ;

5. Delete cascadely all child connections of node e, which are in G(f), i.e. we must apply the deleting algorithm p l i i of child node to every node ech Vl (f ) :ech Echild (ep ) ;

6. Node e must be excluded from the set V(f).

p l Described above the rules of adding nodes can be used in series until the expansion of graph G(f) is possible, i.e.

l till set nodes V(f) have parent and child nodes and connections which can be included into graph G(f). Node e l l (and incidental to it arc) can be included into G(f), if the graph does not have the path, including the same l consecution of nodes and arcs, starting in the root, as well as the way from root node up to including node e.

Pages:     | 1 |   ...   | 34 | 35 || 37 | 38 |   ...   | 54 |



2011 www.dissers.ru -

, .
, , , , 1-2 .