Examples of LdifAttrValLine


Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine


    public static LdifAttrValLine valueToLdifAttrValLine( IValue value )
    {

        LdifAttrValLine line;
        if ( value.isString() )
        {
            line = LdifAttrValLine.create( value.getAttribute().getDescription(), value.getStringValue() );
        }
        else
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

            value1 = ( IValue ) o1;
            attribute1 = value1.getAttribute();
        }
        else if ( o1 instanceof LdifAttrValLine )
        {
            LdifAttrValLine line1 = ( LdifAttrValLine ) o1;
            value1 = ModelConverter.ldifAttrValLineToValue( line1, dummyEntry );
            attribute1 = value1.getAttribute();
        }

        IAttribute attribute2 = null;
        IValue value2 = null;
        if ( o2 instanceof IAttribute )
        {
            attribute2 = ( IAttribute ) o2;
        }
        else if ( o2 instanceof IValue )
        {
            value2 = ( IValue ) o2;
            attribute2 = value2.getAttribute();
        }
        else if ( o2 instanceof LdifAttrValLine )
        {
            LdifAttrValLine line2 = ( LdifAttrValLine ) o2;
            value2 = ModelConverter.ldifAttrValLineToValue( line2, dummyEntry );
            attribute2 = value2.getAttribute();
        }

        if ( value1 != null && value2 != null )
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

        setDn( new LdapDN( schemaRecord.getDnLine().getValueAsString() ) );

        LdifAttrValLine[] lines = schemaRecord.getAttrVals();
        for ( int i = 0; i < lines.length; i++ )
        {
            LdifAttrValLine line = lines[i];
            String attributeName = line.getUnfoldedAttributeDescription();
            String value = line.getValueAsString();
            List<String> ldifValues = new ArrayList<String>( 1 );
            ldifValues.add( value );

            try
            {
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

            }

            // AttrValLine
            else if ( element instanceof LdifAttrValLine )
            {
                LdifAttrValLine line = ( LdifAttrValLine ) element;
                return Utils.getShortenedString( line.getValueAsString(), 20 );
            }

            else
            {
                return "";
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

                            Object element = it.next();

                            if ( element instanceof LdifAttrValLine )
                            {
                                // select the value
                                LdifAttrValLine line = ( LdifAttrValLine ) element;
                                for ( int a = 0; a < attributes.length; a++ )
                                {
                                    IAttribute attribute = attributes[a];
                                    if ( attribute.getDescription().equals( line.getUnfoldedAttributeDescription() ) )
                                    {
                                        IValue[] values = attribute.getValues();
                                        for ( int v = 0; v < values.length; v++ )
                                        {
                                            IValue value = values[v];
                                            if ( value.getStringValue().equals( line.getValueAsString() ) )
                                            {
                                                selectionList.add( value );
                                            }
                                        }
                                    }
                                }
                            }
                            else if ( element instanceof List )
                            {
                                // select attribute and all values
                                List list = ( List ) element;
                                if ( !list.isEmpty() && list.get( 0 ) instanceof LdifAttrValLine )
                                {
                                    LdifAttrValLine line = ( LdifAttrValLine ) list.get( 0 );
                                    for ( int a = 0; a < attributes.length; a++ )
                                    {
                                        IAttribute attribute = attributes[a];
                                        if ( attribute.getDescription().equals(
                                            line.getUnfoldedAttributeDescription() ) )
                                        {
                                            selectionList.add( attribute );
                                            selectionList.addAll( Arrays.asList( attribute.getValues() ) );
                                        }
                                    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

        this.setDn( new LdapDN( schemaRecord.getDnLine().getValueAsString() ) );

        LdifAttrValLine[] lines = schemaRecord.getAttrVals();
        for ( int i = 0; i < lines.length; i++ )
        {
            LdifAttrValLine line = lines[i];
            String attributeName = line.getUnfoldedAttributeDescription();
            String value = line.getValueAsString();

            SchemaLexer lexer = new SchemaLexer( new StringReader( value ) );
            SchemaParser parser = new SchemaParser( lexer );

            try
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

                String rawAttributeDescription = prefix;
                String rawValueType = "";

                if ( part instanceof LdifAttrValLine )
                {
                    LdifAttrValLine line = ( LdifAttrValLine ) part;
                    rawAttributeDescription = line.getRawAttributeDescription();
                    rawValueType = line.getRawValueType();
                }

                if ( offset <= part.getOffset() + rawAttributeDescription.length() )
                {
                    Schema schema = editor.getConnection() != null ? editor.getConnection().getSchema()
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

        for ( int i = 0; i < parts.length; i++ )
        {
            if ( parts[i] instanceof LdifAttrValLine )
            {
                LdifAttrValLine line = ( LdifAttrValLine ) parts[i];
                String attributeName = line.getUnfoldedAttributeDescription();
                Object value = line.getValueAsObject();
                IAttribute attribute = entry.getAttribute( attributeName );
                if ( attribute == null )
                {
                    attribute = new Attribute( entry, attributeName );
                    entry.addAttribute( attribute );
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine


    public static LdifAttrValLine valueToLdifAttrValLine( IValue value )
    {

        LdifAttrValLine line;
        if ( value.isString() )
        {
            line = LdifAttrValLine.create( value.getAttribute().getDescription(), value.getStringValue() );
        }
        else
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.model.lines.LdifAttrValLine

        mrudParser.setQuirksMode( true );

        LdifAttrValLine[] lines = schemaRecord.getAttrVals();
        for ( int i = 0; i < lines.length; i++ )
        {
            LdifAttrValLine line = lines[i];
            String attributeName = line.getUnfoldedAttributeDescription();
            String value = line.getValueAsString();
            List<String> ldifValues = new ArrayList<String>( 1 );
            ldifValues.add( value );

            try
            {
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.