org.fcrepo.server.validation
Interface DOValidator

All Known Implementing Classes:
DOValidatorImpl, DOValidatorModule

public interface DOValidator

Validates a digital object.

Author:
Sandy Payette

Field Summary
static String PHASE_INGEST
           
static String PHASE_STORE
           
static int VALIDATE_ALL
           
static int VALIDATE_NONE
           
static int VALIDATE_SCHEMATRON
           
static int VALIDATE_XML_SCHEMA
           
 
Method Summary
 void validate(File in, String format, int validationLevel, String phase)
          Validates a digital object.
 void validate(InputStream in, String format, int validationLevel, String phase)
          Validates a digital object.
 

Field Detail

VALIDATE_ALL

static final int VALIDATE_ALL
See Also:
Constant Field Values

VALIDATE_XML_SCHEMA

static final int VALIDATE_XML_SCHEMA
See Also:
Constant Field Values

VALIDATE_SCHEMATRON

static final int VALIDATE_SCHEMATRON
See Also:
Constant Field Values

VALIDATE_NONE

static final int VALIDATE_NONE
See Also:
Constant Field Values

PHASE_INGEST

static final String PHASE_INGEST
See Also:
Constant Field Values

PHASE_STORE

static final String PHASE_STORE
See Also:
Constant Field Values
Method Detail

validate

void validate(InputStream in,
              String format,
              int validationLevel,
              String phase)
              throws ServerException
Validates a digital object.

Parameters:
in - The digital object provided as a bytestream.
validationLevel - The level of validation to perform on the digital object. This is an integer from 0-2 with the following meanings: 0 = VALIDATE_ALL (do all validation levels) 1 = VALIDATE_XML_SCHEMA (perform only XML Schema validation) 2 = VALIDATE_SCHEMATRON (perform only Schematron Rules validation) -1 = VALIDATE_NONE (no validation)
phase - The stage in the work flow for which the validation should be contextualized. "ingest" = the object is in the submission format for the ingest stage phase "store" = the object is in the authoritative format for the final storage phase
Throws:
ServerException - If validation fails for any reason.

validate

void validate(File in,
              String format,
              int validationLevel,
              String phase)
              throws ServerException
Validates a digital object.

Parameters:
in - The digital object provided as a file.
validationLevel - The level of validation to perform on the digital object. This is an integer from 0-2 with the following meanings: 0 = VALIDATE_ALL (do all validation levels) 1 = VALIDATE_XML_SCHEMA (perform only XML Schema validation) 2 = VALIDATE_SCHEMATRON (perform only Schematron Rules validation)
phase - The stage in the work flow for which the validation should be contextualized. "ingest" = the object is in the submission format for the ingest stage phase "store" = the object is in the authoritative format for the final storage phase
Throws:
ServerException - If validation fails for any reason.


Copyright © 2012 DuraSpace. All Rights Reserved.