Examples of rewrite()


Examples of net.sf.jpluck.jxl.URIRewriter.rewrite()

      } else {
        FeedItem[] items = feed.getItems();
        for (int i = 0; i < items.length; i++) {
          FeedItem item = items[i];
          URIRewriter rewriter = jxlDocument.getURIRewriter();
          String uri = rewriter.rewrite(item.getURL());
          if (generateBookmarks && settings.isUseLinkStructure()) {
            addBookmark(items[i], formatter, uri);
          }
        }
      }
View Full Code Here

Examples of net.sf.regain.search.IndexSearcherManager.rewrite()

  public void highlightHitDocument(int index) throws RegainException {

    try {
      IndexSearcherManager manager = IndexSearcherManager.getInstance(mIndexConfig.getDirectory());
      // The highlighter needs a rewritten query to work with wildcard and fuzzy queries
      Query rewrittenQuery = manager.rewrite(mQuery);
      QueryScorer queryScorer = new QueryScorer(rewrittenQuery);
      // End added by Anders

      Highlighter highlighter = new Highlighter(
              new SimpleHTMLFormatter("<span class=\"highlight\">", "</span>"), queryScorer);
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.RewriterEngine.rewrite()

    oConfig.getRules().add(new AddHeaderAction("MyHeader", "header"));

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));
    RewriterEngine oEngine = new RewriterEngine(oConfig);
    oEngine.rewrite(oMockFacade);

    oMockFacade.expectStatusCode(200);
    oMockFacade.expectHeaderSet("MyHeader", "header");
    oMockFacade.expectLocation("/test.aspx");
  }
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.RewriterEngine.rewrite()

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));
    RewriterEngine oEngine = new RewriterEngine(oConfig);
    try {
      oEngine.rewrite(oMockFacade);
      fail();
    } catch (RewriteException pRE) {

    }
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.RewriterEngine.rewrite()

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));
    RewriterEngine oEngine = new RewriterEngine(oConfiguration);
    try {
      oEngine.rewrite(oMockFacade);
      fail();
    } catch (RewriteException e) {
    }

    oMockFacade.expectStatusCode(410);
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.RewriterEngine.rewrite()

    MockContextFacade oMockFacade = new MockContextFacade("/", ".",
        "GET", new URL("http://localhost/test.aspx"));
    RewriterEngine oEngine = new RewriterEngine(oConfiguration);
    try {
      oEngine.rewrite(oMockFacade);
      fail();
    } catch (RewriteException e) {
    }

    oMockFacade.expectStatusCode(405);
View Full Code Here

Examples of org.apache.blur.server.IndexSearcherClosable.rewrite()

          _shardServerContext.setIndexSearcherClosable(_table, shard, searcher);
        }
        searcher.setSimilarity(_indexServer.getSimilarity(_table));
        Query rewrite;
        try {
          rewrite = searcher.rewrite((Query) _query.clone());
        } catch (ExitingReaderException e) {
          LOG.info("Query [{0}] has been cancelled during the rewrite phase.", _query);
          throw e;
        }
View Full Code Here

Examples of org.apache.cocoon.maven.deployer.WebXmlRewriter.rewrite()

        }
        WebXmlRewriter webXmlRewriter = new WebXmlRewriter(
                ReloadingServlet.class.getName(),
                ReloadingListener.class.getName(),
                ReloadingServletFilter.class.getName(), false);
        if (webXmlRewriter.rewrite(webXmlDocument)) {
            // save web.xml
            try {
                if (this.getLog().isDebugEnabled()) {
                    this.getLog().debug("Rewriting web.xml: " + webXml);
                }
View Full Code Here

Examples of org.apache.hadoop.gateway.filter.rewrite.api.UrlRewriteProcessor.rewrite()

    UrlRewriteProcessor rewriter = new UrlRewriteProcessor();
    rewriter.initialize( environment, descriptor );

    Template input = Parser.parse( "test-scheme://test-inbound-host:42/test-path/test-file?test-name=test-value" );
    Template output = rewriter.rewrite( resolver, input, UrlRewriter.Direction.IN, null );
    //System.out.println( output );
    assertThat( output, notNullValue() );
    assertThat( output.getHost().getFirstValue().getPattern(), is( "test-inbound-rewritten-host" ) );
  }
View Full Code Here

Examples of org.apache.lenya.cms.linking.LinkRewriter.rewrite()

        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, session, request
                .getRequestURI(), request.isSecure(), false, this.relativeUrls);
        if (!rewriter.matches(url)) {
            throw new ConfigurationException("The URL [" + url + "] can't be rewritten!");
        }
        return rewriter.rewrite(url);
    }

    /**
     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
     *      java.util.Map)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.