org.inria.ns.reflex.modules.io
Class FileFunction

java.lang.Object
  extended by org.inria.ns.reflex.xml.xpath.XPathFunction.NamedXPathFunction
      extended by org.inria.ns.reflex.modules.io.FileFunction
All Implemented Interfaces:
XPathFunction

public class FileFunction
extends XPathFunction.NamedXPathFunction
implements XPathFunction

The io:file() function return a file object. The object returned is an XPath compliant object.

Author:
Philippe Poulard

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.inria.ns.reflex.xml.xpath.XPathFunction
XPathFunction.NamedXPathFunction
 
Constructor Summary
FileFunction()
           
 
Method Summary
static XFile evaluate(XFile base, Object arg1, Object arg2)
          Return an XFile object.
 Object evaluate(XPathContext context, List args)
          Perform the function.
 
Methods inherited from class org.inria.ns.reflex.xml.xpath.XPathFunction.NamedXPathFunction
getQName, setQName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.inria.ns.reflex.xml.xpath.XPathFunction
getQName
 

Constructor Detail

FileFunction

public FileFunction()
Method Detail

evaluate

public Object evaluate(XPathContext context,
                       List args)
                throws XPathFunctionException
Perform the function.

Specified by:
evaluate in interface XPathFunction
Parameters:
context - The context of the function.
args - The list of arguments of this function.
Returns:
The result of the evaluation.
Throws:
XPathFunctionException - When this function fails to be evaluated.

evaluate

public static XFile evaluate(XFile base,
                             Object arg1,
                             Object arg2)
                      throws XPathFunctionException
Return an XFile object.

Parameters:
base - The base to resolve the 1st argument.
arg1 - The 1st argument of the function.
arg2 - The 2nd argument of the function.
Throws:
XPathFunctionException