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 org.xml.sax.helpers.DefaultHandler
Content handler that collects links from an XHTML document.
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkContentHandler
public LinkContentHandler()
getLinks
public List<Link> getLinks()
- Returns the list of collected links.
- Returns:
- collected links
startElement
public void startElement(String uri,
String local,
String name,
Attributes attributes)
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
characters
public void characters(char[] ch,
int start,
int length)
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
- Specified by:
ignorableWhitespace
in interface ContentHandler
- Overrides:
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
endElement
public void endElement(String uri,
String local,
String name)
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.