Package org.dbwiki.web.html

Examples of org.dbwiki.web.html.HtmlPage


        content.openTABLE(layout.getCSS(CSS.CSSContentFrame));
               
        // Display the children
        SchemaNodeListIndex children = new SchemaNodeListIndex(group, _layouter);
        for (int i = 0; i < children.size(); i++) {
          HtmlPage lines = getLinesForNodeList(children.get(i), versionParameter);
          if (lines.size() > 0) {
            content.openTR();
            content.openTD(layout.getCSS(CSS.CSSContentListing));
            content.add(lines);
            content.closeTD();
            content.closeTR();
View Full Code Here


    }
   
    if (hasContent) {
      return content.lines();
    } else {
      return new HtmlPage();
    }
  }
View Full Code Here

   
    body.openTABLE(layout.getCSS(CSS.CSSObjectFrame));
    SchemaNodeListIndex children = new SchemaNodeListIndex(node, _layouter);
    for (int i = 0; i < children.size(); i++) {
      // filtering of versions handled in getLinesForNodeList
      HtmlPage lines = getLinesForNodeList(children.get(i), versionParameter);
      if (lines.size() > 0) {
        body.openTR();
        body.openTD(layout.getCSS(CSS.CSSObjectListing));
        body.add(lines);
        body.closeTD();
        body.closeTR();
View Full Code Here

    } catch (WikiException e) {
      e.printStackTrace();
      // don't throw exception because we can't
    }
     
    HtmlPage lines = body.lines();
    for(int i = 0; i < lines.size(); i++)
      printer.print(lines.get(i));
    }
View Full Code Here

   * @throws org.dbwiki.exception.WikiException
   */
  protected void respondToDataRequest(WikiDataRequest request,
      Exchange<?> exchange) throws java.io.IOException,
      org.dbwiki.exception.WikiException {
    HtmlPage page = null;

    // The following test is just an additional security check in case
    // someone
    // managed to get past the WikiAuthenticator.
    if ((request.user() == null)
View Full Code Here

  /*
   * Public Methods
   */
 
  public static HtmlPage decorate(BufferedReader in, HtmlContentGenerator contentPrinters) throws org.dbwiki.exception.WikiException {
    HtmlPage page = new HtmlPage();
   
    boolean skipping = false;
    String line;
   
    try {
      while ((line = in.readLine()) != null) {
        if ((!skipping) && (line.trim().startsWith(ContentIndicator))) {
          String indention = line.substring(0, line.indexOf(ContentIndicator));
          String key = line.trim().substring(ContentIndicator.length());
          Vector<String> args = null;
          int pos = key.indexOf("(");
          if (pos != -1) {
            args = getArguments(key, pos);
            key = key.substring(0, pos).trim();
          }
          contentPrinters.print(key, args, page, indention);
        } else if ((!skipping) && (line.trim().startsWith(ConditionIndicator)) && (line.trim().endsWith(ConditionStart))) {
          String condition = line.trim().substring(ConditionIndicator.length()).trim();
          if (condition.startsWith(ContentIndicator)) {
            String key = condition.substring(ContentIndicator.length(), condition.length() - ConditionStart.length()).trim();
            skipping = !contentPrinters.contains(key);
          }
        } else if (line.trim().equals(ConditionEnd)) {
          skipping = false;
        } else if (!skipping) {
          page.add(line);
        }     
      }
      in.close();
    } catch (java.io.IOException ioException) {
      throw new WikiFatalException(ioException);
View Full Code Here

TOP

Related Classes of org.dbwiki.web.html.HtmlPage

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.