Package org.apache.tika.sax
Class LinkContentHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.apache.tika.sax.LinkContentHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class LinkContentHandler extends DefaultHandler
Content handler that collects links from an XHTML document.
-
-
Constructor Summary
Constructors Constructor Description LinkContentHandler()
Default constructorLinkContentHandler(boolean collapseWhitespaceInAnchor)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endElement(String uri, String local, String name)
List<Link>
getLinks()
Returns the list of collected links.void
ignorableWhitespace(char[] ch, int start, int length)
void
startElement(String uri, String local, String name, Attributes attributes)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
startElement
public void startElement(String uri, String local, String name, Attributes attributes)
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
-
characters
public void characters(char[] ch, int start, int length)
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length)
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Overrides:
ignorableWhitespace
in classDefaultHandler
-
endElement
public void endElement(String uri, String local, String name)
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
-
-