Commit 5ccfd2ab authored by Dominique Marcadet's avatar Dominique Marcadet

issue corrected and current enumval displayed

parent 7143d89a
......@@ -32,12 +32,13 @@ context AbstractDataObject
self.name <> null
-- The name attribute shall be valid
inv AbstractDataObject_name_valid
( '[OCL validation] name attribute shall be valid in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + '). '
+ 'Current value is ' + self.name.toString()
)
:
self.name <> null implies self.validSclDataName( name )
-- must be done in subclasses because the rule is not the same between DO and SDO
-- inv AbstractDataObject_name_valid
-- ( '[OCL validation] name attribute shall be valid in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + '). '
-- + 'Current value is ' + self.name.toString()
-- )
-- :
-- self.name <> null implies self.validSclDataName( name )
inv AbstractDataObject_type_required
( '[OCL validation] type attribute shall be present in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + ')' )
......
......@@ -25,8 +25,17 @@ package scl
context DO
-- extends AbstractDataObject
-- The name attribute shall be present and valid
-- The name attribute shall be present
-- In AbstractDataObject.ocl
-- The name attribute shall be valid
-- must be done in subclass because the rule is not the same between DO and SDO
inv DO_name_valid
( '[OCL validation] name attribute shall be valid in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + '). '
+ 'Current value is ' + self.name.toString()
)
:
self.name <> null implies self.validSclDataName( name )
-- The type attribute shall be present and valid
-- In AbstractDataObject.ocl
......
......@@ -28,13 +28,15 @@ context EnumVal
-- The ord attribute shall be present
inv EnumVal_ord_required
( '[OCL validation] ord attribute shall be present in EnumVal (line ' + self.lineNumber.toString() + ')' )
:
:
self.ord <> null
-- The value attribute shall be valid
inv EnumVal_value_valid
( '[OCL validation] value attribute shall be valid in EnumVal (line ' + self.lineNumber.toString() + ')' )
:
( '[OCL validation] value attribute shall be valid in EnumVal (line ' + self.lineNumber.toString() + ')'
+ 'Current value is ' + self.value.toString()
)
:
self.value <> null implies self.validSclEnumStringValue( value )
endpackage
......
......@@ -26,8 +26,17 @@ package scl
context SDO
-- extends AbstractDataObject
-- The name attribute shall be present and valid
-- The name attribute shall be present
-- In AbstractDataObject.ocl
-- The name attribute shall be valid
-- must be done in subclass because the rule is not the same between DO and SDO
inv SDO_name_valid
( '[OCL validation] name attribute shall be valid in ' + self.oclType().toString() + ' (line ' + self.lineNumber.toString() + '). '
+ 'Current value is ' + self.name.toString()
)
:
self.name <> null implies self.validSclSubDataName( name )
-- The type attribute shall be present and valid
-- In AbstractDataObject.ocl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment