|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
edu.isi.pegasus.planner.client.DAXValidator
public class DAXValidator
This class reads to validate a DAX document. It requires at least Xerces-J 2.10.
| Field Summary | |
|---|---|
protected int |
m_errors
Counts the number of errors. |
protected int |
m_fatals
Counts the number of fatal errors. |
private Locator |
m_location
Keep the location within the document. |
private XMLReader |
m_reader
Holds the instance of a XMLReader class. |
private String |
m_schemafile
what is the name of the schema file in the filename hint? |
protected boolean |
m_verbose
How verbose should we be? |
protected int |
m_warnings
Counts the number of warnings. |
static String |
SCHEMA_NAMESPACE
URI namespace for DAX schema. |
protected static String |
vendorParserClass
Default parser is the Xerces parser. |
| Constructor Summary | |
|---|---|
DAXValidator(boolean verbose)
default c'tor |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(String nsURI,
String localName,
String qName)
|
void |
error(SAXParseException ex)
|
void |
fatalError(SAXParseException ex)
|
private String |
full_where()
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
static void |
main(String[] args)
|
void |
parse(String filename)
|
private boolean |
prop(String uri,
Object value)
Sets a SAX property while capturing failed features right here. |
private boolean |
set(String uri,
boolean flag)
Sets a feature while capturing failed features right here. |
void |
setDocumentLocator(Locator locator)
|
void |
startDocument()
|
void |
startElement(String nsURI,
String localName,
String qName,
Attributes attrs)
|
boolean |
statistics()
Show how many warnings, errors and fatals were shown. |
void |
warning(SAXParseException ex)
|
private String |
where()
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String vendorParserClass
public static final String SCHEMA_NAMESPACE
private String m_schemafile
private XMLReader m_reader
XMLReader class.
private Locator m_location
protected boolean m_verbose
protected int m_warnings
protected int m_errors
protected int m_fatals
| Constructor Detail |
|---|
public DAXValidator(boolean verbose)
throws Exception
Exception| Method Detail |
|---|
private boolean set(String uri,
boolean flag)
uri - is the feature's URI to modifyflag - is the new value to set.
private boolean prop(String uri,
Object value)
uri - is the property's URI to modifyvalue - is the new value to set.
public void warning(SAXParseException ex)
throws SAXException
warning in interface ErrorHandlerwarning in class DefaultHandlerSAXException
public void error(SAXParseException ex)
throws SAXException
error in interface ErrorHandlererror in class DefaultHandlerSAXException
public void fatalError(SAXParseException ex)
throws SAXException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlersetDocumentLocator in class DefaultHandlerprivate String full_where()
private String where()
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class DefaultHandlerSAXExceptionpublic void endDocument()
endDocument in interface ContentHandlerendDocument in class DefaultHandler
public void startElement(String nsURI,
String localName,
String qName,
Attributes attrs)
throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXException
public void endElement(String nsURI,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class DefaultHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerignorableWhitespace in class DefaultHandlerSAXException
public void parse(String filename)
throws Exception
Exceptionpublic boolean statistics()
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||