public class PrideXmlValidator
extends java.lang.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(java.net.URL schemaUrl)
Set up a PrideXmlValidator using the provided schema.
|
Modifier and Type | Method and Description |
---|---|
XMLValidationErrorHandler |
getErrors()
Returns the XML validation error object.
|
java.lang.String |
getErrorsAsString()
Returns the errors formatted as s single string.
|
void |
setSchema(java.net.URL schemaUrl)
Set the schema.
|
boolean |
validate(java.io.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 java.io.IOException, org.iso_relax.verifier.VerifierConfigurationException, org.xml.sax.SAXException
java.io.IOException
org.iso_relax.verifier.VerifierConfigurationException
org.xml.sax.SAXException
public PrideXmlValidator(java.net.URL schemaUrl) throws java.io.IOException, org.iso_relax.verifier.VerifierConfigurationException, org.xml.sax.SAXException
schemaUrl
- the URL to the schemajava.io.IOException
org.iso_relax.verifier.VerifierConfigurationException
org.xml.sax.SAXException
public void setSchema(java.net.URL schemaUrl) throws java.io.IOException, org.iso_relax.verifier.VerifierConfigurationException, org.xml.sax.SAXException
schemaUrl
- the schema to setjava.io.IOException
org.iso_relax.verifier.VerifierConfigurationException
org.xml.sax.SAXException
public boolean validate(java.io.File prideXmlFile) throws java.io.FileNotFoundException, java.io.IOException, org.iso_relax.verifier.VerifierConfigurationException, org.xml.sax.SAXException
prideXmlFile
- the PRIDE XML file to testjava.io.FileNotFoundException
java.io.IOException
org.iso_relax.verifier.VerifierConfigurationException
org.xml.sax.SAXException
public java.lang.String getErrorsAsString()
public XMLValidationErrorHandler getErrors()
Copyright © 2013. All Rights Reserved.