Package net.sf.jpluck.jxl

Examples of net.sf.jpluck.jxl.URIRewriter$Rule


        if (mimeType.equals("text/html")) {
      Resource resource = new Resource("http://127.0.0.1/", null, new ContentType(mimeType), data, 0, false);
      org.w3c.dom.Document dom = resource.parseHTML();
      TextRecord textRecord = new TextRecord("http://127.0.0.1/");
      Transformer transformer = TransformerFactory.newInstance().newTransformer();
      TextRecordResult result = new TextRecordResult(textRecord, new URIRewriter(), 100, false, document);
      transformer.transform(new DOMSource(dom), result);
      document.addRecord(textRecord);
        } else if (mimeType.startsWith("image/")) {
      BufferedImage image = ImageIO.read(new ByteArrayInputStream(data));
      CompositeBitmap compositeBitmap = CompositeBitmap.create(image, bpp);
View Full Code Here


        }
      } 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

            String segment = currTextSegment.toString();
            List<Rule> parentMatches = getMatches().peek();
            int len = parentMatches.size();
            for ( int i = 0; i < len; ++i )
            {
                Rule r = parentMatches.get( i );
                if ( r instanceof TextSegmentHandler )
                {
                    TextSegmentHandler h = (TextSegmentHandler) r;
                    try
                    {
View Full Code Here

    {

        @Override
        protected void configure()
        {
            forPattern( "bar" ).addRule( new Rule()
            {

                @Override
                public void body( String namespace, String name, String text )
                    throws Exception
View Full Code Here

            Log log = getDigester().getLogger();
            boolean debug = log.isDebugEnabled();
            for ( int i = 0; i < rules.size(); i++ )
            {
                int j = ( rules.size() - i ) - 1;
                Rule rule = rules.get( j );
                if ( debug )
                {
                    log.debug( "  Fire end() for " + rule );
                }
                try
                {
                    rule.end( namespaceURI, name );
                }
                catch ( Exception e )
                {
                    throw getDigester().createSAXException( e );
                }
View Full Code Here

   */
  public String graph() throws Exception {
    StringBuffer text = new StringBuffer();
   
    text.append("digraph M5Tree {\n");
    Rule temp = (Rule)m_ruleSet.elementAt(0);
    temp.topOfTree().graph(text);
    text.append("}\n");
    return text.toString();
  }
View Full Code Here

TOP

Related Classes of net.sf.jpluck.jxl.URIRewriter$Rule

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.