Class LinkTagHandler
- All Implemented Interfaces:
EntryTagHandler,HTMLContentProvider,TagHandler
This tag handler is registered against the markup of type invalid input: '<' link rel="stylesheet" >. That implies this tag handler will come into action whenever the design importer framework encounters an HTML tag matching the rule this handler is defined against.
Note: This tag handler does not handle inline script tags.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginHandling(String uri, String localName, String qName, Attributes atts) Callback to signal the start of handling giving the tag handler a chance for running intialization routines.voidcharacters(char[] ch, int start, int length) Callback to signal the encounter of character content within tags.voidendElement(String uri, String localName, String qName) Callback to signal the encounter of a tag end.voidendHandling(String uri, String localName, String qName) Callback to signal the end of handling giving the tag handler a chance for finalizing things.getContent(HTMLContentType htmlContentType) Gets the content of the typeHTMLContentTypevoidsetDesignImporterContext(DesignImporterContext designImporterContext) Sets the design importer contextvoidsetTagHandlerProvider(TagHandlerProvider tagHandlerProvider) voidstartElement(String uri, String localName, String qName, Attributes atts) Callback to signal the encounter of a tag start.booleansupportsContent(HTMLContentType htmlContentType) Indicates whether the passedHTMLContentTypeis supported or not
-
Constructor Details
-
LinkTagHandler
public LinkTagHandler()
-
-
Method Details
-
beginHandling
Description copied from interface:TagHandlerCallback to signal the start of handling giving the tag handler a chance for running intialization routines.TagHandlers are registered against tag+attribute combination and are invoked by theHTMLContentHandleras and when it encounters a tag matching the tag attribute combination the tag handler is registered with.- Specified by:
beginHandlingin interfaceTagHandler- Parameters:
uri-localName-qName-atts-
-
characters
Description copied from interface:TagHandlerCallback to signal the encounter of character content within tags.- Specified by:
charactersin interfaceTagHandler- Parameters:
ch-start-length-- Throws:
DesignImportException
-
endElement
Description copied from interface:TagHandlerCallback to signal the encounter of a tag end.- Specified by:
endElementin interfaceTagHandler- Parameters:
uri-localName-qName-- Throws:
DesignImportException
-
endHandling
Description copied from interface:TagHandlerCallback to signal the end of handling giving the tag handler a chance for finalizing things.This is arguably the last callback a tag handler receives. After this, the current tag handler is popped out from the chain and the subsequent Tika events are directed to preceding tag handlers.
- Specified by:
endHandlingin interfaceTagHandler- Parameters:
uri-localName-qName-
-
getContent
Description copied from interface:HTMLContentProviderGets the content of the typeHTMLContentType- Specified by:
getContentin interfaceHTMLContentProvider- Parameters:
htmlContentType-- Returns:
-
setDesignImporterContext
Description copied from interface:TagHandlerSets the design importer context- Specified by:
setDesignImporterContextin interfaceTagHandler- Parameters:
designImporterContext-
-
setTagHandlerProvider
- Specified by:
setTagHandlerProviderin interfaceTagHandler
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws DesignImportException Description copied from interface:TagHandlerCallback to signal the encounter of a tag start.Once a tag handler begins handling, it receives the start tag events for all the nested tags within the purview of the tag this tag handler is registered against.
- Specified by:
startElementin interfaceTagHandler- Parameters:
uri-localName-qName-atts-- Throws:
DesignImportException
-
supportsContent
Description copied from interface:HTMLContentProviderIndicates whether the passedHTMLContentTypeis supported or not- Specified by:
supportsContentin interfaceHTMLContentProvider- Parameters:
htmlContentType-- Returns:
-