ValidationOperation

ValidationOperation

ValidationOperation contains information describing which bag to validate and which BagItProfile to use when validating it.

Constructor

new ValidationOperation(pathToBag)

Creates a new ValidationOperation.

Parameters:
Name Type Description
pathToBag string

The absolute path to the bag DART should validate.

Source:

Members

errors :Object.<string, string>

Contains information describing validation errors. Key is the name of the invalid field. Value is a description of why the field is not valid.

Source:

pathToBag :string

The absolute path to the bag to validate. The path can point to a file or directory.

Source:

result :OperationResult

This describes the result of DART's attempt to validate the bag.

Source:

Methods

(static) inflateFrom(data) → {ValidationOperation}

This converts the JSON representation of a ValidationOperation to a full-fledged ValidationOperation object with all of the expected methods.

Parameters:
Name Type Description
data Object

A JavaScript hash.

Source:

validate() → {boolean}

validate returns true or false, indicating whether this object contains complete and valid data. If it returns false, check the errors property for specific errors.

Source: