Class HTMLContentHandler
java.lang.Object
com.day.cq.wcm.designimporter.parser.HTMLContentHandler
- All Implemented Interfaces:
ContentHandler
The SAX content handler for handling the HTML SAX events raised by the HTML parser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String uri, String localName, String qName) voidendPrefixMapping(String prefix) PageComponents are extracted from the input HTML stream on the basis of the parameterized component divs and theTagHandlers registered with theTagHandlerProvidervoidignorableWhitespace(char[] ch, int start, int length) voidprocessingInstruction(String target, String data) voidsetCanvasResourceType(String canvasResourceType) Sets the unique canvas resourceTypevoidsetDesignImporterContext(DesignImporterContext designImporterContext) Sets the design importer contextvoidsetDocumentLocator(Locator locator) voidsetPageBuilder(PageBuilder pageBuilder) Sets the page builder for building page components.voidsetTagHandlerProvider(TagHandlerProvider tagHandlerProvider) Sets theTagHandlerProvidervoidskippedEntity(String name) voidvoidstartElement(String uri, String localName, String qName, Attributes atts) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
HTMLContentHandler
public HTMLContentHandler()
-
-
Method Details
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
getBodyHtmlContent
-
getGeneratedComponents
PageComponents are extracted from the input HTML stream on the basis of the parameterized component divs and theTagHandlers registered with theTagHandlerProvider- Returns:
- The list of
PageComponents extracted from the input HTML stream.
-
getHeadHtmlContent
-
getLanguage
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setCanvasResourceType
Sets the unique canvas resourceType- Parameters:
canvasResourceType-
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
setDesignImporterContext
Sets the design importer context- Parameters:
designImporterContext- TheDesignImporterContextcontext object
-
setPageBuilder
Sets the page builder for building page components.- Parameters:
pageBuilder- ThePageBuilderobject for buildingPageComponents
-
setTagHandlerProvider
Sets theTagHandlerProvider- Parameters:
tagHandlerProvider- TheTagHandlerProviderinstance
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-