XML Modelization of the relations: updated the conversion from 1.2 to 1.1

SVN:trunk[3553]
This commit is contained in:
Romain Quetiez
2015-04-23 09:33:04 +00:00
parent eb379662ce
commit 87a3b73024

View File

@@ -431,14 +431,23 @@ class iTopDesignFormat
{
$oNode->setAttribute('xsi:type', 'AttributeInteger');
// The property class_attcode is left there (doing no harm)
$this->LogWarning('The attribute '.self::GetItopNodePath($oNode), ' has been degraded into an integer attribute. Any OQL query using this attribute will fail.');
$this->LogWarning('The attribute '.self::GetItopNodePath($oNode).' has been degraded into an integer attribute. Any OQL query using this attribute will fail.');
}
// Remove Redundancy settings attributes (no redundancy could be defined in the previous format)
//
$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field[@xsi:type='AttributeRedundancySettings']");
foreach ($oNodeList as $oNode)
{
$this->LogWarning('The attribute '.self::GetItopNodePath($oNode).' is of no use and must be removed.');
$this->DeleteNode($oNode);
}
// Later: transform the relations into code (iif defined as an SQL query)
$oNodeList = $oXPath->query('/itop_design/classes//class/relations');
foreach ($oNodeList as $oNode)
{
$this->LogWarning('The relations defined in '.self::GetItopNodePath($oNode). ' will be lost.');
$this->LogWarning('The relations defined in '.self::GetItopNodePath($oNode).' will be lost.');
$this->DeleteNode($oNode);
}