|
RULE restrict_representation_for_document_content_property FOR (representation, representation_item); LOCAL document_content_representations : SET OF representation := [ ] ; END_LOCAL ; document_content_representations := QUERY ( r <* representation | ( r . name = 'document content' ) ) ; WHERE wr1: SIZEOF ( QUERY ( r <* document_content_representations | ( ( SIZEOF ( r . items ) < 1 ) OR ( SIZEOF ( r . items ) > 3 ) ) ) ) = 0 ; wr2: SIZEOF ( QUERY ( ri <* representation_item | ( SIZEOF ( QUERY ( r <* USEDIN ( ri , 'catalog_data_information_mim' + '.representation.items' ) | r . name = 'document content' ) ) > 0 ) AND NOT ( ri . name IN [ 'detail level' , 'geometry type' , 'real world scale' ] ) ) ) = 0 ; wr3: SIZEOF ( QUERY ( r <* document_content_representations | ( SIZEOF ( QUERY ( it <* r . items | ( it . name = 'detail level' ) AND ( 'catalog_data_information_mim' + '.descriptive_representation_item' IN TYPEOF ( it ) ) ) ) > 1 ) ) ) = 0 ; wr4: SIZEOF ( QUERY ( r <* document_content_representations | ( SIZEOF ( QUERY ( it <* r . items | ( it . name = 'geometry type' ) AND ( 'catalog_data_information_mim' + '.descriptive_representation_item' IN TYPEOF ( it ) ) ) ) > 1 ) ) ) = 0 ; wr5: SIZEOF ( QUERY ( r <* document_content_representations | ( SIZEOF ( QUERY ( it <* r . items | ( it . name = 'real world scale' ) AND ( SIZEOF ( [ 'catalog_data_information_mim' + '.measure_representation_item' , 'catalog_data_information_mim' + '.value_representation_item' ] * TYPEOF ( it ) ) = 1 ) ) ) > 1 ) ) ) = 0 ; END_RULE; -- restrict_representation_for_document_content_property |
|
public class RRestrict_representation_for_document_content_property 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) |