de.init.its.process.re
Class ItsProcessor.ForwardHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
de.init.its.process.re.ItsProcessor.ForwardHandler
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- Enclosing class:
- ItsProcessor
public static class ItsProcessor.ForwardHandler
- extends org.xml.sax.helpers.DefaultHandler
Content handler class for transform plain ODT Documents
to ITS enriched documents by rewriting flat bookmark structures into
possibly deep nested its annotated hierarchies
- Author:
- mkandora
Constructor Summary |
ItsProcessor.ForwardHandler(ItsElementManager manager)
Creates a new XML Event Handler for a Sax parser
with special regard of bookmark elements, that indicate
ITS content managed by the ItsElementManager. |
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
Element |
createElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes,
IitsTagElement e)
Creates an element |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, 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 |
ItsProcessor.ForwardHandler
public ItsProcessor.ForwardHandler(ItsElementManager manager)
- Creates a new XML Event Handler for a Sax parser
with special regard of bookmark elements, that indicate
ITS content managed by the ItsElementManager.
The internal implementation uses a lightweight tree
to maintain the original structure of the document and
to easily insert ITS Data Categories from flat Bookmark elements
to deeply nested ITS annotated Elements. The element by
choice is the text:span taken from the ODF File Specification.
Since, one can assume, that spans do not infer with
the visible styling of a documents structure, it is
the optimal choice to embed the Data Categories into spanning
elements.
- Parameters:
manager
- the its manager to resolve Data Category Data
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Overrides:
characters
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
startElement
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Overrides:
endElement
in class org.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
createElement
public Element createElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes,
IitsTagElement e)
- Creates an element
- Parameters:
uri
- localName
- qName
- attributes
- e
-
- Returns: