public void setValidationContext(ValidationContext vc) throws XdsInternalException { this.vc = vc; loadCodes(); }
String objectDescription(String id) { return objectType(id) + "(" + id + ")"; }
void validateAssocClassifications(ErrorRecorder er, Classification cl) { String classification_type = cl.getClassificationScheme(); if (classification_type == null || !classification_type.equals(MetadataSupport.XDSAssociationDocumentation_uuid)) return; // not associationDocumenation classification 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"); }
continue; validate(er, cl); validateAssocClassifications(er, cl); if ( !isValidMimeType(mime_type)) { if (vc.isXDM || vc.isXDR || vc.isPartOfRecipient) er.detail("Mime type, " + mime_type + ", is not available in this Affinity Domain");
String classification_node = cl.getClassificationNode(); if (classification_node == null || classification_node.equals("")) { cannotValidate(er, cl); return ; } else cannotValidate(er, cl); return ; cannotValidate(er, cl); return; er.detail(objectDescription(owner) + ": the code " + coding_scheme + "(" + code + ") is not found in the Affinity Domain configuration"); else er.err(XdsErrorCode.Code.XDSRegistryMetadataError, objectDescription(owner) + ": the code " + coding_scheme + "(" + code + ") is not found in the Affinity Domain configuration", this, "ITI TF-3: 4.1.10");
CodeValidationBase(int ignore) throws XdsInternalException { loadCodes(); }
String objectDescription(OMElement ele) { String objectType = objectType(m.getId(ele)); if (objectType.equals("Unknown")) objectType = ele.getLocalName(); return objectType + "(" + m.getId(ele) + ")"; }
public List<String> getAssigningAuthorities() { try { loadCodes(); } catch (Exception e) { System.out.println("loading codes: " + e.getMessage()); } return assigning_authorities; }