예제 #1
0
    @Override
    public String fileUrl(PageTitle pageTitle, int width, int height) {
      String title = StringTools.safeFilename(pageTitle.getNormalizedFullTitle());

      FileUrlKey key = new FileUrlKey(title, width, height);

      return fileUrls.get(key);
    }
예제 #2
0
    @Override
    public FullPage retrieveWikitext(ExpansionFrame expansionFrame, PageTitle pageTitle) {
      String title = StringTools.safeFilename(pageTitle.getNormalizedFullTitle());

      ArticleDesc article = articles.get(title);
      if (article == null) return null;

      PageId pageId = new PageId(pageTitle, article.getRevision());
      return new FullPage(pageId, article.getContent());
    }