.getBoolean( BrowserCoreConstants.PREFERENCE_LDIF_INCLUDE_VERSION_LINE ) )
{
LdifVersionLine ldifVersionLine = LdifVersionLine.create();
String ldifVersionLineString = ldifVersionLine.toFormattedString( ldifFormatParameters );
bufferedWriter.write( ldifVersionLineString );
LdifSepLine ldifSepLine = LdifSepLine.create();
String ldifSepLineString = ldifSepLine.toFormattedString( ldifFormatParameters );
bufferedWriter.write( ldifSepLineString );
}
// add the records
while ( !monitor.isCanceled() && !monitor.errorsReported() && enumeration.hasNext() )
{
LdifContainer container = enumeration.next();
if ( container instanceof LdifContentRecord )
{
LdifContentRecord record = ( LdifContentRecord ) container;
LdifDnLine dnLine = record.getDnLine();
LdifAttrValLine[] attrValLines = record.getAttrVals();
LdifSepLine sepLine = record.getSepLine();
// sort and format
DummyEntry entry = ModelConverter.ldifContentRecordToEntry( record, browserConnection );
AttributeComparator comparator = new AttributeComparator( entry );
Arrays.sort( attrValLines, comparator );