public class TSAXObjectModel extends TXMLObjectModel
Specifying the SAX object model for an accessor determines that the XML documents provided by that accessor are streams of SAX events.
The processing of a stream of SAX events requires a set of handlers, which are triggered by the SAX parser. When constructing a TSAXObjectModel instance these handlers must be specified.
Constructor and Description |
---|
TSAXObjectModel(java.lang.String specifier,
java.lang.Class saxDocumentClass,
java.lang.Class saxElementClass,
TSAXDocumentDefaultHandler documentDefaultHandler,
TSAXElementDefaultHandler elementDefaultHandler)
Constructor to create a new instance of the SAX object model.
|
Modifier and Type | Method and Description |
---|---|
void |
setDeclHandler(org.xml.sax.ext.DeclHandler declHandler)
Sets an optional SAX declaration handler for this model.
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler lexicalHandler)
Sets an optional SAX lexical handler for this model.
|
deregister, getAdapterClass, getAdapterConstructor, getDocumentClass, getElementClass, getInputStreamInterpreterClass, getLocale, getProperty, getPropertyIterator, getPropertyKeyIterator, getRegisteredModel, getRegisteredModel, getRegisteredModels, getSpecifier, isRegistered, register, setLocale, setProperty
public TSAXObjectModel(java.lang.String specifier, java.lang.Class saxDocumentClass, java.lang.Class saxElementClass, TSAXDocumentDefaultHandler documentDefaultHandler, TSAXElementDefaultHandler elementDefaultHandler)
A SAX object model is primarily intended for reading XML documents from Tamino. If the storing and updating of XML documents is required as well, the handler and document/element classes need to provide an implementation that allows this.
specifier
- a string identifying this SAX object model instance. As it is possible
to instantiate more than one instance, each instance must have a different specifier.saxDocumentClass
- a class implementing the TSAXDocument interface. This parameter
is required if the documentDefaultHandler parameter is not null, otherwise null is
allowed. This parameter must be set if single XML documents are either retrieved from
Tamino or are created as TXMLObject instances.saxElementClass
- a class implementing the TSAXElement interface. This parameter
is required if the elementDefaultHandler parameter is not null, otherwise null is
allowed. This parameter must be set if XML documents resulting from a Tamino query
are to be processed.documentDefaultHandler
- an instance of a class extending the TSAXDocumentDefaultHandler
abstract class. This parameter is optional, but required if single XML documents are
either retrieved from Tamino or are created as TXMLObject instances. If this parameter
is specified, the saxDocumentClass parameter must also be set.elementDefaultHandler
- an instance of a class extending the TSAXElementDefaultHandler
abstract class. This parameter is optional, but required if XML documents resulting
from a Tamino query are to be processed. If this parameter is specified, the saxElementClass
parameter must also be set.public void setDeclHandler(org.xml.sax.ext.DeclHandler declHandler)
declHandler
- an instance of a class implementing the SAX DeclHandler interface.public void setLexicalHandler(org.xml.sax.ext.LexicalHandler lexicalHandler)
lexicalHandler
- an instance of a class implementing the SAX LexicalHandler interface.Copyright (c) 2015 Software AG. All Rights Reserved.