FUNCTION class_assignment_is_valid
(* SCHEMA step_merged_ap_schema; *)
-- DIFF IN AP203e2
-- DIFF IN AP238 STEP-NC
-- IN AP203e2/AP238 STEP-NC/AP242
FUNCTION class_assignment_is_valid
(aia : applied_classification_assignment ) : BOOLEAN;
LOCAL
item : classification_item;
role : classification_role;
END_LOCAL;
role := aia\classification_assignment.role;
IF 'STEP_MERGED_AP_SCHEMA.CLASS_SYSTEM' IN TYPEOF(aia\classification_assignment.assigned_class) THEN
IF role\classification_role.name <> 'class system membership' THEN
RETURN (FALSE);
END_IF;
REPEAT i := LOINDEX(aia\applied_classification_assignment.items) TO HIINDEX(aia\applied_classification_assignment.items);
item := aia\applied_classification_assignment.items[i];
IF SIZEOF([ 'STEP_MERGED_AP_SCHEMA.CHARACTERIZED_CLASS' ] * TYPEOF(item)) = 0 THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
END_IF;
IF 'STEP_MERGED_AP_SCHEMA.CHARACTERIZED_CLASS' IN TYPEOF(aia\classification_assignment.assigned_class) THEN
IF NOT (role\classification_role.name IN [ 'definitional', 'non-definitional', '' ]) THEN
RETURN (FALSE);
END_IF;
REPEAT i := LOINDEX(aia\applied_classification_assignment.items) TO HIINDEX(aia\applied_classification_assignment.items);
item := aia\applied_classification_assignment.items[i];
IF SIZEOF([ 'STEP_MERGED_AP_SCHEMA.CLASSIFIED_ITEM' ] * TYPEOF(item)) = 0 THEN
RETURN (FALSE);
END_IF;
END_REPEAT;
END_IF;
IF role\classification_role.name = 'definitional' THEN
IF NOT (SIZEOF(QUERY (it <* aia\applied_classification_assignment.items| NOT (SIZEOF([ 'STEP_MERGED_AP_SCHEMA.PRODUCT', 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION_FORMATION', 'STEP_MERGED_AP_SCHEMA.PRODUCT_DEFINITION' ] * TYPEOF(it)) = 1))) = 0) THEN
RETURN (FALSE);
END_IF;
END_IF;
RETURN (FALSE);
END_FUNCTION;
Referenced By
Defintion class_assignment_is_valid is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2020-07-28T17:02:20-04:00