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

Quick Search    Search Deep

org.jabbee.util
Class PathParser  view PathParser download PathParser.java

java.lang.Object
  extended byorg.jabbee.util.PathParser

public final class PathParser
extends java.lang.Object

Given the full path to a configuration file and some other file, this can return the path to the other file relative to the original configuration file.

Version:
0.01

Field Summary
private  java.lang.String configPath
           
 
Constructor Summary
PathParser()
          Creates a new instance of PathParser
PathParser(java.lang.String configFile)
          Creates a new instance of PathParser
 
Method Summary
private  java.lang.String getBasePath(java.lang.String fullpath)
           
 java.lang.String getConfigPath()
          Get the full path to the configuration file
 java.lang.String getRelativePath(java.lang.String path)
          Compares the given path with what's stored in the configuration path variable.
 void setConfigFile(java.lang.String file)
          Sets the full path to the configuration file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configPath

private java.lang.String configPath
Constructor Detail

PathParser

public PathParser()
Creates a new instance of PathParser


PathParser

public PathParser(java.lang.String configFile)
Creates a new instance of PathParser

Method Detail

setConfigFile

public final void setConfigFile(java.lang.String file)
Sets the full path to the configuration file


getBasePath

private final java.lang.String getBasePath(java.lang.String fullpath)

getConfigPath

public final java.lang.String getConfigPath()
Get the full path to the configuration file


getRelativePath

public final java.lang.String getRelativePath(java.lang.String path)
Compares the given path with what's stored in the configuration path variable. Then creates a path name for the given file that has a path relative to the configuration file.