Examples of LdifContentRecord


Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifContentRecord

            model.addContainer( record );
        }
        else
        {
            // match attr-val-record
            LdifContentRecord record = new LdifContentRecord( dnLine );
            if ( dnErrorToken != null )
            {
                record.addInvalid( new LdifInvalidPart( dnErrorToken.getOffset(), dnErrorToken.getValue() ) );
            }
            for ( int i = 0; i < commentLines.length; i++ )
            {
                record.addComment( commentLines[i] );
            }
            parseAttrValRecord( record );
            model.addContainer( record );
        }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifContentRecord

                    {
                        LdifContainer container = enumeration.next( monitor );
                        if ( container instanceof LdifContentRecord )
                        {

                            LdifContentRecord record = ( LdifContentRecord ) container;
                            DN dn = new DN( record.getDnLine().getValueAsString() );

                            // get entry from cache or create it
                            IEntry entry = connection.getEntryFromCache( dn );
                            if ( entry == null )
                            {
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ldif.container.LdifContentRecord

            {
                LdifContainer container = enumeration.next( monitor );

                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord record = ( LdifContentRecord ) container;
                    recordToHSSFRow( connection, record, sheet, headerRow, attributeNameMap, valueDelimiter, binaryEncoding,
                        exportDn );

                    count++;
                    monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__export_progress,
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord

            {
                LdifContainer container = enumeration.next( monitor );

                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord record = ( LdifContentRecord ) container;
                    LdifDnLine dnLine = record.getDnLine();
                    LdifAttrValLine[] attrValLines = record.getAttrVals();
                    LdifSepLine sepLine = record.getSepLine();

                    // sort and format
                    Arrays.sort( attrValLines, comparator );
                    LdifContentRecord newRecord = new LdifContentRecord( dnLine );
                    for ( int i = 0; i < attrValLines.length; i++ )
                    {
                        newRecord.addAttrVal( attrValLines[i] );
                    }
                    newRecord.finish( sepLine );
                    String s = newRecord.toFormattedString();

                    // String s = record.toFormattedString();
                    bufferedWriter.write( s );

                    count++;
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContentRecord

                LdifContainer container = enumeration.next( monitor );

                if ( container instanceof LdifContentRecord )
                {

                    LdifContentRecord record = ( LdifContentRecord ) container;
                    bufferedWriter.write( recordToCsv( connection, record, attributes, attributeDelimiter, valueDelimiter,
                        quoteCharacter, lineSeparator, encoding, binaryEncoding, exportDn ) );

                    count++;
                    monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__export_progress,
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

        public LdifContainer next() throws NamingException
        {
            SearchResult sr = enumeration.next();
            LdapDN dn = JNDIUtils.getDn( sr );
            LdifContentRecord record = LdifContentRecord.create( dn.getUpName() );

            NamingEnumeration<? extends Attribute> attributeEnumeration = sr.getAttributes().getAll();
            while ( attributeEnumeration.hasMore() )
            {
                Attribute attribute = attributeEnumeration.next();
                String attributeName = attribute.getID();
                NamingEnumeration<?> valueEnumeration = attribute.getAll();
                while ( valueEnumeration.hasMore() )
                {
                    Object o = valueEnumeration.next();
                    if ( o instanceof String )
                    {
                        record.addAttrVal( LdifAttrValLine.create( attributeName, ( String ) o ) );
                    }
                    if ( o instanceof byte[] )
                    {
                        record.addAttrVal( LdifAttrValLine.create( attributeName, ( byte[] ) o ) );
                    }
                }
            }

            record.finish( LdifSepLine.create() );

            return record;
        }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

                LdifContainer container = enumeration.next();

                if ( container instanceof LdifContentRecord )
                {

                    LdifContentRecord record = ( LdifContentRecord ) container;
                    bufferedWriter.write( recordToCsv( browserConnection, record, attributes, attributeDelimiter,
                        valueDelimiter, quoteCharacter, lineSeparator, encoding, binaryEncoding, exportDn ) );

                    count++;
                    monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__export_progress,
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

            {
                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 );
                    LdifContentRecord newRecord = new LdifContentRecord( dnLine );
                    for ( int i = 0; i < attrValLines.length; i++ )
                    {
                        newRecord.addAttrVal( attrValLines[i] );
                    }
                    newRecord.finish( sepLine );
                    String s = newRecord.toFormattedString( ldifFormatParameters );

                    // String s = record.toFormattedString();
                    bufferedWriter.write( s );

                    count++;
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

            {
                LdifContainer container = enumeration.next();

                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord record = ( LdifContentRecord ) container;
                    recordToOdfRow( browserConnection, record, contentDoc, table, headerRow, attributeNameMap,
                        valueDelimiter, binaryEncoding, exportDn );

                    count++;
                    monitor.reportProgress( BrowserCoreMessages.bind( BrowserCoreMessages.jobs__export_progress,
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.container.LdifContentRecord

        {
            LdifAttrValLine[] attrVals;
            IEntry dummyEntry;
            if ( record instanceof LdifContentRecord )
            {
                LdifContentRecord attrValRecord = ( LdifContentRecord ) record;
                attrVals = attrValRecord.getAttrVals();
                try
                {
                    dummyEntry = ModelConverter.ldifContentRecordToEntry( attrValRecord, browserConnection );
                }
                catch ( InvalidNameException e )
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.