Class SemanticAnnotationsEditionHandler
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.transformation.htmledition.AbstractHTMLEditionHandler
org.ametys.cms.transformation.htmledition.SemanticAnnotationsEditionHandler
- All Implemented Interfaces:
Contextualizable,LogEnabled,Serviceable,ContentHandler,LexicalHandler
This transformer extracts semantic annotation from the incoming HTML for further processing.
Appends all text nodes inside <span annotation="xxx"< element.
-
Field Summary
Fields inherited from class org.ametys.cms.transformation.htmledition.AbstractHTMLEditionHandler
_contentHandler, _context, _lexicalHandler, _manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Dispatch the characters event to semanticAnnotations.voidendElement(String uri, String loc, String raw) Dispatch the endElement event to semanticAnnotations.voidWhen document starts, a holder of semanticAnnotations is createdvoidstartElement(String uri, String loc, String raw, Attributes attrs) Dispatch the startElement event to semanticAnnotations.Methods inherited from class org.ametys.cms.transformation.htmledition.AbstractHTMLEditionHandler
comment, contextualize, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, service, setContentHandler, setDocumentLocator, setLexicalHandler, skippedEntity, startCDATA, startDTD, startEntity, startPrefixMappingMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
SemanticAnnotationsEditionHandler
public SemanticAnnotationsEditionHandler()
-
-
Method Details
-
startDocument
When document starts, a holder of semanticAnnotations is created- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classAbstractHTMLEditionHandler- Throws:
SAXException- See Also:
-
startElement
Dispatch the startElement event to semanticAnnotations. Add a new annotation in the holder if the element matches a semantic annotation element- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classAbstractHTMLEditionHandler- Throws:
SAXException- See Also:
-
characters
Dispatch the characters event to semanticAnnotations.- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classAbstractHTMLEditionHandler- Throws:
SAXException- See Also:
-
endElement
Dispatch the endElement event to semanticAnnotations.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classAbstractHTMLEditionHandler- Throws:
SAXException- See Also:
-