Class FileFinderEntityResolver

  • All Implemented Interfaces:
    org.xml.sax.EntityResolver
    Direct Known Subclasses:
    FileLoaderEntityResolver

    public class FileFinderEntityResolver
    extends java.lang.Object
    implements org.xml.sax.EntityResolver
    This EntityResolver tries to create the InputStream using the FileFinder, which basically looks for files in the class-path.
    Since:
    MicroStrategy Web 9.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getFileName​(java.lang.String publicId, java.lang.String systemId)
      Resolves the file name from the systemId.
      protected java.io.InputStream getInputStream​(java.lang.String fileName)
      Returns the InputStream for the given fileName.
      org.xml.sax.InputSource resolveEntity​(java.lang.String publicId, java.lang.String systemId)  
      • Methods inherited from class java.lang.Object

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

      • FileFinderEntityResolver

        public FileFinderEntityResolver()
    • Method Detail

      • resolveEntity

        public org.xml.sax.InputSource resolveEntity​(java.lang.String publicId,
                                                     java.lang.String systemId)
                                              throws org.xml.sax.SAXException,
                                                     java.io.IOException
        Specified by:
        resolveEntity in interface org.xml.sax.EntityResolver
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • getFileName

        protected java.lang.String getFileName​(java.lang.String publicId,
                                               java.lang.String systemId)
        Resolves the file name from the systemId. This implementation just returns the file starting from the last slash (/). For example, if systemId is:
        "/path/name.dtd"
        it returns:
        name.dtd
      • getInputStream

        protected java.io.InputStream getInputStream​(java.lang.String fileName)
                                              throws java.io.FileNotFoundException,
                                                     java.io.IOException
        Returns the InputStream for the given fileName.
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
        See Also:
        FileFinder.getResourceAsStream(java.lang.String)