Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tripi.asp.test
Class SimpleFileFactory  view SimpleFileFactory download SimpleFileFactory.java

java.lang.Object
  extended bycom.tripi.asp.test.SimpleFileFactory
All Implemented Interfaces:
com.tripi.asp.parse.FileFactory

public class SimpleFileFactory
extends java.lang.Object
implements com.tripi.asp.parse.FileFactory

This class is a factory to handle finding files on the local file system. It is used by the other test routines.


Field Summary
private static org.apache.log4j.Category DBG
          Debugging class
 
Constructor Summary
SimpleFileFactory()
           
 
Method Summary
private static java.lang.String concatPath(java.lang.String absPath, java.lang.String addPath)
          Internal utility function to concatenate two paths.
 java.io.InputStream getResource(java.lang.String filename)
          Get the file resource.
 java.lang.String resolveFile(java.lang.String baseFilename, java.lang.String relFile, boolean virtual)
          Resolve a relative file's location based on the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBG

private static final org.apache.log4j.Category DBG
Debugging class

Constructor Detail

SimpleFileFactory

public SimpleFileFactory()
Method Detail

resolveFile

public java.lang.String resolveFile(java.lang.String baseFilename,
                                    java.lang.String relFile,
                                    boolean virtual)
                             throws com.tripi.asp.AspException
Resolve a relative file's location based on the given file.

Specified by:
resolveFile in interface com.tripi.asp.parse.FileFactory

concatPath

private static java.lang.String concatPath(java.lang.String absPath,
                                           java.lang.String addPath)
                                    throws com.tripi.asp.AspException
Internal utility function to concatenate two paths.


getResource

public java.io.InputStream getResource(java.lang.String filename)
                                throws com.tripi.asp.AspException
Get the file resource.

Specified by:
getResource in interface com.tripi.asp.parse.FileFactory