/**
* @see org.jamwiki.DataHandler#lookupWikiFile(java.lang.String, java.lang.String)
*/
public WikiFile lookupWikiFile(String virtualWiki, String topicName) throws Exception {
WikiFile wikifile = new WikiFile();
if (topicName.startsWith("Image:")) {
topicName = topicName.substring(NamespaceHandler.NAMESPACE_IMAGE.length() + 1);
} else if (topicName.startsWith("Media:")) {
topicName = topicName.substring(6, topicName.length());
}
topicName = topicName.replace(" ", "_"); //topic name comes in with "_" replaced as normal but it the image case it does not make sense
wikifile.setFileName(topicName);
wikifile.setUrl(topicName);
//grabbing images for resizing
wikifile.setAbsUrl(WikiManager.getInstance().getMediaFolder(ores).getBasefile().getAbsolutePath());
return wikifile;
}