|
RULE restrict_alternative_definition FOR (product_definition, product_definition_context); WHERE wr1: SIZEOF ( QUERY ( pd <* product_definition | ( pd . frame_of_reference . name = 'alternative definition' ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'automotive_design.' + 'product_definition_relationship.' + 'related_product_definition' ) | pdr . name = 'solution alternative definition' ) ) <> 1 ) ) ) = 0 ; wr2: SIZEOF ( QUERY ( pd <* product_definition | ( pd . frame_of_reference . name = 'alternative definition' ) AND NOT ( pd . name IN [ 'technical' , 'supplier' , 'final' , 'technical supplier' , 'technical final' , 'supplier final' , 'technical supplier final' , '' ] ) ) ) = 0 ; wr3: SIZEOF ( QUERY ( pd <* product_definition | ( pd . frame_of_reference . name = 'alternative definition' ) AND ( pd . name IN [ 'supplier' , 'technical supplier' , 'supplier final' , 'technical supplier final' ] ) AND ( SIZEOF ( QUERY ( aoa <* USEDIN ( pd . formation , 'automotive_design.' + 'applied_organization_assignment.' + 'items' ) | aoa . role . name = 'supplier' ) ) <> 1 ) ) ) = 0 ; wr4: SIZEOF ( QUERY ( pd <* product_definition | ( pd . frame_of_reference . name = 'alternative definition' ) AND ( pd . name IN [ 'final' , 'technical final' , 'supplier final' , 'technical supplier final' ] ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'automotive_design.' + 'product_definition_relationship.' + 'relating_product_definition' ) | pdr . name = 'final specification' ) ) = 0 ) AND ( SIZEOF ( QUERY ( pd <* USEDIN ( pd , 'automotive_design.' + 'property_definition.' + 'definition' ) | SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'automotive_design.' + 'property_definition_representation.' + 'definition' ) | ( pdr . used_representation . name = 'final item characteristics' ) AND ( SIZEOF ( QUERY ( i <* pdr . used_representation . items | 'automotive_design.' + 'descriptive_representation_item' IN TYPEOF ( i ) ) ) = SIZEOF ( pdr . used_representation . items ) ) AND ( SIZEOF ( pdr . used_representation . items ) >= 2 ) AND ( SIZEOF ( QUERY ( i <* pdr . used_representation . items | i . name = 'final item status' ) ) = 1 ) ) ) > 0 ) ) = 0 ) ) ) = 0 ; END_RULE; -- restrict_alternative_definition |
|
public class RRestrict_alternative_definition public int rWr4(SdaiContext _context) public int rWr3(SdaiContext _context) public int rWr2(SdaiContext _context) public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |