Package org.archive.wayback.replay.html

Examples of org.archive.wayback.replay.html.ReplayParseContext


    assertNull(null);
    Lexer lexer = new Lexer(html);
    URL url = new URL(base);
//    String datespec = "2001";
    ConvertAccumulator ca = new ConvertAccumulator();
    ReplayParseContext rpc =
      new ReplayParseContext(new TestContextURICFactory(ca),url,datespec);

    ContextAwareLexer caLex = new ContextAwareLexer(lexer, rpc);
    ArrayList<Node> nodes = new ArrayList<Node>();
    FastArchivalUrlReplayParseEventHandler handler =
      new FastArchivalUrlReplayParseEventHandler();
View Full Code Here


    return true;
  }

  public void handleOpenTagNode(ParseContext pContext, TagNode node)
      throws IOException {
    ReplayParseContext context = (ReplayParseContext) pContext;
    if(context.getData(FERRET_DONE_KEY) == null) {
      // we haven't emitted yet:
      // are we running in post-emit?
      if(context.getPhase() == ReplayParseEventDelegator.PHASE_POST_OUTPUT) {
        // emit if it is a body tag:
        if(node.getTagName().equals("BODY")) {
          emit((ReplayParseContext) context,node);
        }
      } else {
        // must be PHASE_PRE_MODIFY: if it's a body tag, emit now:
        if(isNotTagAppearingInHead(node)) {
          if(node.getTagName().equals(FRAMESET_TAG)) {
            // don't put content in pages with a FRAMESET:
            context.putData(FERRET_DONE_KEY,"1");
          } else {
            // and this is a tag that shouldn't be in the HEAD. Emit:
            emit((ReplayParseContext) context,node);
          }
        }
View Full Code Here

TOP

Related Classes of org.archive.wayback.replay.html.ReplayParseContext

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.