Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Object validation

Fedora Object validation can be configured to be is carried out prior to any object modifications being committed to permanent storage - if a modification would result in an invalid object, the modification is not made and an error is reported.

By default, no object validation is carried outvalidation is performed.

In addition, objects can be validated on demand using the validate API method. This will validate objects according to their specificaiton using Enhanced Content Models.

Digital Object validation is configured using Spring, in the file $FEDORA_HOME/server/config/spring/doobjectvalidator.xml.

Digital Object validation can be used to ensure that repository content conforms to the rules specified using Enhanced Content Models, which allows specification via an object's content model of XML datastream schema and relationships that should exist between objects.

To enable object validation for every modification made to an object, uncomment the relevant sections in this file.

You can define your own validators for objects by writing Java classes that implement the org.fcrepo.server.validation.DOObjectValidator interface, and then adding these to the doobjectvalidator.xml Spring configuration file.

If an API operation would result in an invalid object according to the configured validators, the API operation will not be performed, and an error will be reported.