|
FUNCTION class_assignment_is_valid (aia : applied_classification_assignment) : BOOLEAN; LOCAL item : classification_item ; role : classification_role ; END_LOCAL ; role := aia . role ; IF ( 'classification_with_attributes_mim.' + 'class_system' IN TYPEOF ( aia . assigned_class ) ) THEN IF ( role . name <> 'class system membership' ) THEN RETURN ( FALSE ) ; END_IF ; REPEAT i := LOINDEX ( aia . items ) TO HIINDEX ( aia . items ) ; item := aia . items [ i ] ; IF ( SIZEOF ( [ 'classification_with_attributes_mim.' + 'class_system_item' ] * TYPEOF ( item ) ) = 0 ) THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; END_IF ; IF ( 'classification_with_attributes_mim.' + 'characterized_class' IN TYPEOF ( aia . assigned_class ) ) THEN IF NOT ( role . name IN [ 'definitional' , 'non-definitional' , '' ] ) THEN RETURN ( FALSE ) ; END_IF ; REPEAT i := LOINDEX ( aia . items ) TO HIINDEX ( aia . items ) ; item := aia . items [ i ] ; IF ( SIZEOF ( [ 'classification_with_attributes_mim.' + 'classified_item' ] * TYPEOF ( item ) ) = 0 ) THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; END_IF ; RETURN ( TRUE ) ; END_FUNCTION; -- class_assignment_is_valid |
|
public class FClass_assignment_is_valid public static Value run(SdaiContext _context, Value aia) |