LDAP Classes
Implements Java LDAP

com.novell.ldap.util
Class LDAPXMLHandler

java.lang.Object
  extended bycom.novell.ldap.util.LDAPXMLHandler
Direct Known Subclasses:
ValueXMLhandler

public class LDAPXMLHandler
extends java.lang.Object

This class is used to handle the deserialization events emitted by SAXEventMultiplexer. It is a variation of SAXEvents Handler, simplied for accessing specific required events only.

See Also:
SAXEventMultiplexer

Constructor Summary
LDAPXMLHandler(java.lang.String ElementName, LDAPXMLHandler parent)
          Default Constructor with element name for this Handler and parent LDAPXMLHandler to be processed.
 
Method Summary
protected  void addValue(java.lang.String tag, java.lang.Object value)
          This method defines the generic adapter to be used by child elements to return the values of the processed Child Elements.
protected  void endElement()
          This method is used to signal the end of Element.
protected  java.lang.String getName()
          This method returns the Name of the Element to be handled by this LDAPXMLHandler.
 java.lang.Object getObject()
          This method returns the deserialize Object generated by this class.
protected  LDAPXMLHandler getParent()
          Returns the Parent LDAPXMLHandler.
protected  java.lang.String getValue()
          This method returns the Value stored in this element.
protected  void handleAttributes(org.xml.sax.Attributes attributes)
          This method is used to handle the Attributes associated with this Element.
protected  void initHandler()
          This method is used to initialize the Handler.
protected  void setchildelement(LDAPXMLHandler handler)
          Sets the Handler for the Child LDAPXMLHandler, it expects only one handler for each code base.
protected  void setObject(java.lang.Object data)
          This method is used to set the Deserialized Object and it also calls the parent LDAPXMLHandler (if not null), returning the value using addValue()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPXMLHandler

public LDAPXMLHandler(java.lang.String ElementName,
                      LDAPXMLHandler parent)
Default Constructor with element name for this Handler and parent LDAPXMLHandler to be processed.

Parameters:
ElementName - String name of the XML element to process.
parent - LDAPXMLHandler , which is the parent of this Element.
Method Detail

getParent

protected LDAPXMLHandler getParent()
Returns the Parent LDAPXMLHandler.

Returns:
LDAPHandler

getName

protected final java.lang.String getName()
This method returns the Name of the Element to be handled by this LDAPXMLHandler.

Returns:
String xml element Name.

getValue

protected final java.lang.String getValue()
This method returns the Value stored in this element.

Returns:
String Value stored in this Element.

setchildelement

protected final void setchildelement(LDAPXMLHandler handler)
Sets the Handler for the Child LDAPXMLHandler, it expects only one handler for each code base.

Parameters:
handler - This handler for specific child element.

addValue

protected void addValue(java.lang.String tag,
                        java.lang.Object value)
This method defines the generic adapter to be used by child elements to return the values of the processed Child Elements.

Parameters:
tag - String XML tag.
value - Object deserialized value for the specific tag.

initHandler

protected void initHandler()
This method is used to initialize the Handler. It is expected that most of the implementation of this class would overide is method.


endElement

protected void endElement()
This method is used to signal the end of Element. It is expected that most of the implementation of this class would overide is method. and create the Objects from the deserialize data obtained so far.


handleAttributes

protected void handleAttributes(org.xml.sax.Attributes attributes)
                         throws org.xml.sax.SAXException
This method is used to handle the Attributes associated with this Element. It is expected that most of the implementation of this class would overide is method and do the required processing of the elements.

Parameters:
attributes - Attributes found with this element.
Throws:
org.xml.sax.SAXException - When the specific mandatory element is not found, so as to stop the processing.

getObject

public final java.lang.Object getObject()
This method returns the deserialize Object generated by this class.

Returns:
Object Deserialize form of XML tag.

setObject

protected final void setObject(java.lang.Object data)
This method is used to set the Deserialized Object and it also calls the parent LDAPXMLHandler (if not null), returning the value using addValue()

Parameters:
data - Object data.
See Also:
addValue(String, Object)

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