XML Modelization of the relations: reworked toward an asymetric definition (downstream: A impacts B, upstream: B depends on A)

- The queries are developped at runtime (cache)
- More complex algorithm to take into account the legacy type of specification (GetRelationQueries)
- New dictionary naming convention (preserving backward compatibility): "VerbUp" to be replaced by "DownStream
- Temporary hacks to preserve the relation 'depends on', until we have a new GUI
- Special handling for the relation LogicalVolume impacts VirtualDevice which had to be implemented in the bridge module
- Improved the backward compatibility by leaving legacy methods GetRelationQueries returning an empty definition, allowing for an eventual XML redefinition

SVN:trunk[3542]
This commit is contained in:
Romain Quetiez
2015-04-10 10:09:22 +00:00
parent b9b5287b37
commit e64b6d1d98
24 changed files with 3052 additions and 2642 deletions

View File

@@ -530,7 +530,8 @@ function DisplayRelationDetails($oPage, $sRelCode, $sContext)
$oPage->add("<ul>\n");
foreach ($aRelQueries as $sRelKey => $aQuery)
{
$sQuery = isset($aQuery['sQuery']) ? $aQuery['sQuery'] : '';
$sQueryDown = isset($aQuery['sQueryDown']) ? $aQuery['sQueryDown'] : '';
$sQueryUp = isset($aQuery['sQueryUp']) ? $aQuery['sQueryUp'] : '';
$sAttribute = isset($aQuery['sAttribute']) ? $aQuery['sAttribute'] : '';
/*
if ($aQuery['bPropagate'])
@@ -542,7 +543,7 @@ function DisplayRelationDetails($oPage, $sRelCode, $sContext)
$oPage->add("<li>".Dict::Format('UI:Schema:RelationDoesNotPropagate', $sRelKey, $iDistance, $sQuery)."</li>\n");
}
*/
$sLabel = (strlen($sQuery) > 0) ? $sQuery : $sAttribute;
$sLabel = (strlen($sQueryDown) > 0) ? $sQueryDown : $sAttribute;
if ($aQuery['_legacy_'])
{
$sLabel .= ' (<b>Old style specification</b>: it is recommended to upgrade to XML)';