Rule Execution Server API

ilog.rules.util
Class IlrFile

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

public class IlrFile
extends 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
static String PROTOCOL
           
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Fields inherited from interface ilog.rules.util.IlrURI
FILE_SEPARATOR
 
Constructor Summary
IlrFile(File file)
          Creates a new relative file from a java.io.File.
IlrFile(File parent, String child)
          Creates a new relative file from a parent abstract pathname and a child pathname string.
IlrFile(String pathname)
          Constructs a relative file from a String.
IlrFile(String rootId, File file)
          Creates a new relative file from a root identifier and a java.io.File.
IlrFile(String parent, String child)
          Creates a new relative file from a parent pathname string and a child pathname string.
 
Method Summary
protected  Object clone()
           
 boolean equals(Object obj)
           
 File getAbsoluteFile()
           
 String getAbsolutePath()
           
 String getRootId()
          Returns the root identifier.
 boolean isFiltered()
          Returns true if the URI is filtered; false otherwise.
 void setRootId(String rootId)
          Set the root identifier of this relative file.
 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, toURI, toURL
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ilog.rules.util.IlrURI
exists, getDisplayPath, getDisplayRootId, getName, getPath, getType, isDirectory, lastModified
 

Field Detail

PROTOCOL

public static final String PROTOCOL
See Also:
Constant Field Values
Constructor Detail

IlrFile

public IlrFile(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(String parent,
               String child)
Creates a new relative file from a parent pathname string and a child pathname string.


IlrFile

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


IlrFile

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


IlrFile

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

Method Detail

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

setRootId

public void setRootId(String rootId)
Set the root identifier of this relative file.

Specified by:
setRootId in interface IlrURI

getRootId

public 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 File getAbsoluteFile()
Overrides:
getAbsoluteFile in class File

getAbsolutePath

public String getAbsolutePath()
Overrides:
getAbsolutePath in class File

equals

public boolean equals(Object obj)
Overrides:
equals in class File

toString

public String toString()
Returns the pathname string of this relative file.

Overrides:
toString in class File

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013