Package org.apache.directory.studio.ldapbrowser.core.model.ldif.container

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


            AttributeComparator comparator = new AttributeComparator( connection );
            LdifEnumeration enumeration = connection.exportLdif( searchParameter, monitor );
            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
            {
                LdifContainer container = enumeration.next( monitor );

                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord record = ( LdifContentRecord ) container;
                    LdifDnLine dnLine = record.getDnLine();
View Full Code Here


    public static LdifContainer getContainer( LdifFile model, int offset )
    {
        if ( model == null || offset < 0 )
            return null;

        LdifContainer container = null;
        LdifContainer[] containers = model.getContainers();
        if ( containers.length > 0 )
        {
            for ( int i = 0; i < containers.length; i++ )
            {
View Full Code Here

        // adjust offset of folling containers
        int adjust = insertLength - removeLength;
        for ( int i = index + newContainers.length; i < this.containerList.size(); i++ )
        {
            LdifContainer container = ( LdifContainer ) this.containerList.get( i );
            container.adjustOffset( adjust );
        }

    }
View Full Code Here

        {

            LdifEnumeration enumeration = connection.exportLdif( searchParameter, monitor );
            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
            {
                LdifContainer container = enumeration.next( monitor );

                if ( container instanceof LdifContentRecord )
                {

                    LdifContentRecord record = ( LdifContentRecord ) container;
View Full Code Here

        {
            LdifParser parser = new LdifParser();
            LdifEnumeration enumeration = parser.parse( reader );
            if ( enumeration.hasNext( null ) )
            {
                LdifContainer container = enumeration.next( null );
                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord schemaRecord = ( LdifContentRecord ) container;
                    this.parseSchemaRecord( schemaRecord );
                }
View Full Code Here

        {

            LdifEnumeration enumeration = connection.exportLdif( searchParameter, monitor );
            while ( !monitor.isCanceled() && enumeration.hasNext( monitor ) )
            {
                LdifContainer container = enumeration.next( monitor );

                if ( container instanceof LdifContentRecord )
                {
                    LdifContentRecord record = ( LdifContentRecord ) container;
                    recordToHSSFRow( connection, record, sheet, headerRow, attributeNameMap, valueDelimiter, binaryEncoding,
View Full Code Here

        {
            if ( this.editor != null )
            {

                int offset = sourceViewer.getDocument().getLineOffset( lineNumber );
                LdifContainer container = LdifFile.getContainer( this.editor.getLdifModel(), offset );
                if ( container != null )
                {
                    LdifPart part = LdifFile.getContainerContent( container, offset );
                    if ( part != null )
                    {
                        // return container.getClass().getName() + " - " +
                        // part.getClass().getName();
                        return container.getInvalidString() + " - " + part.getInvalidString();
                    }
                }
            }
        }
        catch ( BadLocationException e )
View Full Code Here

    {

        if ( this.editor != null )
        {

            LdifContainer container = LdifFile.getContainer( this.editor.getLdifModel(), hoverRegion.getOffset() );
            if ( container != null )
            {
                LdifPart part = LdifFile.getContainerContent( container, hoverRegion.getOffset() );
                if ( part != null )
                {
View Full Code Here

            List positionList = new ArrayList();

            LdifContainer[] containers = model.getContainers();
            for ( int i = 0; i < containers.length; i++ )
            {
                LdifContainer container = containers[i];

                // LdifPart errorPart = null;
                int errorOffset = -1;
                int errorLength = -1;
                StringBuffer errorText = null;

                LdifPart[] parts = container.getParts();
                for ( int k = 0; k < parts.length; k++ )
                {
                    LdifPart part = parts[k];
                    if ( !part.isValid() )
                    {
                        if ( errorOffset == -1 )
                        {
                            // errorPart = part;
                            errorOffset = part.getOffset();
                            errorLength = part.getLength();
                            errorText = new StringBuffer();
                            errorText.append( part.toRawString() );
                        }
                        else
                        {
                            errorLength += part.getLength();
                            errorText.append( part.toRawString() );
                        }
                    }
                }

                if ( errorOffset == -1 && !container.isValid() )
                {
                    errorOffset = container.getOffset();
                    errorLength = container.getLength();
                    errorText = new StringBuffer();
                    errorText.append( container.toRawString() );
                }

                if ( errorOffset > -1 )
                {
                    // Annotation annotation = new Annotation("DEFAULT",
View Full Code Here

        if ( ENABLE_FOLDING )
        {
            for ( int i = 0; i < containers.length; i++ )
            {
                LdifContainer container = containers[i];
                int containerStartLine = document.getLineOfOffset( container.getOffset() );
                int containerEndLine = -1;
                LdifPart[] parts = container.getParts();
                for ( int j = parts.length - 1; j >= 0; j-- )
                {
                    if ( containerEndLine == -1
                        && ( !( parts[j] instanceof LdifSepLine ) || ( container instanceof LdifCommentContainer && j < parts.length - 1 ) ) )
                    {
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.ldif.container.LdifContainer

Copyright © 2018 www.massapicom. 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.