Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Obsolete COSMOS SDD Tooling BTG Rules"

(Resources)
(Resources)
Line 11: Line 11:
  
 
Tree 1:
 
Tree 1:
 +
<pre>
 
A
 
A
 
   B
 
   B
Line 16: Line 17:
 
   D
 
   D
 
   E
 
   E
 +
</pre>
  
 
Tree 2:
 
Tree 2:
 +
<pre>
 
F
 
F
 
   A
 
   A
Line 23: Line 26:
 
       C
 
       C
 
   G
 
   G
 +
</pre>
  
 
The same letters in different trees refer to the same resource and should be merge together when merging trees.
 
The same letters in different trees refer to the same resource and should be merge together when merging trees.
 +
 +
Our rules for merging should be the following:
 +
 +
# Merge two resources when at least one of the resources has a parent that is ''not'' a resource.
 +
## If the resources are in different trees, the ancestry (parent resource and up) should be left in tact. Meaning, the resource with no parent will now have the same parent as the matching resource in the other tree. The resource with no parent will be removed from the root of the tree and merge in the tree with the resource that has a parent.
 +
## If the resources are in the same tree, the resource with no parent will be removed from the root of the tree and merged with the resource that has a parent.
 +
#

Revision as of 11:31, 27 January 2008

This page holds ideas about how rules should be written for combining two SDDs together.

Rules

Our rules engine is Drools 4.0.4. Any discussion about rules should take this into consideration.

Resources

Resources can have any number of hosted resources, and those hosted resources can have any number of hosted resources, and etc. We need some rules to determine how to combine two trees from different descriptors.

Let's say we have the following two resource trees:

Tree 1:

A
  B
    C
  D
  E

Tree 2:

F
  A
    B
      C
  G

The same letters in different trees refer to the same resource and should be merge together when merging trees.

Our rules for merging should be the following:

  1. Merge two resources when at least one of the resources has a parent that is not a resource.
    1. If the resources are in different trees, the ancestry (parent resource and up) should be left in tact. Meaning, the resource with no parent will now have the same parent as the matching resource in the other tree. The resource with no parent will be removed from the root of the tree and merge in the tree with the resource that has a parent.
    2. If the resources are in the same tree, the resource with no parent will be removed from the root of the tree and merged with the resource that has a parent.

Back to the top