com.counterclaim.openefm.lxml.validator
Class SimpleLxmlValidator
java.lang.Object
com.counterclaim.openefm.core.AbstractOpenEFMComponent
com.counterclaim.openefm.lxml.validator.SimpleLxmlValidator
- All Implemented Interfaces:
- LxmlValidator, OpenEFMComponent
- public class SimpleLxmlValidator
- extends AbstractOpenEFMComponent
- implements LxmlValidator
-

|
Field Summary |
protected java.lang.String |
dtdFile
Path to the DTD we want to validate against, relative to OpenEFM.home |
protected static javax.xml.parsers.SAXParserFactory |
factory
The SAXParserFactory that is created the first time we need it. |
private static org.apache.log4j.Logger |
log
|
protected javax.xml.parsers.SAXParser |
parser
The SAXParser we will use to parse the input stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static org.apache.log4j.Logger log
parser
protected javax.xml.parsers.SAXParser parser
- The SAXParser we will use to parse the input stream.
factory
protected static javax.xml.parsers.SAXParserFactory factory
- The SAXParserFactory that is created the first time we need it.
dtdFile
protected java.lang.String dtdFile
- Path to the DTD we want to validate against, relative to OpenEFM.home
SimpleLxmlValidator
public SimpleLxmlValidator()
getDtdFile
public java.lang.String getDtdFile()
setDtdFile
public void setDtdFile(java.lang.String dtdFile)
validateFiling
public ValidationFault[] validateFiling(LxmlFiling filing)
- Parse the content of a filing and validate it against the DTD.
No attempt at checking the content of the message is made.
- Specified by:
validateFiling in interface LxmlValidator
- Parameters:
filing - which we want to validate
- Returns:
- an array of
ValidationFaults or null if OK
containsXml
private boolean containsXml(LxmlFiling filing)
- Check if the filing's content is XML. Used to prevent passing non-XML to the parser.
- Parameters:
filing -
getSAXParser
public javax.xml.parsers.SAXParser getSAXParser()
- Return the SAXParser we will use to parse the input stream. If there
is a problem creating the parser, return
null.
Copyright © 2002 counterclaim.com. All Rights Reserved.