public class DOValidatorSchematron extends Object
| Constructor and Description |
|---|
DOValidatorSchematron(String schemaPath,
String preprocessorPath,
String phase)
Constructs a DOValidatorSchematron instance with a Schematron
preprocessor that is provided by the calling class.
|
| Modifier and Type | Method and Description |
|---|---|
static StreamSource |
fileToStreamSource(File file) |
static StreamSource |
fileToStreamSource(String str)
Generates a StreamSource from a file name.
|
void |
validate(File objectAsFile)
Run the Schematron validation on a Fedora object.
|
void |
validate(InputStream objectAsStream)
Run the Schematron validation on a Fedora object.
|
void |
validate(StreamSource objectSource)
Run the Schematron validation on a Fedora object.
|
public DOValidatorSchematron(String schemaPath, String preprocessorPath, String phase) throws ObjectValidityException, TransformerException
schemaPath - the URL of the Schematron schemapreprocessorPath - the location of the Schematron preprocessorphase - the phase in the fedora object lifecycle to which validation
should pertain. (Currently options are "ingest" and "store"ObjectValidityExceptionTransformerExceptionpublic void validate(File objectAsFile) throws ServerException
objectAsFile - the Fedora object as a FileServerExceptionpublic void validate(InputStream objectAsStream) throws ServerException
objectAsStream - the Fedora object as an InputstreamServerExceptionpublic void validate(StreamSource objectSource) throws ServerException
objectSource - the Fedora object as an StreamSourceServerExceptionpublic static StreamSource fileToStreamSource(String str)
public static StreamSource fileToStreamSource(File file)
Copyright © 2013 DuraSpace. All Rights Reserved.