Package org.apache.directory.shared.ldap.model.schema.parsers

Examples of org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescription


        {
            String desc = value.getString();

            try
            {
                LdapComparatorDescription comparator = C_DESCR_SCHEMA_PARSER.parseComparatorDescription( desc );

                updateSchemas( comparator );
            }
            catch ( ParseException pe )
            {
View Full Code Here


            {
                SchemaObject schemaObject = schemaObjectWrapper.get();

                if ( schemaObject instanceof LdapComparatorDescription )
                {
                    LdapComparatorDescription ldapComparatorDescription = ( LdapComparatorDescription ) schemaObject;
                    Entry lcEntry = getEntry( ldapComparatorDescription );

                    comparatorEntries.add( lcEntry );
                }
            }
View Full Code Here

    @Test
    public void testFqcn() throws ParseException
    {
        String value = null;
        LdapComparatorDescription ldapComparatorDescription = null;

        // FQCN simple
        value = "( 1.1 FQCN org.apache.directory.SimpleComparator )";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getFqcn() );
        assertEquals( "org.apache.directory.SimpleComparator", ldapComparatorDescription.getFqcn() );
    }
View Full Code Here

    @Test
    public void testBytecode() throws ParseException
    {
        String value = null;
        LdapComparatorDescription ldapComparatorDescription = null;

        // FQCN simple p
        value = "( 1.1 FQCN org.apache.directory.SimpleComparator BYTECODE ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789==== )";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
            .getBytecode() );

        // FQCN simple, no spaces
        value = "(1.1 FQCNorg.apache.directory.SimpleComparator BYTECODEABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====)";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
            .getBytecode() );

        // FQCN simple, tabs
        value = "\t(\t1.1\tFQCN\torg.apache.directory.SimpleComparator\tBYTECODE\tABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====\t)\t";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
            .getBytecode() );
    }
View Full Code Here

        // -------------------------------------------------------------------
        // get the subschemaSubentry again
        updateSSSE();

        Attribute attrTypes = subschemaSubentry.get( "comparators" );
        LdapComparatorDescription comparatorDescription = null;

        for ( Value<?> value : attrTypes )
        {
            String desc = value.getString();

            if ( desc.indexOf( oid ) != -1 )
            {
                comparatorDescription = comparatorDescriptionSchemaParser.parseComparatorDescription( desc );
                break;
            }
        }

        if ( isPresent )
        {
            assertNotNull( comparatorDescription );
            assertEquals( oid, comparatorDescription.getOid() );
        }
        else
        {
            assertNull( comparatorDescription );
        }
View Full Code Here

        // check first to see if it is present in the subschemaSubentry
        // -------------------------------------------------------------------

        Attributes attrs = getSubschemaSubentryAttributes();
        Attribute attrTypes = attrs.get( "comparators" );
        LdapComparatorDescription comparatorDescription = null;

        for ( int ii = 0; ii < attrTypes.size(); ii++ )
        {
            String desc = ( String ) attrTypes.get( ii );

            if ( desc.indexOf( oid ) != -1 )
            {
                comparatorDescription = comparatorDescriptionSchemaParser.parseComparatorDescription( desc );
                break;
            }
        }

        if ( isPresent )
        {
            assertNotNull( comparatorDescription );
            assertEquals( oid, comparatorDescription.getOid() );
        }
        else
        {
            assertNull( comparatorDescription );
        }
View Full Code Here

        {
            String desc = value.getString();

            try
            {
                LdapComparatorDescription comparator = C_DESCR_SCHEMA_PARSER.parseComparatorDescription( desc );

                updateSchemas( comparator );
            }
            catch ( ParseException pe )
            {
View Full Code Here

            {
                SchemaObject schemaObject = schemaObjectWrapper.get();

                if ( schemaObject instanceof LdapComparatorDescription )
                {
                    LdapComparatorDescription ldapComparatorDescription = ( LdapComparatorDescription ) schemaObject;
                    Entry lcEntry = getEntry( ldapComparatorDescription );

                    comparatorEntries.add( lcEntry );
                }
            }
View Full Code Here

    @Test
    public void testFqcn() throws ParseException
    {
        String value = null;
        LdapComparatorDescription ldapComparatorDescription = null;

        // FQCN simple
        value = "( 1.1 FQCN org.apache.directory.SimpleComparator )";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getFqcn() );
        assertEquals( "org.apache.directory.SimpleComparator", ldapComparatorDescription.getFqcn() );
    }
View Full Code Here

    @Test
    public void testBytecode() throws ParseException
    {
        String value = null;
        LdapComparatorDescription ldapComparatorDescription = null;

        // FQCN simple p
        value = "( 1.1 FQCN org.apache.directory.SimpleComparator BYTECODE ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789==== )";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
            .getBytecode() );

        // FQCN simple, no spaces
        value = "(1.1 FQCNorg.apache.directory.SimpleComparator BYTECODEABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====)";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
            .getBytecode() );

        // FQCN simple, tabs
        value = "\t(\t1.1\tFQCN\torg.apache.directory.SimpleComparator\tBYTECODE\tABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====\t)\t";
        ldapComparatorDescription = parser.parseComparatorDescription( value );
        assertNotNull( ldapComparatorDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", ldapComparatorDescription
            .getBytecode() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescription

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.