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
IOException
- if an IOException occursorg.iso_relax.verifier.VerifierConfigurationException
- if a
VerifierConfigurationException occursSAXException
- if a SAXException occurspublic PrideXmlValidator(URL schemaUrl) throws IOException, org.iso_relax.verifier.VerifierConfigurationException, SAXException
schemaUrl
- the URL to the schemaIOException
- if an IOException occursorg.iso_relax.verifier.VerifierConfigurationException
- if a
VerifierConfigurationException occursSAXException
- if a SAXException occurspublic void setSchema(URL schemaUrl) throws IOException, org.iso_relax.verifier.VerifierConfigurationException, SAXException
schemaUrl
- the schema to setIOException
- if an IOException occursorg.iso_relax.verifier.VerifierConfigurationException
- if a
VerifierConfigurationException occursSAXException
- if a SAXException occurspublic boolean validate(File prideXmlFile) throws FileNotFoundException, IOException, org.iso_relax.verifier.VerifierConfigurationException, SAXException
prideXmlFile
- the PRIDE XML file to testFileNotFoundException
- if a FileNotFoundException occursIOException
- if an IOException occursorg.iso_relax.verifier.VerifierConfigurationException
- if a
VerifierConfigurationException occursSAXException
- if a SAXException occurspublic String getErrorsAsString()
public XMLValidationErrorHandler getErrors()
Copyright © 2016. All rights reserved.