Examples of MatchingRuleDescription


Examples of org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription

         */
        public boolean select( Viewer viewer, Object parentElement, Object element )
        {
            if ( element instanceof MatchingRuleDescription )
            {
                MatchingRuleDescription mrd = ( MatchingRuleDescription ) element;
                boolean matched = SchemaUtils.toString( mrd ).toLowerCase()
                    .indexOf( filterText.getText().toLowerCase() ) != -1
                    || mrd.getNumericOid().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
                return matched;
            }
            return false;
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription

    /**
     * {@inheritDoc}
     */
    public void setInput( Object input )
    {
        MatchingRuleDescription mrd = null;
        if ( input instanceof MatchingRuleDescription )
        {
            mrd = ( MatchingRuleDescription ) input;
        }

        // create main content
        createMainContent( mrd );

        // set flag
        isObsoleteText.setEnabled( mrd != null && mrd.isObsolete() );

        // set syntax content
        String lsdOid = null;
        LdapSyntaxDescription lsd = null;
        if ( mrd != null )
        {
            Schema schema = getSchema();
            lsdOid = mrd.getSyntax();
            if ( lsdOid != null && schema.hasLdapSyntaxDescription( lsdOid ) )
            {
                lsd = schema.getLdapSyntaxDescription( lsdOid );
            }
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription

            nameLink = toolkit.createHyperlink( mainClient, "", SWT.WRAP );
            nameLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
            nameLink.addHyperlinkListener( this );

            Schema schema = getSchema();
            MatchingRuleDescription mrd = schema.hasMatchingRuleDescription( mrud.getNumericOid() ) ? schema
                .getMatchingRuleDescription( mrud.getNumericOid() ) : null;
            nameLink
                .setText( getNonNullString( mrd != null ? SchemaUtils.toString( mrd ) : SchemaUtils.toString( mrud ) ) );
            nameLink.setHref( mrd );
            nameLink.setUnderlined( mrd != null );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription

                }
                else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULES ) )
                {
                    MatchingRuleDescriptionSchemaParser parser = new MatchingRuleDescriptionSchemaParser();
                    parser.setQuirksMode( true );
                    MatchingRuleDescription mrd = parser.parseMatchingRuleDescription( value );
                    mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                    addMatchingRuleDescription( mrd );
                }
                else if ( attributeName.equalsIgnoreCase( Schema.SCHEMA_ATTRIBUTE_MATCHINGRULEUSE ) )
                {
                    MatchingRuleUseDescriptionSchemaParser parser = new MatchingRuleUseDescriptionSchemaParser();
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription

            return DEFAULT_SCHEMA.getMatchingRuleDescription( nameOrOid );
        }
        else
        {
            // DUMMY
            MatchingRuleDescription mrd = new MatchingRuleDescription();
            mrd.setNumericOid( nameOrOid );
            mrd.setExtensions( DUMMY_EXTENSIONS );
            return mrd;
        }
    }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription

        lengthText.setText( getNonNullString( lsdLength ) );
        syntaxSection.layout();

        // set matching rules content
        String emrOid = null;
        MatchingRuleDescription emr = null;
        if ( atd != null )
        {
            emrOid = atd.getEqualityMatchingRuleDescriptionOIDTransitive();
            if ( emrOid != null && atd.getSchema().hasMatchingRuleDescription( emrOid ) )
            {
                emr = atd.getSchema().getMatchingRuleDescription( emrOid );
            }
        }
        equalityLink.setText( getNonNullString( emr != null ? emr.toString() : emrOid ) );
        equalityLink.setHref( emr );
        equalityLink.setUnderlined( emr != null );
        equalityLink.setEnabled( emr != null );

        String smrOid = null;
        MatchingRuleDescription smr = null;
        if ( atd != null )
        {
            smrOid = atd.getSubstringMatchingRuleDescriptionOIDTransitive();
            if ( smrOid != null && atd.getSchema().hasMatchingRuleDescription( smrOid ) )
            {
                smr = atd.getSchema().getMatchingRuleDescription( smrOid );
            }
        }
        substringLink.setText( getNonNullString( smr != null ? smr.toString() : smrOid ) );
        substringLink.setHref( smr );
        substringLink.setUnderlined( smr != null );
        substringLink.setEnabled( smr != null );

        String omrOid = null;
        MatchingRuleDescription omr = null;
        if ( atd != null )
        {
            omrOid = atd.getOrderingMatchingRuleDescriptionOIDTransitive();
            if ( omrOid != null && atd.getSchema().hasMatchingRuleDescription( omrOid ) )
            {
                omr = atd.getSchema().getMatchingRuleDescription( omrOid );
            }
        }
        orderingLink.setText( getNonNullString( omr != null ? omr.toString() : omrOid ) );
        orderingLink.setHref( omr );
        orderingLink.setUnderlined( omr != null );
        orderingLink.setEnabled( omr != null );
        matchingRulesSection.layout();
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription

                otherMatchLinks = new Hyperlink[names.length];
                for ( int i = 0; i < names.length; i++ )
                {
                    if ( atd.getSchema().hasMatchingRuleDescription( names[i] ) )
                    {
                        MatchingRuleDescription mrd = atd.getSchema().getMatchingRuleDescription( names[i] );
                        otherMatchLinks[i] = toolkit.createHyperlink( otherMatchClient, mrd.toString(), SWT.WRAP );
                        otherMatchLinks[i].setHref( mrd );
                        otherMatchLinks[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        otherMatchLinks[i].setUnderlined( true );
                        otherMatchLinks[i].setEnabled( true );
                        otherMatchLinks[i].addHyperlinkListener( this );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription

    }


    public final MatchingRuleDescription matchingRuleDescription() throws RecognitionException, TokenStreamException
    {
        MatchingRuleDescription mrd = new MatchingRuleDescription();

        Token oid = null;
        Token name = null;
        Token desc = null;
        Token syntax = null;

        {
            oid = LT( 1 );
            match( STARTNUMERICOID );
            mrd.setNumericOID( oid.getText() );
        }
        {
            _loop124: do
            {
                switch ( LA( 1 ) )
                {
                    case NAME:
                    {
                        {
                            name = LT( 1 );
                            match( NAME );
                            mrd.setNames( qdescrs( name.getText() ) );
                        }
                        break;
                    }
                    case DESC:
                    {
                        {
                            desc = LT( 1 );
                            match( DESC );
                            mrd.setDesc( qdstring( desc.getText() ) );
                        }
                        break;
                    }
                    case OBSOLETE:
                    {
                        {
                            match( OBSOLETE );
                            mrd.setObsolete( true );
                        }
                        break;
                    }
                    case SYNTAX:
                    {
                        {
                            syntax = LT( 1 );
                            match( SYNTAX );
                            mrd.setSyntaxDescriptionNumericOID( syntax.getText() );
                        }
                        break;
                    }
                    default:
                    {
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription

            toolkit.createLabel( mainClient, "Matching rule names:", SWT.NONE );
            nameLink = toolkit.createHyperlink( mainClient, "", SWT.WRAP );
            nameLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
            nameLink.addHyperlinkListener( this );

            MatchingRuleDescription mrd = mrud.getSchema().hasMatchingRuleDescription( mrud.getNumericOID() ) ? mrud
                .getSchema().getMatchingRuleDescription( mrud.getNumericOID() ) : null;
            nameLink.setText( getNonNullString( mrd != null ? mrd.toString() : mrud.toString() ) );
            nameLink.setHref( mrd );
            nameLink.setUnderlined( mrd != null );
            nameLink.setEnabled( mrd != null );

            toolkit.createLabel( mainClient, "Descripton:", SWT.NONE );
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription

    /**
     * {@inheritDoc}
     */
    public void setInput( Object input )
    {
        MatchingRuleDescription mrd = null;
        if ( input instanceof MatchingRuleDescription )
        {
            mrd = ( MatchingRuleDescription ) input;
        }

        // create main content
        createMainContent( mrd );

        // set flag
        isObsoleteText.setEnabled( mrd != null && mrd.isObsolete() );

        // set syntax content
        String lsdOid = null;
        LdapSyntaxDescription lsd = null;
        if ( mrd != null )
        {
            lsdOid = mrd.getSyntaxDescriptionNumericOID();
            if ( lsdOid != null && mrd.getSchema().hasLdapSyntaxDescription( lsdOid ) )
            {
                lsd = mrd.getSchema().getLdapSyntaxDescription( lsdOid );
            }
        }
        syntaxLink.setText( getNonNullString( lsd != null ? lsd.getNumericOID() : lsdOid ) );
        syntaxLink.setHref( lsd );
        syntaxLink.setUnderlined( lsd != null );
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.