Package com.sun.msv.driver.textui
Class DebugController
- java.lang.Object
-
- com.sun.msv.driver.textui.DebugController
-
- All Implemented Interfaces:
GrammarReaderController,org.xml.sax.EntityResolver
public class DebugController extends java.lang.Object implements GrammarReaderController
GrammarReaderController that prints all errors and warnings.
-
-
Field Summary
Fields Modifier and Type Field Description private booleandisplayWarningif true, warnings are reported.org.xml.sax.EntityResolverexternalEntityResolverentity resolution is delegated to this object.protected java.io.PrintStreamoutmessages are sent to this object.private booleanwarningReportedset to true after "there are warnings..." message is once printed.
-
Constructor Summary
Constructors Constructor Description DebugController(boolean displayWarning)DebugController(boolean displayWarning, boolean quiet)DebugController(boolean displayWarning, boolean quiet, java.io.PrintStream outDevice)DebugController(boolean displayWarning, boolean quiet, java.io.PrintStream outDevice, org.xml.sax.EntityResolver externalEntityResolver)DebugController(boolean displayWarning, boolean quiet, org.xml.sax.EntityResolver externalEntityResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(org.xml.sax.Locator[] loc, java.lang.String errorMessage, java.lang.Exception nestedException)private voidprintLocation(org.xml.sax.Locator loc)org.xml.sax.InputSourceresolveEntity(java.lang.String publicId, java.lang.String systemId)voidwarning(org.xml.sax.Locator[] loc, java.lang.String errorMessage)
-
-
-
Field Detail
-
displayWarning
private boolean displayWarning
if true, warnings are reported. If false, not reported.
-
warningReported
private boolean warningReported
set to true after "there are warnings..." message is once printed.
-
externalEntityResolver
public org.xml.sax.EntityResolver externalEntityResolver
entity resolution is delegated to this object. can be null.
-
out
protected java.io.PrintStream out
messages are sent to this object.
-
-
Constructor Detail
-
DebugController
public DebugController(boolean displayWarning)
-
DebugController
public DebugController(boolean displayWarning, boolean quiet)
-
DebugController
public DebugController(boolean displayWarning, boolean quiet, org.xml.sax.EntityResolver externalEntityResolver)
-
DebugController
public DebugController(boolean displayWarning, boolean quiet, java.io.PrintStream outDevice)
-
DebugController
public DebugController(boolean displayWarning, boolean quiet, java.io.PrintStream outDevice, org.xml.sax.EntityResolver externalEntityResolver)
-
-
Method Detail
-
warning
public void warning(org.xml.sax.Locator[] loc, java.lang.String errorMessage)- Specified by:
warningin interfaceGrammarReaderController
-
error
public void error(org.xml.sax.Locator[] loc, java.lang.String errorMessage, java.lang.Exception nestedException)- Specified by:
errorin interfaceGrammarReaderController
-
printLocation
private void printLocation(org.xml.sax.Locator loc)
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws java.io.IOException, org.xml.sax.SAXException- Specified by:
resolveEntityin interfaceorg.xml.sax.EntityResolver- Throws:
java.io.IOExceptionorg.xml.sax.SAXException
-
-