public void produce( LDAPEntry entry )
throws SAXException
{
AttributeListImpl attrList;
LDAPAttributeSet attrSet;
LDAPAttribute attr;
Enumeration enumeration;
Enumeration values;
byte[] value;
leaveSchema();
enterDirectory();
// dsml:entry dn
attrList = new AttributeListImpl();
attrList.addAttribute( XML.Entries.Attributes.DN, "CDATA", entry.getDN() );
// dsml:entry
_docHandler.startElement( prefix( XML.Entries.Elements.Entry ), attrList );
attrSet = entry.getAttributeSet();
if ( attrSet != null ) {
attr = attrSet.getAttribute( "objectclass" );
if ( attr != null ) {
// dsml:objectclass
attrList = new AttributeListImpl();
_docHandler.startElement( prefix( XML.Entries.Elements.ObjectClass ), attrList );
values = attr.getStringValues();
while ( values.hasMoreElements() ) {
char[] chars;
// dsml:oc-value
chars = ( (String) values.nextElement() ).toCharArray();
attrList = new AttributeListImpl();
_docHandler.startElement( prefix( XML.Entries.Elements.OCValue ), attrList );
_docHandler.characters( chars, 0, chars.length );
_docHandler.endElement( prefix( XML.Entries.Elements.OCValue ) );
}
_docHandler.endElement( prefix( XML.Entries.Elements.ObjectClass ) );
}
enumeration = attrSet.getAttributes();
while ( enumeration.hasMoreElements() ) {
// dsml:attr
attr = (LDAPAttribute) enumeration.nextElement();
if ( attr.getName().equals( "objectclass" ) )
continue;