|
RULE restrict_product_definition_for_mating_tree FOR (product_definition); WHERE wr1: SIZEOF ( QUERY ( pd <* product_definition | ( SIZEOF ( QUERY ( pdca <* USEDIN ( pd , 'automotive_design.' + 'product_definition_context_association.' + 'definition' ) | pdca . frame_of_reference . name = 'mating definition' ) ) = 1 ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'automotive_design.' + 'product_definition_relationship.' + 'relating_product_definition' ) | pdr . name = 'mating membership' ) ) <> 2 ) ) ) = 0 ; wr2: SIZEOF ( QUERY ( pd <* product_definition | ( SIZEOF ( QUERY ( pdca <* USEDIN ( pd , 'automotive_design.' + 'product_definition_context_association.' + 'definition' ) | pdca . frame_of_reference . name = 'mating definition' ) ) = 1 ) AND NOT ( { 1 <= SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'automotive_design.' + 'product_definition_relationship.' + 'relating_product_definition' ) | ( pdr . name = 'mating membership' ) AND ( pdr . related_product_definition . frame_of_reference . name = 'part occurrence' ) ) ) <= 2 } ) ) ) = 0 ; wr3: SIZEOF ( QUERY ( pd <* product_definition | ( SIZEOF ( QUERY ( pdca <* USEDIN ( pd , 'automotive_design.' + 'product_definition_context_association.' + 'definition' ) | pdca . frame_of_reference . name = 'mating definition' ) ) = 1 ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'automotive_design.' + 'product_definition_relationship.' + 'relating_product_definition' ) | ( pdr . name = 'mating membership' ) AND ( SIZEOF ( QUERY ( pdca <* USEDIN ( pdr . related_product_definition , 'automotive_design.product_definition_context_association.definition' ) | pdca . frame_of_reference . name = 'mating definition' ) ) = 1 ) ) ) > 1 ) ) ) = 0 ; END_RULE; -- restrict_product_definition_for_mating_tree |
|
public class RRestrict_product_definition_for_mating_tree public int rWr3(SdaiContext _context) public int rWr2(SdaiContext _context) public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |