ilog.rules.util

Class IlrFile

  • java.lang.Object
    • java.io.File
      • ilog.rules.util.IlrFile
  • All Implemented Interfaces:
    IlrURI, java.io.Serializable, java.lang.Comparable<java.io.File>


    public class IlrFile
    extends java.io.File
    implements IlrURI
    Relative file class.

    The IlrFile class extends java.io.File to add a root identifier. The relative file has a relative path that will be resolved by the application by matching the root identifier with a root directory registered on the application.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String PROTOCOL 
      • Fields inherited from class java.io.File

        pathSeparator, pathSeparatorChar, separator, separatorChar
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrFile(java.io.File file)
      Creates a new relative file from a java.io.File.
      IlrFile(java.io.File parent, java.lang.String child)
      Creates a new relative file from a parent abstract pathname and a child pathname string.
      IlrFile(java.lang.String pathname)
      Constructs a relative file from a String.
      IlrFile(java.lang.String rootId, java.io.File file)
      Creates a new relative file from a root identifier and a java.io.File.
      IlrFile(java.lang.String parent, java.lang.String child)
      Creates a new relative file from a parent pathname string and a child pathname string.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected java.lang.Object clone() 
      boolean equals(java.lang.Object obj) 
      java.io.File getAbsoluteFile() 
      java.lang.String getAbsolutePath() 
      java.lang.String getRootId()
      Returns the root identifier.
      boolean isFiltered()
      Returns true if the URI is filtered; false otherwise.
      void setRootId(java.lang.String rootId)
      Set the root identifier of this relative file.
      java.lang.String toString()
      Returns the pathname string of this relative file.
      • Methods inherited from class java.io.File

        canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, exists, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toURI, toURL
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IlrFile

        public IlrFile(java.lang.String pathname)
        Constructs a relative file from a String. If the String start with "[id]" then the symbol between the square brackets will be the root identifier.
      • IlrFile

        public IlrFile(java.lang.String parent,
               java.lang.String child)
        Creates a new relative file from a parent pathname string and a child pathname string.
      • IlrFile

        public IlrFile(java.io.File parent,
               java.lang.String child)
        Creates a new relative file from a parent abstract pathname and a child pathname string.
      • IlrFile

        public IlrFile(java.io.File file)
        Creates a new relative file from a java.io.File.
      • IlrFile

        public IlrFile(java.lang.String rootId,
               java.io.File file)
        Creates a new relative file from a root identifier and a java.io.File.
    • Method Detail

      • clone

        protected java.lang.Object clone()
                                  throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • setRootId

        public void setRootId(java.lang.String rootId)
        Set the root identifier of this relative file.
        Specified by:
        setRootId in interface IlrURI
      • getRootId

        public java.lang.String getRootId()
        Returns the root identifier.
        Specified by:
        getRootId in interface IlrURI
      • isFiltered

        public boolean isFiltered()
        Description copied from interface: IlrURI
        Returns true if the URI is filtered; false otherwise.
        Specified by:
        isFiltered in interface IlrURI
      • getAbsoluteFile

        public java.io.File getAbsoluteFile()
        Overrides:
        getAbsoluteFile in class java.io.File
      • getAbsolutePath

        public java.lang.String getAbsolutePath()
        Overrides:
        getAbsolutePath in class java.io.File
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.io.File
      • toString

        public java.lang.String toString()
        Returns the pathname string of this relative file.
        Overrides:
        toString in class java.io.File

© Copyright IBM Corp. 1987, 2017