Class FactoryImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.xml.parsers.SAXParserFactory factory  
      private org.xml.sax.EntityResolver resolver
      To be used to resolve files included/imported by the schema.
      private boolean usePanicMode  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FactoryImpl()  
      protected FactoryImpl​(javax.xml.parsers.SAXParserFactory factory)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      org.iso_relax.verifier.Schema compileSchema​(org.xml.sax.InputSource source)  
      (package private) static IVerifier createVerifier​(Grammar g)
      gets the VGM by sniffing its type.
      org.xml.sax.EntityResolver getEntityResolver()  
      boolean isFeature​(java.lang.String feature)  
      protected abstract Grammar parse​(org.xml.sax.InputSource source, GrammarReaderController controller)
      parses a Grammar from the specified source.
      void setEntityResolver​(org.xml.sax.EntityResolver _resolver)  
      void setFeature​(java.lang.String feature, boolean v)  
      • Methods inherited from class org.iso_relax.verifier.VerifierFactory

        compileSchema, compileSchema, compileSchema, compileSchema, getProperty, newInstance, newInstance, newInstance, newVerifier, newVerifier, newVerifier, newVerifier, newVerifier, setProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • factory

        protected final javax.xml.parsers.SAXParserFactory factory
      • usePanicMode

        private boolean usePanicMode
      • resolver

        private org.xml.sax.EntityResolver resolver
        To be used to resolve files included/imported by the schema. Can be null.
    • Constructor Detail

      • FactoryImpl

        protected FactoryImpl​(javax.xml.parsers.SAXParserFactory factory)
      • FactoryImpl

        protected FactoryImpl()
    • Method Detail

      • setFeature

        public void setFeature​(java.lang.String feature,
                               boolean v)
                        throws org.xml.sax.SAXNotRecognizedException,
                               org.xml.sax.SAXNotSupportedException
        Overrides:
        setFeature in class org.iso_relax.verifier.VerifierFactory
        Throws:
        org.xml.sax.SAXNotRecognizedException
        org.xml.sax.SAXNotSupportedException
      • isFeature

        public boolean isFeature​(java.lang.String feature)
                          throws org.xml.sax.SAXNotRecognizedException,
                                 org.xml.sax.SAXNotSupportedException
        Overrides:
        isFeature in class org.iso_relax.verifier.VerifierFactory
        Throws:
        org.xml.sax.SAXNotRecognizedException
        org.xml.sax.SAXNotSupportedException
      • setEntityResolver

        public void setEntityResolver​(org.xml.sax.EntityResolver _resolver)
        Overrides:
        setEntityResolver in class org.iso_relax.verifier.VerifierFactory
      • getEntityResolver

        public org.xml.sax.EntityResolver getEntityResolver()
        Overrides:
        getEntityResolver in class org.iso_relax.verifier.VerifierFactory
      • parse

        protected abstract Grammar parse​(org.xml.sax.InputSource source,
                                         GrammarReaderController controller)
                                  throws org.xml.sax.SAXException,
                                         org.iso_relax.verifier.VerifierConfigurationException
        parses a Grammar from the specified source. return null if an error happens.
        Throws:
        org.xml.sax.SAXException
        org.iso_relax.verifier.VerifierConfigurationException
      • compileSchema

        public org.iso_relax.verifier.Schema compileSchema​(org.xml.sax.InputSource source)
                                                    throws org.iso_relax.verifier.VerifierConfigurationException,
                                                           org.xml.sax.SAXException
        Specified by:
        compileSchema in class org.iso_relax.verifier.VerifierFactory
        Throws:
        org.iso_relax.verifier.VerifierConfigurationException
        org.xml.sax.SAXException
      • createVerifier

        static IVerifier createVerifier​(Grammar g)
        gets the VGM by sniffing its type.

        To validate XML Schema correctly, we need to use the specialized VGM.