private void checkSchemaHandlingAssociation(ResourceValidationContext ctx, ObjectClassComplexTypeDefinition ocdef, ItemPath path,
ResourceObjectTypeDefinitionType objectType, ResourceObjectAssociationType associationDef) {
checkSchemaHandlingItem(ctx, path, objectType, associationDef);
checkItemRef(ctx, path, objectType, associationDef, C_NO_ASSOCIATION_NAME);
checkNotEmpty(ctx, path, objectType, associationDef, associationDef.getKind(), ResourceObjectAssociationType.F_KIND, C_MISSING_ASSOCIATION_TARGET_KIND);
checkNotEmpty(ctx, path, objectType, associationDef, associationDef.getIntent(), ResourceObjectAssociationType.F_INTENT, C_MISSING_ASSOCIATION_TARGET_INTENT);
checkNotEmpty(ctx, path, objectType, associationDef, associationDef.getDirection(), ResourceObjectAssociationType.F_DIRECTION, C_MISSING_ASSOCIATION_DIRECTION);
checkNotEmpty(ctx, path, objectType, associationDef, associationDef.getAssociationAttribute(), ResourceObjectAssociationType.F_ASSOCIATION_ATTRIBUTE, C_MISSING_ASSOCIATION_ASSOCIATION_ATTRIBUTE);
checkNotEmpty(ctx, path, objectType, associationDef, associationDef.getValueAttribute(), ResourceObjectAssociationType.F_VALUE_ATTRIBUTE, C_MISSING_ASSOCIATION_VALUE_ATTRIBUTE);
QName ref = itemRefToName(associationDef.getRef());
if (ocdef != null) {
if (ref != null) {
if (ocdef.findAttributeDefinition(ref, ResourceTypeUtil.isCaseIgnoreAttributeNames(ctx.resourceObject.asObjectable())) != null) {
ctx.validationResult.add(Issue.Severity.ERROR,
CAT_SCHEMA_HANDLING, C_COLLIDING_ASSOCIATION_NAME,
getString(CLASS_DOT + C_COLLIDING_ASSOCIATION_NAME, getName(objectType), prettyPrintUsingStandardPrefix(ref)),
ctx.resourceRef, path.append(ResourceItemDefinitionType.F_REF));
}
}
}
for (String intent : associationDef.getIntent()) {
checkAssociationTargetIntent(ctx, path, objectType, associationDef, ref, intent);
}
}