portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/jetspeed/src/java/org/apache/jetspeed/rewriter Rewriter.java WebContentRewriter.java
Date Thu, 02 Dec 2004 22:56:28 GMT
taylor      2004/12/02 14:56:28

  Modified:    components/jetspeed/src/test/org/apache/jetspeed/rewriter
                        TestRewriterController.java
               components/jetspeed/src/java/org/apache/jetspeed/rewriter
                        Rewriter.java WebContentRewriter.java
  Log:
  adding more tests for rewriter
  
  Revision  Changes    Path
  1.4       +145 -91   jakarta-jetspeed-2/components/jetspeed/src/test/org/apache/jetspeed/rewriter/TestRewriterController.java
  
  Index: TestRewriterController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/jetspeed/src/test/org/apache/jetspeed/rewriter/TestRewriterController.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestRewriterController.java	13 Oct 2004 15:53:22 -0000	1.3
  +++ TestRewriterController.java	2 Dec 2004 22:56:28 -0000	1.4
  @@ -18,6 +18,10 @@
   import java.io.FileReader;
   import java.io.FileWriter;
   import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.InputStreamReader;
  +import java.io.Reader;
  +import java.net.URL;
   import java.util.Arrays;
   import java.util.Iterator;
   
  @@ -25,6 +29,8 @@
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
   
  +import org.apache.commons.httpclient.HttpClient;
  +import org.apache.commons.httpclient.methods.GetMethod;
   import org.apache.jetspeed.rewriter.html.SwingParserAdaptor;
   import org.apache.jetspeed.rewriter.rules.Attribute;
   import org.apache.jetspeed.rewriter.rules.Rule;
  @@ -34,20 +40,23 @@
   
   /**
    * TestRewriterRules
  - *
  - * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  - * @version $Id$
  + * 
  + * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
  + * @version $Id: TestRewriterController.java,v 1.3 2004/10/13 15:53:22 weaver
  + *          Exp $
    */
   public class TestRewriterController extends TestCase
   {
  +
       /**
  -      * Defines the testcase name for JUnit.
  -      *
  -      * @param name the testcase's name.
  -      */
  -    public TestRewriterController( String name ) 
  +     * Defines the testcase name for JUnit.
  +     * 
  +     * @param name
  +     *            the testcase's name.
  +     */
  +    public TestRewriterController(String name)
       {
  -        super( name );
  +        super(name);
       }
   
       public String getBaseProject()
  @@ -57,90 +66,90 @@
   
       /**
        * Start the tests.
  -     *
  -     * @param args the arguments. Not used
  +     * 
  +     * @param args
  +     *            the arguments. Not used
        */
  -    public static void main(String args[]) 
  +    public static void main(String args[])
       {
  -        junit.awtui.TestRunner.main( new String[] { TestRewriterController.class.getName()
} );
  +        junit.awtui.TestRunner.main(new String[]
  +        { TestRewriterController.class.getName()});
       }
   
       public static Test suite()
       {
           // All methods starting with "test" will be executed in the test suite.
  -        return new TestSuite( TestRewriterController.class );
  +        return new TestSuite(TestRewriterController.class);
       }
   
  -    public void testFactories()
  -              throws Exception
  -    {         
  +    public void testFactories() throws Exception
  +    {
           RewriterController component = getController();
  -        assertNotNull("template component is null", component);            
  -        
  +        assertNotNull("template component is null", component);
  +
           Rewriter basic = component.createRewriter();
           assertNotNull("basic rewriter is null", basic);
  -        FileReader reader = getTestReader("test-rewriter-rules.xml");  
  +        FileReader reader = getTestReader("test-rewriter-rules.xml");
           Ruleset ruleset = component.loadRuleset(reader);
           assertNotNull("ruleset is null", ruleset);
           RulesetRewriter rewriter = component.createRewriter(ruleset);
           assertNotNull("ruleset rewriter is null", rewriter);
  -        assertNotNull("ruleset is null", rewriter.getRuleset());                      
 
  +        assertNotNull("ruleset is null", rewriter.getRuleset());
       }
  -                    
  -    public void testRules()
  -              throws Exception
  -    { 
  +
  +    public void testRules() throws Exception
  +    {
           RewriterController component = getController();
  -        assertNotNull("template component is null", component);            
  -        
  +        assertNotNull("template component is null", component);
  +
           assertNotNull("rewriter component is null", component);
  -        FileReader reader = getTestReader("test-rewriter-rules.xml");  
  +        FileReader reader = getTestReader("test-rewriter-rules.xml");
           Ruleset ruleset = component.loadRuleset(reader);
           assertNotNull("ruleset is null", ruleset);
           assertEquals("ruleset id", "test-set-101", ruleset.getId());
           Iterator rules = ruleset.getRules().iterator();
           assertNotNull("rules is null", rules);
  -        
  +
           //
           // test tags
           //                   
           Iterator tags = ruleset.getTags().iterator();
           while (tags.hasNext())
           {
  -            Tag tag = (Tag)tags.next();
  +            Tag tag = (Tag) tags.next();
               if (tag.getId().equalsIgnoreCase("FORM"))
               {
  -                assertFalse("Remove", tag.getRemove());                               

  +                assertFalse("Remove", tag.getRemove());
                   Iterator attributes = tag.getAttributes().iterator();
                   while (attributes.hasNext())
                   {
  -                    Attribute attribute = (Attribute)attributes.next();
  +                    Attribute attribute = (Attribute) attributes.next();
                       assertTrue("attribute is not ACTION", attribute.getId().equals("ACTION"));
  -                    assertEquals("attribute rule not equal", attribute.getRule().getId(),
"merge");                    
  +                    assertEquals("attribute rule not equal", attribute.getRule().getId(),
"merge");
                   }
               }
               else if (tag.getId().equalsIgnoreCase("INPUT"))
               {
  -                assertFalse("Remove", tag.getRemove());                               

  +                assertFalse("Remove", tag.getRemove());
                   Iterator attributes = tag.getAttributes().iterator();
                   while (attributes.hasNext())
                   {
  -                    Attribute attribute = (Attribute)attributes.next();
  +                    Attribute attribute = (Attribute) attributes.next();
                       assertTrue("attribute is not SOURCE", attribute.getId().equals("SOURCE"));
                       assertEquals("attribute rule not equal", attribute.getRule().getId(),
"test");
                   }
  -                
  +
               }
               else if (tag.getId().equalsIgnoreCase("LINK"))
               {
  -                assertFalse("Remove", tag.getRemove());                
  +                assertFalse("Remove", tag.getRemove());
                   Iterator attributes = tag.getAttributes().iterator();
                   while (attributes.hasNext())
                   {
  -                    Attribute attribute = (Attribute)attributes.next();
  -                    assertTrue("attribute is not HREF", attribute.getId().equals("HREF"));
                   
  -                    assertEquals("attribute rule not equal", attribute.getRule().getId(),
"merge");                    
  -                }                
  +                    Attribute attribute = (Attribute) attributes.next();
  +                    assertTrue("attribute is not HREF", attribute.getId().equals("HREF"));
  +                    assertEquals("attribute rule not equal", attribute.getRule().getId(),
"merge");
  +                }
               }
               else if (tag.getId().equalsIgnoreCase("HEAD"))
               {
  @@ -148,14 +157,14 @@
                   Iterator attributes = tag.getAttributes().iterator();
                   while (attributes.hasNext())
                   {
  -                    Attribute attribute = (Attribute)attributes.next();
  -                }                
  -            }                                    
  +                    Attribute attribute = (Attribute) attributes.next();
  +                }
  +            }
               else
  -            {                
  +            {
                   assertTrue("tag name unexpected: " + tag.getId(), false);
               }
  -            
  +
           }
           assertNotNull("tags is null", tags);
   
  @@ -164,8 +173,8 @@
           //           
           while (rules.hasNext())
           {
  -            Rule rule = (Rule)rules.next();
  -            assertNotNull("rule is null", rule);            
  +            Rule rule = (Rule) rules.next();
  +            assertNotNull("rule is null", rule);
               if (rule.getId().equals("merge"))
               {
                   assertEquals("Rule id", rule.getId(), "merge");
  @@ -181,23 +190,22 @@
                   assertEquals("Rule Suffix", rule.getSuffix(), "/whatever&xxx=1");
               }
               else
  -            {                
  +            {
                   assertTrue("rule name unexpected: " + rule.getId(), false);
  -            }            
  +            }
           }
  -                                 
  +
       }
  -        
  -    public void testRewriting()
  -              throws Exception
  -    { 
  +
  +    public void testRewriting() throws Exception
  +    {
           RewriterController component = getController();
  -        assertNotNull("template component is null", component);            
  -        
  +        assertNotNull("template component is null", component);
  +
           assertNotNull("rewriter component is null", component);
  -        
  -        FileReader reader = getTestReader("test-remove-rules.xml");  
  -          
  +
  +        FileReader reader = getTestReader("test-remove-rules.xml");
  +
           Ruleset ruleset = component.loadRuleset(reader);
           reader.close();
           assertNotNull("ruleset is null", ruleset);
  @@ -205,67 +213,113 @@
           assertNotNull("ruleset rewriter is null", rewriter);
           assertNotNull("ruleset is null", rewriter.getRuleset());
   
  -        
           FileReader htmlReader = getTestReader("test-001.html");
           FileWriter htmlWriter = getTestWriter("test-001-output.html");
  -        
  +
           ParserAdaptor adaptor = component.createParserAdaptor("text/html");
           rewriter.setBaseUrl("http://www.rewriter.com");
           rewriter.rewrite(adaptor, htmlReader, htmlWriter);
           htmlWriter.close();
  -        htmlReader.close();    
  +        htmlReader.close();
   
  -        // validate result        
  -        FileReader testReader = getTestReader("test-001-output.html");  
  +        // validate result
  +        FileReader testReader = getTestReader("test-001-output.html");
           UnitTestRewriter testRewriter = new UnitTestRewriter();
           testRewriter.parse(component.createParserAdaptor("text/html"), testReader);
  -        assertTrue("1st rewritten anchor: " + testRewriter.getAnchorValue("1"), 
  -                    testRewriter.getAnchorValue("1").equals("http://www.bluesunrise.com/suffix"));
  -        assertTrue("2nd rewritten anchor: " + testRewriter.getAnchorValue("2"),
  -                testRewriter.getAnchorValue("2").equals("http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix"));
  -        assertTrue("3rd rewritten anchor: " + testRewriter.getAnchorValue("3"),
  -                testRewriter.getAnchorValue("3").equals("http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix"));
  -        assertTrue("4th rewritten anchor: " + testRewriter.getAnchorValue("4"), 
  -                        testRewriter.getAnchorValue("4").equals("javascript:whatever()"));
  -        assertTrue("5th rewritten anchor: " + testRewriter.getAnchorValue("5"), 
  -                        testRewriter.getAnchorValue("5").equals("mailto:david@bluesunrise.com"));
  -        assertTrue("6th rewritten anchor: " + testRewriter.getAnchorValue("6"), 
  -                        testRewriter.getAnchorValue("6").equals("#INTERNAL"));
  -                        
  -        assertTrue("Paragraph text: " + testRewriter.getParagraph(), testRewriter.getParagraph().equals("This
is a test"));
  +        assertTrue("1st rewritten anchor: " + testRewriter.getAnchorValue("1"), testRewriter.getAnchorValue("1")
  +                .equals("http://www.bluesunrise.com/suffix"));
  +        assertTrue("2nd rewritten anchor: " + testRewriter.getAnchorValue("2"), testRewriter.getAnchorValue("2")
  +                .equals("http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix"));
  +        assertTrue("3rd rewritten anchor: " + testRewriter.getAnchorValue("3"), testRewriter.getAnchorValue("3")
  +                .equals("http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix"));
  +        assertTrue("4th rewritten anchor: " + testRewriter.getAnchorValue("4"), testRewriter.getAnchorValue("4")
  +                .equals("javascript:whatever()"));
  +        assertTrue("5th rewritten anchor: " + testRewriter.getAnchorValue("5"), testRewriter.getAnchorValue("5")
  +                .equals("mailto:david@bluesunrise.com"));
  +        assertTrue("6th rewritten anchor: " + testRewriter.getAnchorValue("6"), testRewriter.getAnchorValue("6")
  +                .equals("#INTERNAL"));
  +
  +        assertTrue("Paragraph text: " + testRewriter.getParagraph(), testRewriter.getParagraph().equals(
  +                "This is a test"));
       }
   
       /**
  -     * Gets a reader for a given filename in the test directory. 
  +     * Gets a reader for a given filename in the test directory.
        * 
        * @return A file reader to the test rules file
        * @throws IOException
        */
  -    private FileReader getTestReader(String filename)
  -        throws IOException
  +    private FileReader getTestReader(String filename) throws IOException
       {
           return new FileReader("test/rewriter/" + filename);
       }
   
       /**
  -     * Gets a writer for a given filename in the test directory. 
  +     * Gets a writer for a given filename in the test directory.
        * 
        * @return A file reader to the test rules file
        * @throws IOException
        */
  -    private FileWriter getTestWriter(String filename)
  -        throws IOException
  +    private FileWriter getTestWriter(String filename) throws IOException
       {
           String cwd = System.getProperty("user.dir");
           String path;
           return new FileWriter("test/rewriter/" + filename);
       }
  -    
  +
  +
       private RewriterController getController() throws Exception
  -    {        
  -        Class[] rewrtierClasses = new Class[]{BasicRewriter.class, RulesetRewriterImpl.class};
  -        Class[] adaptorClasses = new Class[]{SwingParserAdaptor.class, SaxParserAdaptor.class};
  -        return new JetspeedRewriterController("test/WEB-INF/conf/rewriter-rules-mapping.xml",
Arrays.asList(rewrtierClasses), Arrays.asList(adaptorClasses));
  +    {
  +        Class[] rewriterClasses = new Class[]
  +        { RulesetRewriterImpl.class, RulesetRewriterImpl.class};
  +        
  +        //Class[] rewriterClasses = new Class[]
  +          //     { WebContentRewriter.class, WebContentRewriter.class};
  +        
  +        Class[] adaptorClasses = new Class[]
  +        { SwingParserAdaptor.class, SaxParserAdaptor.class};
  +        return new JetspeedRewriterController("test/WEB-INF/conf/rewriter-rules-mapping.xml",
Arrays
  +                .asList(rewriterClasses), Arrays.asList(adaptorClasses));
       }
  +    
  +    public void XXXtestExternalRewriting() throws Exception
  +    {
  +        RewriterController component = getController();
  +        assertNotNull("template component is null", component);
  +
  +        assertNotNull("rewriter component is null", component);
  +
  +        Reader reader = getTestReader("default-rewriter-rules.xml");
  +
  +        Ruleset ruleset = component.loadRuleset(reader);
  +        reader.close();
  +        assertNotNull("ruleset is null", ruleset);
  +        RulesetRewriter rewriter = component.createRewriter(ruleset);
  +        assertNotNull("ruleset rewriter is null", rewriter);
  +        assertNotNull("ruleset is null", rewriter.getRuleset());
  +
  +        String source = "http://jakarta.apache.org/tomcat/";
  +        Reader htmlReader = getRemoteReader(source);
  +        FileWriter htmlWriter = getTestWriter("test-002-output.html");
  +
  +        ParserAdaptor adaptor = component.createParserAdaptor("text/html");
           
  -}
  +        URL baseURL = new URL(source);
  +        String baseurl = baseURL.getProtocol() + "://" + baseURL.getHost();        
  +        
  +        rewriter.setBaseUrl(baseurl);
  +        rewriter.rewrite(adaptor, htmlReader, htmlWriter);
  +        htmlWriter.close();
  +        htmlReader.close();
  +    }
  +
  +    private Reader getRemoteReader(String uri) throws IOException
  +    {
  +        HttpClient client = new HttpClient();
  +        GetMethod get = new GetMethod(uri);
  +        int status = client.executeMethod(get);
  +        InputStream is = get.getResponseBodyAsStream();
  +        return new InputStreamReader(is);
  +    }
  +    
  +}
  \ No newline at end of file
  
  
  
  1.3       +2 -2      jakarta-jetspeed-2/components/jetspeed/src/java/org/apache/jetspeed/rewriter/Rewriter.java
  
  Index: Rewriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/jetspeed/src/java/org/apache/jetspeed/rewriter/Rewriter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Rewriter.java	8 Mar 2004 00:44:40 -0000	1.2
  +++ Rewriter.java	2 Dec 2004 22:56:28 -0000	1.3
  @@ -105,7 +105,7 @@
        * @return The base URL for this rewriter
        */
       String getBaseUrl();
  -
  +    
       /**
        * Gets whether this rewriter require a proxy server.
        * 
  
  
  
  1.4       +94 -113   jakarta-jetspeed-2/components/jetspeed/src/java/org/apache/jetspeed/rewriter/WebContentRewriter.java
  
  Index: WebContentRewriter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/jetspeed/src/java/org/apache/jetspeed/rewriter/WebContentRewriter.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebContentRewriter.java	2 Dec 2004 07:14:01 -0000	1.3
  +++ WebContentRewriter.java	2 Dec 2004 22:56:28 -0000	1.4
  @@ -1,17 +1,17 @@
   /* Copyright 2004 Apache Software Foundation
  -*
  -* Licensed under the Apache License, Version 2.0 (the "License");
  -* you may not use this file except in compliance with the License.
  -* You may obtain a copy of the License at
  -*
  -*     http://www.apache.org/licenses/LICENSE-2.0
  -*
  -* Unless required by applicable law or agreed to in writing, software
  -* distributed under the License is distributed on an "AS IS" BASIS,
  -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  -* See the License for the specific language governing permissions and
  -* limitations under the License.
  -*/
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *     http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
   package org.apache.jetspeed.rewriter;
   
   import java.net.URL;
  @@ -20,25 +20,21 @@
   
   /**
    * WebContentRewriter
  - *
  - * @author <a href="mailto:rogerrutr@apache.org">Roger Ruttimann</a>
  + * 
  + * @author <a href="mailto:rogerrutr@apache.org">Roger Ruttimann </a>
    * @version $Id$
    */
  -public class WebContentRewriter extends RulesetRewriterImpl implements Rewriter {
  +public class WebContentRewriter extends RulesetRewriterImpl implements Rewriter
  +{
   
       /** WebContentURL */
       public static final String ACTION_PARAMETER_URL = "WCURL";
   
       /*
  -     * Portlet URL will be used to replace all URL's 
  +     * Portlet URL will be used to replace all URL's
        */
       private PortletURL actionURL = null;
  -    
  -    /*
  -     * Base URL
  -     */
  -    private String baseURL = null;
  -    
  +
       /**
        * Setters/getters for members
        */
  @@ -46,53 +42,45 @@
       {
           this.actionURL = action;
       }
  -    
  +
       public PortletURL getActionURL()
       {
           return this.actionURL;
       }
  -    
  -    public void setBaseURL(String url)
  -    {
  -        this.baseURL = url;
  -    }
  -    
  -    public String getBaseURL()
  +
  +    /**
  +     * rewriteURL
  +     * 
  +     * @param url
  +     * @param tag
  +     * @param attribute
  +     * @return the modified url which is a portlet action
  +     * 
  +     * Rewrites all urls HREFS with a portlet action
  +     */
  +    public String rewriteUrl(String url, String tag, String attribute)
       {
  -        return this.baseURL;
  -    }
  -    
  -	/** rewriteURL
  -	 * @param url
  -	 * @param tag
  -	 * @param attribute
  -	 * @return the modified url which is a portlet action
  -	 * 
  -	 * Rewrites all urls  HREFS with a portlet action
  -	 */
  -	public String rewriteUrl(String url, String tag, String attribute) {
  -	    
  -	    /*
  -	     * TODO: no default. Use default Jetspeed JIRA to make sure that the method was called
  -	     */
  -	    String modifiedURL = "http://nagoya.apache.org/jira/secure/BrowseProject.jspa?id=10492";
  -	    
  -	    //	Check if it's a relative or full URL
  -        if ( url.startsWith("/") || url.indexOf("http") == -1)
  +        /*
  +         * TODO: no default. Use default Jetspeed JIRA to make sure that the
  +         * method was called
  +         */
  +        String modifiedURL = "http://nagoya.apache.org/jira/secure/BrowseProject.jspa?id=10492";
  +        //	Check if it's a relative or full URL
  +        if (url.startsWith("/") || url.indexOf("http") == -1)
           {
               try
               {
  -	            if (baseURL != null)
  -	            {
  -	                URL full = new URL(new URL(baseURL), url);
  -	                modifiedURL = full.toString();
  -	            }
  -	            else
  -	            {
  -	                modifiedURL = url; // leave as is
  -	            }
  +                if (this.getBaseUrl() != null)
  +                {
  +                    URL full = new URL(new URL(this.getBaseUrl()), url);
  +                    modifiedURL = full.toString();
  +                }
  +                else
  +                {
  +                    modifiedURL = url; // leave as is
  +                }
               }
  -            catch(Exception e)
  +            catch (Exception e)
               {
                   modifiedURL = url;
               }
  @@ -102,60 +90,53 @@
               // Apply action URL's not to images
               if (url.indexOf(".gif") == -1 && url.indexOf(".jpg") == -1)
               {
  -			    if ( this.actionURL != null)
  -			    {
  -			        // create Action URL
  -					actionURL.setParameter(ACTION_PARAMETER_URL, url);
  -					
  -					modifiedURL = actionURL.toString();
  -		        }
  -		        else
  -		        {
  -		            modifiedURL = url;
  -		        }
  +                if (this.actionURL != null)
  +                {
  +                    // create Action URL
  +                    actionURL.setParameter(ACTION_PARAMETER_URL, url);
  +
  +                    modifiedURL = actionURL.toString();
  +                }
  +                else
  +                {
  +                    modifiedURL = url;
  +                }
               }
               else
               {
                   modifiedURL = url;
               }
  -	    }
  -		return modifiedURL;
  -	}
  -
  -    
  -	/* (non-Javadoc)
  -	 * @see org.apache.jetspeed.rewriter.Rewriter#shouldRemoveTag(java.lang.String)
  -	 */
  -    /*
  -	public boolean shouldRemoveTag(String tag) {
  -		 if (tag.equalsIgnoreCase("html"))
  -		{
  -		    return true;
  -		}
  -		return false;	
  -	}
  -    */
  -
  -	/* (non-Javadoc)
  -	 * @see org.apache.jetspeed.rewriter.Rewriter#shouldStripTag(java.lang.String)
  -	 */
  -    /*
  -	public boolean shouldStripTag(String tag) {
  -		if (tag.equalsIgnoreCase("head"))
  -		{
  -		    return true;
  -		}
  -		return false;
  -	}
  -    */
  -
  -	/* (non-Javadoc)
  -	 * @see org.apache.jetspeed.rewriter.Rewriter#shouldRemoveComments()
  -	 */
  -    /*
  -	public boolean shouldRemoveComments() {
  -		return true;
  -	}
  -    */
  +        }
  +        return modifiedURL;
  +    }
  +
  +    /*
  +     * (non-Javadoc)
  +     * 
  +     * @see org.apache.jetspeed.rewriter.Rewriter#shouldRemoveTag(java.lang.String)
  +     */
  +    /*
  +     * public boolean shouldRemoveTag(String tag) { if
  +     * (tag.equalsIgnoreCase("html")) { return true; } return false; }
  +     */
  +
  +    /*
  +     * (non-Javadoc)
  +     * 
  +     * @see org.apache.jetspeed.rewriter.Rewriter#shouldStripTag(java.lang.String)
  +     */
  +    /*
  +     * public boolean shouldStripTag(String tag) { if
  +     * (tag.equalsIgnoreCase("head")) { return true; } return false; }
  +     */
  +
  +    /*
  +     * (non-Javadoc)
  +     * 
  +     * @see org.apache.jetspeed.rewriter.Rewriter#shouldRemoveComments()
  +     */
  +    /*
  +     * public boolean shouldRemoveComments() { return true; }
  +     */
   
  -}
  +}
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message