ilog.rules.xml.util

Class IlrXsdDefaultLocationResolver

  • java.lang.Object
    • ilog.rules.xml.util.IlrXsdDefaultLocationResolver
  • All Implemented Interfaces:
    IlrXsdLocationResolver
    Direct Known Subclasses:
    IlrXsdClassLoaderLocationResolver


    public class IlrXsdDefaultLocationResolver
    extends java.lang.Object
    implements IlrXsdLocationResolver
    This class implements the location resolver interface which tries to build an input source representation of a file, knowing its location. The resolver 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. If a location has not 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
      protected java.net.URL createUrl(java.lang.String location) 
      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.
      protected org.xml.sax.InputSource resolveLocation(java.net.URL url) 
      protected org.xml.sax.InputSource scanDirectories(java.net.URL url) 
      • Methods inherited from class java.lang.Object

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

      • IlrXsdDefaultLocationResolver

        public IlrXsdDefaultLocationResolver()
      • IlrXsdDefaultLocationResolver

        public IlrXsdDefaultLocationResolver(java.lang.String[] directories)
    • 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
        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.
      • scanDirectories

        protected org.xml.sax.InputSource scanDirectories(java.net.URL url)
      • createUrl

        protected java.net.URL createUrl(java.lang.String location)
                                  throws java.net.MalformedURLException
        Throws:
        java.net.MalformedURLException
      • resolveLocation

        protected org.xml.sax.InputSource resolveLocation(java.net.URL url)

© Copyright IBM Corp. 1987, 2017