Package org.openpreservation.format.xml
Class ValidationResults
java.lang.Object
org.openpreservation.format.xml.ValidationResults
A factory for creating
ParseResult
and ValidationResult
objects.-
Method Summary
Modifier and TypeMethodDescriptionstatic final ValidationResult
of
(ParseResult parseResult, boolean valid, List<Message> messages) Creates a newValidationResult
object from the supplied values.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 newParseResult
object from the supplied values.
-
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 newParseResult
object from the supplied values.- Parameters:
valid
-true
if the result is for a valid XML document, otherwisefalse
messages
- theList
ofMessage
s to be used for theValidationResult
- 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 newValidationResult
object from the supplied values.- Parameters:
parseResult
- theParseResult
to be used for theValidationResult
valid
-true
if the result is for a valid XML document, otherwisefalse
messages
- theList
ofMessage
s to be used for theValidationResult
- Returns:
- a new
ValidationResult
object created from the supplied values
-