|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.erowid.sperowider.FileNameManager
Maps URLs to file names.
Constructor Summary | |
FileNameManager(String root)
Creates a new FileNameManager, with the passed in String indicating the root of the download tree. |
Method Summary | |
static URL |
fixURL(URL foundURL)
Cleans up URLs |
String |
getFileNameForURL(URL realURL,
String requiredPrefix,
String requiredSuffix,
String[] replaceableSuffixes)
Returns a calculated filename for the passed in URL. |
String |
getFilenameRelativeToRoot(String filename)
Returns the filename relative to the download root, as returned by getRoot() . |
String |
getPathToArchiveRoot(String filename)
Returns the path from the passed in filename to the download root, as returned by getRoot() . |
String |
getPathToDocRoot(String filename)
Returns a path to the document root for the passed in filename. |
String |
getRelativeFilename(String source,
String destination)
Gets a relative filename from the source file to the destination file. |
String |
getRoot()
Returns the root of the download tree. |
String |
getSearchIndexRoot()
Returns the directory that the search indexes will be created in. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileNameManager(String root)
Method Detail |
public static URL fixURL(URL foundURL) throws MalformedURLException
MalformedURLException
public String getRoot()
public String getSearchIndexRoot()
public String getFilenameRelativeToRoot(String filename)
getRoot()
.
public String getPathToArchiveRoot(String filename)
getRoot()
.
public String getPathToDocRoot(String filename)
getRoot()
. For
example, if the download root is at /var/output, the docroot will
be /var/output/http80/erowid (or something like that, based on what server and
protocol is being used.)
public String getRelativeFilename(String source, String destination)
public String getFileNameForURL(URL realURL, String requiredPrefix, String requiredSuffix, String[] replaceableSuffixes)
ISperowiderModel
maintains a URL->filename mapping.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |