RULE restrict_representation_for_document_properties FOR (property_definition, representation, representation_context); WHERE wr1: SIZEOF ( QUERY ( pd <* property_definition | ( pd. name ='document property' ) AND ( SIZEOF ( QUERY ( pdr <* USEDIN( pd , 'CATALOG_DATA_INFORMATION_MIM' + '.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | NOT ( pdr.used_representation.name IN ['document content' , 'document creation' , 'document format' , 'document size' ] ) ) ) >0 ) ) ) =0; wr2: SIZEOF ( QUERY ( r <* representation | ( r.name IN [ 'document content' , 'document creation' , 'document format' , 'document size' ] ) AND ( SIZEOF (QUERY ( pdr <* USEDIN ( r , 'CATALOG_DATA_INFORMATION_MIM' + '.PROPERTY_DEFINITION_REPRESENTATION.USED_REPRESENTATION') | ( 'CATALOG_DATA_INFORMATION_MIM' + '.PROPERTY_DEFINITION' IN TYPEOF( pdr. definition ) ) AND ( pdr. definition.name = 'document property' ) ) ) =0 ) ) ) =0; wr3: SIZEOF ( QUERY ( r <* representation | ( r.name IN ['document content' , 'document creation' , 'document format' , 'document size' ] ) AND (r.context_of_items.context_type<> 'document parameters' )) ) =0; wr4: SIZEOF ( QUERY ( rc <* representation_context | ( rc.context_type = 'document parameters' ) AND ( SIZEOF ( QUERY( r <* USEDIN ( rc ,'CATALOG_DATA_INFORMATION_MIM' + '.REPRESENTATION.CONTEXT_OF_ITEMS' ) | NOT( r.name IN [ 'document content' , 'document creation' , 'document format' , 'document size' ] ) ) ) >0 ) ) ) =0; END_RULE; -- restrict_representation_for_document_properties |
public class RRestrict_representation_for_document_properties 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) |