Package org.jamwiki.model

Examples of org.jamwiki.model.WikiFile


  /**
   * @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_NAMESPACE)) {
      topicName = topicName.substring(IMAGE_NAMESPACE.length());
    } else if (topicName.startsWith(MEDIA_NAMESPACE)) {
      topicName = topicName.substring(MEDIA_NAMESPACE.length(), 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(this.imageUri + topicName);
    wikifile.setAbsUrl(WikiManager.getInstance().getMediaFolder(ores).getBasefile().getAbsolutePath());
    return wikifile;
  }
View Full Code Here


  /**
   * @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;
  }
View Full Code Here

TOP

Related Classes of org.jamwiki.model.WikiFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.