public void doImport()
{
FileReader in = null;
LdifIterator list = null;
LdifParser parser = new LdifParserImpl();
JFileChooser chooser = new JFileChooser();
int choice = chooser.showOpenDialog( this );
File selected = chooser.getSelectedFile();
if ( JFileChooser.APPROVE_OPTION != choice )
{
return;
}
try
{
in = new FileReader( selected );
list = new LdifIterator( in );
while ( list.hasNext() )
{
String dif = ( String ) list.next();
LockableAttributesImpl attrs = new LockableAttributesImpl();
parser.parse( attrs, dif );
String updn = ( String ) attrs.get( "dn" ).get();
LdapName ndn =
new LdapName( StringTools.deepTrimToLower( updn ) );
attrs.remove( "dn" );