Package info.bliki.wiki.impl

Examples of info.bliki.wiki.impl.APIWikiModel


    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      creator.setHeader(HTMLConstants.HTML_HEADER1 + HTMLConstants.CSS_SCREEN_STYLE + HTMLConstants.HTML_HEADER2);
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(generatedHTMLFilename);

    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here


    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, locale, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      StringBuilder buf = new StringBuilder();
      buf.append(HTMLConstants.HTML_HEADER1);
      buf.append(HTMLConstants.CSS_MAIN_STYLE);
      buf.append(HTMLConstants.CSS_SCREEN_STYLE);
      buf.append(HTMLConstants.HTML_HEADER2);
      creator.setHeader(buf.toString());
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(rawWikiText, title, new HTMLConverter(), generatedHTMLFilename);
      System.out.println("Created file: " + generatedHTMLFilename);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, locale, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      StringBuilder buf = new StringBuilder();
      buf.append(HTMLConstants.HTML_HEADER1);
      buf.append(HTMLConstants.CSS_MAIN_STYLE);
      buf.append(HTMLConstants.CSS_SCREEN_STYLE);
      buf.append(HTMLConstants.HTML_HEADER2);
      creator.setHeader(buf.toString());
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      // set up a simple cache for this example. HashMap is not usable for
      // production!
      Configuration.DEFAULT_CONFIGURATION.setTemplateCallsCache(new HashMap());
      creator.renderToFile(generatedHTMLFilename);
      System.out.println("Created file: " + generatedHTMLFilename);
      return wikiModel.getRedirectLink();
    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
      e1.printStackTrace();
    } finally {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, locale, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      creator.setHeader(HTMLConstants.HTML_HEADER1 + HTMLConstants.CSS_MAIN_STYLE + HTMLConstants.CSS_SCREEN_STYLE
          + HTMLConstants.HTML_HEADER2);
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(rawWikiText, title, new HTMLConverter(), generatedHTMLFilename);
      System.out.println("Created file: " + generatedHTMLFilename);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, locale, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      creator.setHeader(HTMLConstants.HTML_HEADER1 + HTMLConstants.CSS_MAIN_STYLE + HTMLConstants.CSS_SCREEN_STYLE
          + HTMLConstants.HTML_HEADER2);
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(generatedHTMLFilename);
      System.out.println("Created file: " + generatedHTMLFilename);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, "${image}", "${title}", null);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      creator.setHeader("");
      creator.setFooter("");
      wikiModel.setUp();
      creator.renderToFile(new PlainTextConverter(true), generatedTXTFilename);
      // StringBuilder buffer = new StringBuilder();
      // creator.render(new PlainTextConverter(true), buffer);
      // System.out.println(buffer.toString());
    } catch (IOException e) {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, locale, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      StringBuilder buf = new StringBuilder();
      buf.append(HTMLConstants.HTML_HEADER1);
      buf.append(HTMLConstants.CSS_MAIN_STYLE);
      buf.append(HTMLConstants.CSS_SCREEN_STYLE);
      buf.append(HTMLConstants.HTML_HEADER2);
      creator.setHeader(buf.toString());
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(rawWikiText, title, new HTMLConverter(), generatedHTMLFilename);
      System.out.println("Created file: " + generatedHTMLFilename);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, locale, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      StringBuilder buf = new StringBuilder();
      buf.append(HTMLConstants.HTML_HEADER1);
      buf.append(HTMLConstants.CSS_MAIN_STYLE);
      buf.append(HTMLConstants.CSS_SCREEN_STYLE);
      buf.append(HTMLConstants.HTML_HEADER2);
      creator.setHeader(buf.toString());
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      // set up a simple cache for this example. HashMap is not usable for
      // production! Use something like http://ehcache.org for production!
      Configuration.DEFAULT_CONFIGURATION.setTemplateCallsCache(new HashMap());
      creator.renderToFile(generatedHTMLFilename);
      System.out.println("Created file: " + generatedHTMLFilename);
      return wikiModel.getRedirectLink();
    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
      e1.printStackTrace();
    } finally {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      creator.setHeader(HTMLConstants.HTML_HEADER1 + HTMLConstants.CSS_MAIN_STYLE + HTMLConstants.CSS_SCREEN_STYLE
          + HTMLConstants.HTML_HEADER2);
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(generatedHTMLFilename);

    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here

    WikiDB db = null;

    try {
      db = new WikiDB(mainDirectory, databaseSubdirectory);
      APIWikiModel wikiModel = new APIWikiModel(user, db, "${image}", "${title}", imageDirectory);
      DocumentCreator creator = new DocumentCreator(wikiModel, user, listOfTitleStrings);
      // create header and CSS information
      creator.setHeader(HTMLConstants.HTML_HEADER1 + HTMLConstants.CSS_MAIN_STYLE + HTMLConstants.CSS_SCREEN_STYLE
          + HTMLConstants.HTML_HEADER2);
      creator.setFooter(HTMLConstants.HTML_FOOTER);
      wikiModel.setUp();
      creator.renderToFile(generatedHTMLFilename);

    } catch (IOException e) {
      e.printStackTrace();
    } catch (Exception e1) {
View Full Code Here

TOP

Related Classes of info.bliki.wiki.impl.APIWikiModel

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.