RULE shape_representation_requires_origin FOR (shape_representation); WHERE wr1: SIZEOF(QUERY ( sr <* shape_representation | NOT( (SIZEOF(QUERY ( it <* sr\representation.items | ( ((it\representation_item.name = 'origin') OR (it\representation_item.name = 'orientation')) AND (('GEOMETRY_SCHEMA.' + 'AXIS2_PLACEMENT_2D' IN TYPEOF(it)) OR ('GEOMETRY_SCHEMA.' + 'AXIS2_PLACEMENT_2D' IN TYPEOF(it))) ))) = 1 ) OR (SIZEOF(QUERY ( it <* sr\representation.items | ( ('PRESENTATION_APPEARANCE_SCHEMA.' + 'STYLED_ITEM' IN TYPEOF(it)) ))) >= 1 ) OR (SIZEOF(QUERY ( it <* sr\representation.items | ( ((it\representation_item.name = 'origin') OR (it\representation_item.name = 'orientation')) and ((sr\representation.name = 'zone shape') OR (sr.context_of_items\representation_context.context_type = 'connection zone colour')) ))) = 0 ) ))) = 0; END_RULE; -- shape_representation_requires_origin |
public class RShape_representation_requires_origin public int rWr1(SdaiContext _context) public int run(SdaiContext _context, A_string violations) |