ilog.rules.xml.util

Class IlrXsdClassLoaderLocationResolver

  • All Implemented Interfaces:
    IlrXsdLocationResolver


    public class IlrXsdClassLoaderLocationResolver
    extends IlrXsdDefaultLocationResolver
    This class implements the location resolver interface which tries to build an input source representation of a file, knowing its location. The policy follows the steps below and stop as soon as the file is found:
    1. Try the location as an absolute path.
    2. Try to concatenate the parent location and the location considered as relative.
    3. Scan the list of directories by concatenating their names to the location.
    4. Try to find the file with the class loader and its java.lang.ClassLoader.getResource method.
    If a location has no protocol such as HTTP, FTP, file or JAR, then the file protocol is used by default.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      org.xml.sax.InputSource resolveLocation(java.lang.String parentLocation, java.lang.String location)
      Creates an input source representation of a schema knowing its location It returns null if the location does not exist.
      • Methods inherited from class java.lang.Object

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

      • IlrXsdClassLoaderLocationResolver

        public IlrXsdClassLoaderLocationResolver(java.lang.ClassLoader classLoader)
    • Method Detail

      • resolveLocation

        public org.xml.sax.InputSource resolveLocation(java.lang.String parentLocation,
                                              java.lang.String location)
        Description copied from interface: IlrXsdLocationResolver
        Creates an input source representation of a schema knowing its location It returns null if the location does not exist.
        Specified by:
        resolveLocation in interface IlrXsdLocationResolver
        Overrides:
        resolveLocation in class IlrXsdDefaultLocationResolver
        Parameters:
        parentLocation - The location of the parent file.
        location - The location to be found.
        Returns:
        The input source corresponding to the location. It may be null.

© Copyright IBM Corp. 1987, 2017