Skip to content
Snippets Groups Projects
Commit 1b05f48a authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

Merge branch...

Merge branch '7-sdo-and-do-do-not-follow-the-same-rule-for-the-name-attribute-first-letter-lower-upper-case' into 'master'

Resolve "SDO and DO do not follow the same rule for the name attribute (first letter lower / upper case)"

Closes #7

See merge request RiseClipseGroup/RiseClipseOCLConstraints_SCL2003!5
parents 7143d89a 5ccfd2ab
No related branches found
No related tags found
1 merge request!5Resolve "SDO and DO do not follow the same rule for the name attribute (first letter lower / upper case)"
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment