Class ValidationResults

java.lang.Object
org.openpreservation.format.xml.ValidationResults

public final class ValidationResults extends Object
A factory for creating ParseResult and ValidationResult objects.
  • Method Details

    • parseResultOf

      public static final ParseResult parseResultOf(boolean valid, Namespace namespace, List<Namespace> declareNamespaces, List<Namespace> usedNamespaces, String prefix, String name, List<Attribute> attributes, List<Message> messages)
      Create a new ParseResult object from the supplied values.
      Parameters:
      valid - true if the result is for a valid XML document, otherwise false
      messages - the List of Messages to be used for the ValidationResult
      Returns:
      a new ParseResult object created from the supplied values
    • of

      public static final ValidationResult of(ParseResult parseResult, boolean valid, List<Message> messages)
      Creates a new ValidationResult object from the supplied values.
      Parameters:
      parseResult - the ParseResult to be used for the ValidationResult
      valid - true if the result is for a valid XML document, otherwise false
      messages - the List of Messages to be used for the ValidationResult
      Returns:
      a new ValidationResult object created from the supplied values