Package org.jamwiki.model

Examples of org.jamwiki.model.WikiReference


      StringBuilder html = new StringBuilder();
      if (!references.isEmpty()) {
        html.append("<ol class=\"references\">");
      }
      while (!references.isEmpty()) {
        WikiReference reference = references.get(0);
        references.remove(0);
        html.append("<li id=\"").append(reference.getNotationName()).append("\">");
        html.append("<sup>");
        int pos = 0;
        List<WikiReference> citations = new ArrayList<WikiReference>();
        while (pos < references.size()) {
          WikiReference temp = references.get(pos);
          if (temp.getName() != null && reference.getName() != null && reference.getName().equals(temp.getName())) {
            citations.add(temp);
            if (StringUtils.isBlank(reference.getContent()) && !StringUtils.isBlank(temp.getContent())) {
              reference.setContent(temp.getContent());
            }
            references.remove(pos);
            continue;
          }
          pos++;
        }
        if (!citations.isEmpty()) {
          html.append("<a href=\"#").append(reference.getReferenceName()).append("\" title=\"\">");
          html.append(reference.getCitation()).append('.').append(reference.getCount()).append("</a>&#160;");
          while (!citations.isEmpty()) {
            WikiReference citation = citations.get(0);
            html.append("&#160;<a href=\"#").append(citation.getReferenceName()).append("\" title=\"\">");
            html.append(citation.getCitation()).append('.').append(citation.getCount()).append("</a>&#160;");
            citations.remove(0);
          }
        } else {
          html.append("<a href=\"#").append(reference.getReferenceName()).append("\" title=\"\">");
          html.append(reference.getCitation()).append("</a>&#160;");
View Full Code Here


      }
      if (count == 0 && citation <= temp.getCitation()) {
        citation = temp.getCitation() + 1;
      }
    }
    WikiReference reference = new WikiReference(name, content, citation, count);
    return reference;
  }
View Full Code Here

      logger.finer("reference: " + raw + " (" + lexer.yystate() + ")");
    }
    if (lexer.getMode() < JFlexParser.MODE_PROCESS) {
      return raw;
    }
    WikiReference reference = buildReference(lexer.getParserInput(), raw);
    this.processMetadata(lexer.getParserInput(), reference);
    StringBuilder html = new StringBuilder();
    html.append("<sup id=\"");
    html.append(reference.getReferenceName());
    html.append("\" class=\"reference\"><a href=\"#");
    html.append(reference.getNotationName());
    html.append("\" title=\"\">[" + reference.getCitation() + "]</a></sup>");
    return html.toString();
  }
View Full Code Here

TOP

Related Classes of org.jamwiki.model.WikiReference

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.