Examples of LdapSyntaxDescription


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

                return ( IValueEditor ) this.class2ValueEditors.get( attributeValueEditorMap.get( name.toLowerCase() ) );
            }
        }

        // check syntax preferences
        LdapSyntaxDescription lsd = atd.getSyntaxDescription();
        Map<String, String> syntaxValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
            .getSyntaxValueEditorMap();
        if ( lsd.getNumericOID() != null && syntaxValueEditorMap.containsKey( lsd.getNumericOID().toLowerCase() ) )
        {
            return ( IValueEditor ) this.class2ValueEditors.get( syntaxValueEditorMap.get( lsd.getNumericOID()
                .toLowerCase() ) );
        }

        // return default
        if ( lsd.isBinary() )
        {
            return this.defaultBinaryValueEditor;
        }
        else
        {
View Full Code Here

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

        noUserModificationText.setEnabled( atd != null && atd.isNoUserModification() );
        flagSection.layout();

        // set syntax content
        String lsdOid = null;
        LdapSyntaxDescription lsd = null;
        String lsdLength = null;
        if ( atd != null )
        {
            lsdOid = atd.getSyntaxDescriptionNumericOIDTransitive();
            if ( lsdOid != null && atd.getSchema().hasLdapSyntaxDescription( lsdOid ) )
            {
                lsd = atd.getSchema().getLdapSyntaxDescription( lsdOid );
            }
            lsdLength = atd.getSyntaxDescriptionLengthTransitive();
        }
        syntaxLink.setText( getNonNullString( lsd != null ? lsd.getNumericOID() : lsdOid ) );
        syntaxLink.setHref( lsd );
        syntaxLink.setUnderlined( lsd != null );
        syntaxLink.setEnabled( lsd != null );
        syntaxDescText.setText( getNonNullString( lsd != null ? lsd.getDesc() : null ) );
        lengthText.setText( getNonNullString( lsdLength ) );
        syntaxSection.layout();

        // set matching rules content
        String emrOid = null;
View Full Code Here

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

            SchemaParser parser = new SchemaParser( mainLexer );
            // ObjectClassDescription d = parser.objectClassDescription();
            // AttributeTypeDescription d =
            // parser.attributeTypeDescription();
            LdapSyntaxDescription d = parser.syntaxDescription();
            // MatchingRuleDescription d = parser.matchingRuleDescription();
            // MatchingRuleUseDescription d =
            // parser.matchingRuleUseDescription();
            System.out.println( d.toString() );
        }
        catch ( Exception e )
        {
            System.err.println( "exception: " + e );
            e.printStackTrace();
View Full Code Here

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

    }


    public final LdapSyntaxDescription syntaxDescription() throws RecognitionException, TokenStreamException
    {
        LdapSyntaxDescription lsd = new LdapSyntaxDescription();

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

        {
            oid = LT( 1 );
            match( STARTNUMERICOID );
            lsd.setNumericOID( oid.getText() );
        }
        {
            _loop116: do
            {
                switch ( LA( 1 ) )
                {
                    case DESC:
                    {
                        {
                            desc = LT( 1 );
                            match( DESC );
                            lsd.setDesc( qdstring( desc.getText() ) );
                        }
                        break;
                    }
                    case NAME:
                    {
                        {
                            name = LT( 1 );
                            match( NAME );
                            lsd.setDesc( qdstring( name.getText() ) );
                        }
                        break;
                    }
                    default:
                    {
View Full Code Here

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

                {
                    if ( relation.getSyntaxOID() != null )
                    {
                        if ( syntaxOid2LsdMap.containsKey( relation.getSyntaxOID() ) )
                        {
                            LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( relation
                                .getSyntaxOID() );
                            return lsd.toString();
                        }
                    }
                }
                else if ( index == 2 )
                {
View Full Code Here

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

        // 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 );
        syntaxLink.setEnabled( lsd != null );
        syntaxDescText.setText( getNonNullString( lsd != null ? lsd.getDesc() : null ) );
        syntaxSection.layout();

        // create contents of dynamic sections
        createUsedFromContents( mrd );
        createRawContents( mrd );
View Full Code Here

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

                {
                    if ( syntax.getSyntaxNumericOid() != null )
                    {
                        if ( syntaxOid2LsdMap.containsKey( syntax.getSyntaxNumericOid() ) )
                        {
                            LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( syntax
                                .getSyntaxNumericOid() );
                            return lsd.toString();
                        }
                    }
                }
            }
            return null;
View Full Code Here

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

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

View Full Code Here

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

         */
        public boolean select( Viewer viewer, Object parentElement, Object element )
        {
            if ( element instanceof LdapSyntaxDescription )
            {
                LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) element;
                boolean matched = false;

                if ( !matched )
                    matched = lsd.toString().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;
                if ( !matched )
                    matched = lsd.getNumericOID().toLowerCase().indexOf( filterText.getText().toLowerCase() ) != -1;

                return matched;
            }
            return false;
        }
View Full Code Here

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

                    .toLowerCase() ) );
            }
        }

        // check syntax preferences
        LdapSyntaxDescription lsd = atd.getSyntaxDescription();
        Map syntaxValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
            .getSyntaxValueEditorMap();
        if ( lsd.getNumericOID() != null && syntaxValueEditorMap.containsKey( lsd.getNumericOID().toLowerCase() ) )
        {
            return ( IValueEditor ) this.class2ValueEditors.get( syntaxValueEditorMap.get( lsd.getNumericOID()
                .toLowerCase() ) );
        }

        // return default
        if ( lsd.isBinary() )
        {
            return this.defaultBinaryValueEditor;
        }
        else
        {
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.