Package com.ecyrd.jspwiki.parser

Examples of com.ecyrd.jspwiki.parser.WikiDocument


        WikiContext ctx = new WikiContext(m_testEngine,dummyPage);
       
        StringReader in = new StringReader(s);
       
        JSPWikiMarkupParser p = new JSPWikiMarkupParser( ctx, in );
        WikiDocument d = p.parse();
       
        CreoleRenderer cr = new CreoleRenderer( ctx, d );
       
        return cr.getString();
    }
View Full Code Here


        WikiContext context = new WikiContext( testEngine,
                                               new WikiPage(testEngine, "TestPage") );
       
        MarkupParser p = new JSPWikiMarkupParser( context, new StringReader(src) );
       
        WikiDocument dom = p.parse();
       
        WikiRenderer r = new XHTMLRenderer( context, dom );
       
        return r.getString();
    }
View Full Code Here

        WikiContext ctx = new WikiContext(m_testEngine,dummyPage);

        StringReader in = new StringReader(s);

        JSPWikiMarkupParser p = new JSPWikiMarkupParser( ctx, in );
        WikiDocument d = p.parse();

        WysiwygEditingRenderer wer = new WysiwygEditingRenderer( ctx, d );

        return wer.getString();
    }
View Full Code Here

           
            WikiContext context = new WikiContext( m_engine, page );
           
            MarkupParser p = m_manager.getParser( context, pagedata );
           
            WikiDocument d = p.parse();
           
            String html = m_manager.getHTML( context, d );
            assertNotNull( "noncached got null response",html);
        }
       
View Full Code Here

        if( m_documentCache != null )
        {
            try
            {
                WikiDocument doc = (WikiDocument) m_documentCache.getFromCache( pageid,
                                                                                m_cacheExpiryPeriod );

                wasUpdated = true;

                //
                //  This check is needed in case the different filters have actually
                //  changed the page data.
                //  FIXME: Figure out a faster method
                if( pagedata.equals(doc.getPageData()) )
                {
                    if( log.isDebugEnabled() ) log.debug("Using cached HTML for page "+pageid );
                    return doc;
                }
            }
            catch( NeedsRefreshException e )
            {
                if( log.isDebugEnabled() ) log.debug("Re-rendering and storing "+pageid );
            }
        }

        //
        //  Refresh the data content
        //
        try
        {
            MarkupParser parser = getParser( context, pagedata );
            WikiDocument doc = parser.parse();
            doc.setPageData( pagedata );
            if( m_documentCache != null )
            {
                m_documentCache.putInCache( pageid, doc );
                wasUpdated = true;
            }
View Full Code Here

     */
    public String getHTML( WikiContext context, String pagedata )
    {
        try
        {
            WikiDocument doc = getRenderedDocument( context, pagedata );

            return getHTML( context, doc );
        }
        catch( IOException e )
        {
View Full Code Here

            MarkupParser parser = mgr.getParser(context, wikitext);

            parser.addLinkTransmutator( new CutMutator(m_maxwidth) );
            parser.enableImageInlining( false );

            WikiDocument doc = parser.parse();

            result = mgr.getHTML( context, doc );
        }
        catch( IOException e )
        {
View Full Code Here

                RenderingManager mgr = engine.getRenderingManager();
               
                MarkupParser p = mgr.getParser( m_wikiContext, "["+author+"|"+author+"]" );

                WikiDocument d = p.parse();
               
                author = mgr.getHTML( m_wikiContext, d );
            }

            pageContext.getOut().print( author );
View Full Code Here

            mp.addExternalLinkHook( extLinkHook );
            mp.addAttachmentLinkHook( attLinkHook );

            if( !parseAccessRules ) mp.disableAccessRules();

            WikiDocument doc = mp.parse();

            //
            //  In some cases it's better just to parse, not to render
            //
            if( !justParse )
View Full Code Here

       
        String wikiMarkup = getForm(context);
       
        RenderingManager mgr = context.getEngine().getRenderingManager();
       
        WikiDocument doc;
        try
        {
            doc = mgr.getParser( context, wikiMarkup ).parse();
            result = mgr.getHTML(context, doc);
        }
View Full Code Here

TOP

Related Classes of com.ecyrd.jspwiki.parser.WikiDocument

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.