public class PrideXmlValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.iso_relax.verifier.VerifierFactory |
VERIFIER_FACTORY
The verifier factory.
|
| Constructor and Description |
|---|
PrideXmlValidator()
Set up a PrideXmlValidator using the default schema.
|
PrideXmlValidator(URL schemaUrl)
Set up a PrideXmlValidator using the provided schema.
|
| Modifier and Type | Method and Description |
|---|---|
XMLValidationErrorHandler |
getErrors()
Returns the XML validation error object.
|
String |
getErrorsAsString()
Returns the errors formatted as s single string.
|
void |
setSchema(URL schemaUrl)
Set the schema.
|
boolean |
validate(File prideXmlFile)
Returns true of the given PRIDE XML file is valid.
|
public static final org.iso_relax.verifier.VerifierFactory VERIFIER_FACTORY
public PrideXmlValidator()
throws IOException,
org.iso_relax.verifier.VerifierConfigurationException,
SAXException
IOExceptionorg.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionpublic PrideXmlValidator(URL schemaUrl) throws IOException, org.iso_relax.verifier.VerifierConfigurationException, SAXException
schemaUrl - the URL to the schemaIOExceptionorg.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionpublic void setSchema(URL schemaUrl) throws IOException, org.iso_relax.verifier.VerifierConfigurationException, SAXException
schemaUrl - the schema to setIOExceptionorg.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionpublic boolean validate(File prideXmlFile) throws FileNotFoundException, IOException, org.iso_relax.verifier.VerifierConfigurationException, SAXException
prideXmlFile - the PRIDE XML file to testFileNotFoundExceptionIOExceptionorg.iso_relax.verifier.VerifierConfigurationExceptionSAXExceptionpublic String getErrorsAsString()
public XMLValidationErrorHandler getErrors()
Copyright © 2014. All rights reserved.