RULE restrict_default_settings FOR (applied_document_reference, representation); WHERE wr1: ( SIZEOF ( QUERY ( r <* representation | ( r.name = 'default tolerances' ) AND ( r.context_of_items. context_type = 'default setting' ) AND ( SIZEOF ( r.items ) <>1 ) ) ) =0 ) AND ( SIZEOF ( QUERY ( r <* representation | ( r.name = 'default tolerances' ) AND ( r.context_of_items. context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( i <* r.items | ( 'AUTOMOTIVE_DESIGN.'+ 'DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND ( i.name = 'tolerance class' ) ) ) <>1 ) ) ) =0 ); wr2: SIZEOF ( QUERY ( r <* representation | ( r.name = 'default tolerances' ) AND ( r.context_of_items. context_type = 'default setting' ) AND ( SIZEOF ( QUERY ( adr <* USEDIN ( r , 'AUTOMOTIVE_DESIGN.APPLIED_DOCUMENT_REFERENCE.ITEMS' ) | adr. role.name = 'general tolerance definition' ) ) + SIZEOF ( QUERY ( rr <* USEDIN ( r , 'AUTOMOTIVE_DESIGN.REPRESENTATION_RELATIONSHIP.REP_2' ) | ( rr. name = 'general tolerance definition' ) AND ( 'AUTOMOTIVE_DESIGN.'+ 'DEFAULT_TOLERANCE_TABLE' IN TYPEOF ( rr. rep_1 ) ) ) ) <>1 ) ) ) =0; END_RULE; -- restrict_default_settings |
public class RRestrict_default_settings public int rWr2(SdaiContext _context) public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |