LDAP Classes
Implements Java LDAP

com.novell.ldap.util
Class SAXEventMultiplexer

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bycom.novell.ldap.util.SAXEventMultiplexer
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SAXEventMultiplexer
extends org.xml.sax.helpers.DefaultHandler

This class forms the base for deserialization(readDSML) of the DSML Serialized classes.It pipes SAX events to LDAPXMLHandler which is implemented by each class that needs DSML serialization support.

See Also:
LDAPXMLHandler, DefaultHandler

Constructor Summary
SAXEventMultiplexer()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 java.lang.Object parseXML(java.io.InputStream inputStream)
          This method is used to parse the XML Document and deserialize it using the default LDAPXMLHandler.
 void setLDAPXMLHandler(LDAPXMLHandler adefault)
          This method is used to set the default LDAPXMLHandler, which defines the root element for XML document being processed.
 void startDocument()
           
 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
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXEventMultiplexer

public SAXEventMultiplexer()
Method Detail

setLDAPXMLHandler

public void setLDAPXMLHandler(LDAPXMLHandler adefault)
This method is used to set the default LDAPXMLHandler, which defines the root element for XML document being processed.

Parameters:
adefault - LDAPXMLHandler for the root element of the XML Document.

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.characters(char[], int, int)

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endDocument()

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startDocument()

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
Throws:
org.xml.sax.SAXException
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

parseXML

public java.lang.Object parseXML(java.io.InputStream inputStream)
                          throws java.io.IOException
This method is used to parse the XML Document and deserialize it using the default LDAPXMLHandler.

Parameters:
inputStream - The InputStream which contains the XML Document.
Returns:
Resultant DeSerialized Object.
Throws:
java.io.IOException - When parsing of Document fails or Deserialization fails.

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000