Пример #1
0
  public void run()
      throws XdsInternalException, MetadataValidationException, LoggerException, XdsException {

    try {
      s.run();

      a.run();

      cv.run();
    } catch (XdsInternalException e) {
      rel.add_error(
          MetadataSupport.XDSRegistryError,
          e.getMessage(),
          RegistryUtility.exception_details(e),
          null);
    } catch (MetadataException e) {
      rel.add_error(
          MetadataSupport.XDSRegistryError,
          e.getMessage(),
          RegistryUtility.exception_details(e),
          null);
    }

    pid.run();

    for (OMElement ele : m.getRegistryPackages()) validate_internal_classifications(ele);
    for (OMElement ele : m.getExtrinsicObjects()) validate_internal_classifications(ele);

    uid.run();

    rel.getRegistryErrorList(); // forces output of validation report
    // System.out.println("Metadata Validator Done");
  }
Пример #2
0
  public Validator(
      Metadata m,
      RegistryErrorList rel,
      boolean is_submit,
      boolean is_xdsb,
      LogMessage log_message,
      boolean isPnR,
      IConnectionDescription connection)
      throws LoggerException, XdsException {
    this.rel = rel;
    this.m = m;
    this.is_submit = is_submit;
    this.is_xdsb = is_xdsb;
    this.log_message = log_message;
    this.isPnR = isPnR;

    s = new Structure(m, is_submit, rel, log_message);
    a = new Attribute(m, is_submit, is_xdsb, rel, isPnR);
    try {
      cv = new CodeValidation(m, is_submit, is_xdsb, rel, connection);
    } catch (XdsInternalException e) {
      rel.add_error(
          MetadataSupport.XDSRegistryError,
          e.getMessage(),
          RegistryUtility.exception_details(e),
          null);
      throw new XdsInternalException(e.getLocalizedMessage(), e);
    }
    assigning_authorities = cv.getAssigningAuthorities();

    pid = new PatientId(m, rel, is_submit, is_xdsb);
    uid = new UniqueId(m, rel, is_xdsb);
  }