edu.byu.deg.ontos
Class HTMLFilter

java.lang.Object
  extended byedu.byu.deg.ontos.HTMLFilter
All Implemented Interfaces:
edu.byu.deg.framework.ContentFilter

public class HTMLFilter
extends Object
implements edu.byu.deg.framework.ContentFilter

A ContentFilter implementation that strips all HTML tags from the input.


Constructor Summary
HTMLFilter()
          Creates a new instance of HTMLFilter
 
Method Summary
 edu.byu.deg.framework.Document filterDocument(edu.byu.deg.framework.Document doc)
          Strips HTML tags from the contents of the input Document, returning a new PlaintextDocument.
protected static String stringFromStream(InputStream in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLFilter

public HTMLFilter()
Creates a new instance of HTMLFilter

Method Detail

filterDocument

public edu.byu.deg.framework.Document filterDocument(edu.byu.deg.framework.Document doc)
Strips HTML tags from the contents of the input Document, returning a new PlaintextDocument.

Specified by:
filterDocument in interface edu.byu.deg.framework.ContentFilter
Parameters:
doc - The input document whose contents we wish to clean of HTML markup.
Returns:
A new PlaintextDocument containing no HTML tags.

stringFromStream

protected static String stringFromStream(InputStream in)
                                  throws IOException
Throws:
IOException