|
RULE restrict_drawing FOR (draughting_title, drawing_revision); WHERE wr1: ( SIZEOF ( QUERY ( dr <* drawing_revision | ( SIZEOF ( dr . areas ) = 0 ) OR ( SIZEOF ( QUERY ( ais <* dr . areas | NOT ( 'automotive_design.' + 'drawing_sheet_revision' IN TYPEOF ( ais . area ) ) ) ) > 0 ) ) ) = 0 ) ; wr2: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( USEDIN ( dr , 'automotive_design.' + 'draughting_title.' + 'items' ) ) > 1 ) ) = 0 ; wr3: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( USEDIN ( ais . area , 'automotive_design.' + 'draughting_title.' + 'items' ) ) > 1 ) ) > 0 ) ) = 0 ; wr4: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( item <* ais . area . items | SIZEOF ( TYPEOF ( item ) * [ 'automotive_design.' + 'styled_item' , 'automotive_design.' + 'mapped_item' , 'automotive_design.' + 'axis2_placement' , 'automotive_design.' + 'planar_box' ] ) <> 1 ) ) > 0 ) ) > 0 ) ) = 0 ; wr5: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( item <* ais . area . items | SIZEOF ( TYPEOF ( item ) * [ 'automotive_design.' + 'styled_item' , 'automotive_design.' + 'mapped_item' ] ) > 0 ) ) = 0 ) ) > 0 ) ) = 0 ; wr6: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( p_b <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'planar_box' IN TYPEOF ( item ) ) | SIZEOF ( USEDIN ( p_b , 'automotive_design.' + 'presentation_size.' + 'size' ) ) <> 1 ) ) > 0 ) ) > 0 ) ) = 0 ; wr7: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( mi <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'mapped_item' IN TYPEOF ( item ) ) | 'automotive_design.' + 'presentation_view' IN TYPEOF ( mi \ mapped_item . mapping_source . mapped_representation ) ) ) = 0 ) ) > 0 ) ) = 0 ; wr8: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( a2p <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'axis2_placement' IN TYPEOF ( item ) ) | SIZEOF ( USEDIN ( a2p , 'automotive_design.' + 'mapped_item.' + 'mapping_target' ) ) = 0 ) ) > 0 ) ) > 0 ) ) = 0 ; wr9: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( ais . area . context_of_items . representations_in_context ) > 1 ) ) > 0 ) ) = 0 ; wr10: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( mi <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'mapped_item' IN TYPEOF ( item ) ) | SIZEOF ( USEDIN ( mi \ mapped_item . mapping_source . mapped_representation , 'automotive_design.' + 'representation_map.' + 'mapped_representation' ) ) <> 1 ) ) > 0 ) ) > 0 ) ) = 0 ; wr11: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( mi <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'mapped_item' IN TYPEOF ( item ) ) | SIZEOF ( QUERY ( pv_item <* mi \ mapped_item . mapping_source . mapped_representation . items | SIZEOF ( TYPEOF ( pv_item ) * [ 'automotive_design.' + 'styled_item' , 'automotive_design.' + 'camera_image' , 'automotive_design.' + 'axis2_placement' ] ) <> 1 ) ) > 0 ) ) > 0 ) ) > 0 ) ) = 0 ; wr12: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( mi <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'mapped_item' IN TYPEOF ( item ) ) | SIZEOF ( QUERY ( a2p <* QUERY ( pv_item <* mi \ mapped_item . mapping_source . mapped_representation . items | 'automotive_design.' + 'axis2_placement' IN TYPEOF ( pv_item ) ) | SIZEOF ( QUERY ( rm <* USEDIN ( a2p , 'automotive_design.' + 'representation_map.' + 'mapping_origin' ) | SIZEOF ( QUERY ( mi <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'mapped_item' IN TYPEOF ( item ) ) | mi \ mapped_item . mapping_source :=: rm ) ) > 0 ) ) = 1 ) ) <> 1 ) ) > 0 ) ) > 0 ) ) = 0 ; wr13: SIZEOF ( QUERY ( dr <* drawing_revision | SIZEOF ( QUERY ( ais <* dr . areas | SIZEOF ( QUERY ( mi <* QUERY ( item <* ais . area . items | 'automotive_design.' + 'mapped_item' IN TYPEOF ( item ) ) | SIZEOF ( mi \ mapped_item . mapping_source . mapped_representation . context_of_items . representations_in_context ) <> 1 ) ) > 0 ) ) > 0 ) ) = 0 ; END_RULE; -- restrict_drawing |
|
public class RRestrict_drawing public int rWr13(SdaiContext _context) public int rWr12(SdaiContext _context) public int rWr11(SdaiContext _context) public int rWr10(SdaiContext _context) public int rWr9(SdaiContext _context) public int rWr8(SdaiContext _context) public int rWr7(SdaiContext _context) public int rWr6(SdaiContext _context) public int rWr5(SdaiContext _context) 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) |