Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributeListImpl.addAttribute()


            throws SAXException {

            AttributeListImpl replaced = new AttributeListImpl();
            for (int i = 0; i < list.getLength(); i++) {
                String value = expand(list.getName(i), list.getValue(i));
                replaced.addAttribute(list.getName(i), list.getType(i), value);
            }
            _handler.startElement(name, replaced);
        }

        public void endElement(String name) throws SAXException {
View Full Code Here


  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 ) {
View Full Code Here

    // dsml:attr
    attr = (LDAPAttribute) enumeration.nextElement();
    if ( attr.getName().equals( "objectclass" ) )
        continue;
    attrList = new AttributeListImpl();
    attrList.addAttribute( XML.Entries.Attributes.Name, "CDATA", attr.getName() );
    _docHandler.startElement( prefix( XML.Entries.Elements.Attribute ), attrList );
   
    values = attr.getByteValues();
    while ( values.hasMoreElements() ) {
        char[] chars;
View Full Code Here

          chars = new char[ value.length ];
          for ( i = 0 ; i < value.length ; ++i )
        chars[ i ] = (char) value[ i ];
      } else {
                chars = Base64Encoder.encode(value);
          attrList.addAttribute( XML.Entries.Attributes.Encoding, "NMTOKEN",
               XML.Entries.Attributes.Encodings.Base64 );
      }
        }

        _docHandler.startElement( prefix( XML.Entries.Elements.Value ), attrList );
View Full Code Here

  leaveDirectory();
  enterSchema();
 
  attrList = new AttributeListImpl();
  // dsml:class id
  attrList.addAttribute( XML.Schema.Attributes.Id, "ID", schema.getName() );
  // dsml:class superior
  superiors = schema.getSuperiors();
  superior = null;
  for ( i = 0 ; i < superiors.length ; ++i ) {
      if ( i == 0 )
View Full Code Here

    superior = superiors[ i ];
      else
    superior = superior + "," + superiors[ i ];
  }
  if ( i > 0 )
      attrList.addAttribute( XML.Schema.Attributes.Superior, "CDATA", superior );
  // dsml:class obsolete
  attrList.addAttribute( XML.Schema.Attributes.Obsolete, null,
             schema.isObsolete() ? "true" : "false" );
  // dsml:class type
  switch ( schema.getType() ) {
View Full Code Here

    superior = superior + "," + superiors[ i ];
  }
  if ( i > 0 )
      attrList.addAttribute( XML.Schema.Attributes.Superior, "CDATA", superior );
  // dsml:class obsolete
  attrList.addAttribute( XML.Schema.Attributes.Obsolete, null,
             schema.isObsolete() ? "true" : "false" );
  // dsml:class type
  switch ( schema.getType() ) {
  case LDAPObjectClassSchema.STRUCTURAL:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
View Full Code Here

  attrList.addAttribute( XML.Schema.Attributes.Obsolete, null,
             schema.isObsolete() ? "true" : "false" );
  // dsml:class type
  switch ( schema.getType() ) {
  case LDAPObjectClassSchema.STRUCTURAL:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Structural );
      break;
  case LDAPObjectClassSchema.ABSTRACT:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Abstract );
View Full Code Here

  case LDAPObjectClassSchema.STRUCTURAL:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Structural );
      break;
  case LDAPObjectClassSchema.ABSTRACT:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Abstract );
      break;
  case LDAPObjectClassSchema.AUXILIARY:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Auxiliary );
View Full Code Here

  case LDAPObjectClassSchema.ABSTRACT:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Abstract );
      break;
  case LDAPObjectClassSchema.AUXILIARY:
      attrList.addAttribute( XML.Schema.Attributes.Type, null,
           XML.Schema.Attributes.Types.Auxiliary );
      break;
  }

  // dsml:class
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.