|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.patterncoder.source.PatternFileValidator
public class PatternFileValidator
The PatternFileValidator class is used to validate each of the xml source files against a xmlSchema. If a source file does not get validated, it will not be included.
| Constructor Summary | |
|---|---|
PatternFileValidator()
Creates a new instance of PatternFileValidator, and compiles the validating schema. |
|
| Method Summary | |
|---|---|
static javax.xml.validation.Schema |
compileSchema(java.io.File schemaFile)
Compiles the schema file specified. |
static javax.xml.validation.Schema |
compileSchema(java.lang.String schema)
Compiles the schema file specified. |
void |
validateFile(java.io.File sourceFile)
Validates a source file against the compiled schema.Exceptions are thrown if the validation is Unsuccessful. |
void |
validateFile(java.lang.String sourceFileName)
Validates a source file against the compiled schema.Exceptions are thrown if the validation is Unsuccessful. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PatternFileValidator()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - A SAXException is thrown if the schema file cannot be found, or there is aproblem during comilation of the schema.| Method Detail |
|---|
public static javax.xml.validation.Schema compileSchema(java.lang.String schema)
throws org.xml.sax.SAXException
schema - The schema file to be comiled.
org.xml.sax.SAXException - Throws a SAXException if compilation of the schema fails.
public static javax.xml.validation.Schema compileSchema(java.io.File schemaFile)
throws org.xml.sax.SAXException
schemaFile - The schema file to be comiled.
org.xml.sax.SAXException - Throws a SAXException if compilation of the schema fails.
public void validateFile(java.lang.String sourceFileName)
throws org.xml.sax.SAXException,
java.io.IOException
sourceFileName - The source file to be validated.
org.xml.sax.SAXException - Thrown if the source file cannot be validated against the schema.
java.io.IOException - Thrown if the source file cannot be read or found for any reason.
public void validateFile(java.io.File sourceFile)
throws org.xml.sax.SAXException,
java.io.IOException
sourceFile - The source file to be validated.
org.xml.sax.SAXException - Thrown if the source file cannot be validated against the schema.
java.io.IOException - Thrown if the source file cannot be read or found for any reason.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||