All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.gwdg.metadataqa.marc.model.validation.ErrorsCollector Maven / Gradle / Ivy

package de.gwdg.metadataqa.marc.model.validation;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ErrorsCollector implements Serializable {

  private static final long serialVersionUID = 1905122041950251207L;

  private List errors;

  public ErrorsCollector() {
    errors = new ArrayList<>();
  }

  public void add(String recordId,
                  String marcPath,
                  ValidationErrorType type,
                  String message,
                  String url) {
    errors.add(new ValidationError(recordId, marcPath, type, message, url));
  }

  public boolean isEmpty() {
    return errors.isEmpty();
  }

  public List getErrors() {
    return errors;
  }

  public void addAll(List otherErrors) {
    errors.addAll(otherErrors);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy