Class 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 boolean displayWarning
      if true, warnings are reported.
      org.xml.sax.EntityResolver externalEntityResolver
      entity resolution is delegated to this object.
      protected java.io.PrintStream out
      messages are sent to this object.
      private boolean warningReported
      set 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
      void error​(org.xml.sax.Locator[] loc, java.lang.String errorMessage, java.lang.Exception nestedException)  
      private void printLocation​(org.xml.sax.Locator loc)  
      org.xml.sax.InputSource resolveEntity​(java.lang.String publicId, java.lang.String systemId)  
      void warning​(org.xml.sax.Locator[] loc, java.lang.String errorMessage)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        warning in interface GrammarReaderController
      • error

        public void error​(org.xml.sax.Locator[] loc,
                          java.lang.String errorMessage,
                          java.lang.Exception nestedException)
        Specified by:
        error in interface GrammarReaderController
      • 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:
        resolveEntity in interface org.xml.sax.EntityResolver
        Throws:
        java.io.IOException
        org.xml.sax.SAXException