void validateAssocClassifications(ErrorRecorder er, Classification cl) {
String classification_type = cl.getClassificationScheme();
if (classification_type == null || !classification_type.equals(MetadataSupport.XDSAssociationDocumentation_uuid))
return;
String classified_object_id = cl.parent_id();
String classified_object_type = getObjectTypeById(er, classified_object_id);
if (classified_object_type == null)
return;
if ( !classified_object_type.equals("Association")) {
er.err(XdsErrorCode.Code.XDSRegistryMetadataError, objectDescription(cl.getOwnerId()) + ": associationDocumentation Classification (" + MetadataSupport.XDSAssociationDocumentation_uuid + ") can only be used on Associations", this, "ITI TF-3: 4.1.6.1");
return;
}
String assoc_id = classified_object_id;
OMElement assoc_ele = getObjectById(er, assoc_id);
if (assoc_ele == null)
return;
String assoc_type = getSimpleAssocType(er, assoc_ele);
for (int i=0; i<assocClassifications.length; i++) {
String a = assocClassifications[i];
if (a.equals(assoc_type))
return;
}
er.err(XdsErrorCode.Code.XDSRegistryMetadataError, objectDescription(assoc_ele) + ": Association Type " + assoc_type + " cannot have an associationDocumentation classification", this, "ITI TF-3: 4.1.6.1");
}