watch
Class PathControl

java.lang.Object
  extended by watch.PathControl

public final class PathControl
extends java.lang.Object

Path control toolkit class. Provides static methods helping in paths management. Input/output paths can be relative to the current input file, the installation directory...


Constructor Summary
PathControl()
           
 
Method Summary
static boolean copyResource(java.lang.String J_ResourcePath, java.lang.String J_OutputPath)
          Resource copying.
static java.io.File getInputFile()
          Input file retrieval.
static java.lang.String getInputLocation()
          Input location retrieval.
static boolean isXml(java.lang.String J_InputPath)
          Input XML path control.
static java.io.File outputFile(java.lang.String J_OutputPath)
          Output file retrieval.
static java.io.File resourceFile(java.lang.String J_ResourcePath)
          Resource file retrieval.
static java.io.File xslFile(java.lang.String J_XslPath)
          XSL file retrieval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathControl

public PathControl()
Method Detail

isXml

public static boolean isXml(java.lang.String J_InputPath)
Input XML path control.

Parameters:
J_InputPath - Input file name.
Returns:
true if the input file is an XML file, false otherwise.

outputFile

public static final java.io.File outputFile(java.lang.String J_OutputPath)
Output file retrieval.

Parameters:
J_OutputPath - Relative output path, from the current input file.
Returns:
Output file object.

getInputFile

public static final java.io.File getInputFile()
Input file retrieval.

Returns:
Current input file. null if no current input file.

getInputLocation

public static final java.lang.String getInputLocation()
Input location retrieval.

Returns:
Current input location.

resourceFile

public static final java.io.File resourceFile(java.lang.String J_ResourcePath)
                                       throws java.io.FileNotFoundException
Resource file retrieval.

Parameters:
J_ResourcePath - Relative resource path, from the install directory.
Returns:
Resource file object.
Throws:
java.io.FileNotFoundException

copyResource

public static final boolean copyResource(java.lang.String J_ResourcePath,
                                         java.lang.String J_OutputPath)
Resource copying.

Parameters:
J_ResourcePath - Relative resource path, from the install directory.
J_OutputPath - Relative output path, from the current input file.
Returns:
true if success, false otherwise.

xslFile

public static final java.io.File xslFile(java.lang.String J_XslPath)
                                  throws java.io.FileNotFoundException
XSL file retrieval.

Parameters:
J_XslPath - Path of an XSL file, either from the current input file, or from the install directory.
Returns:
XSL file object.
Throws:
java.io.FileNotFoundException