Examples of AttributeTypeDescription


Examples of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeTypeDescription

        {
            return this.userSelectedValueEditor;
        }

        // check attribute preferences
        AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeType );
        Map attributeValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences().getAttributeValueEditorMap();
        if ( atd.getNumericOID() != null && attributeValueEditorMap.containsKey( atd.getNumericOID().toLowerCase() ) )
        {
            return ( IValueEditor ) this.class2ValueEditors.get( attributeValueEditorMap.get( atd.getNumericOID()
                .toLowerCase() ) );
        }
        String[] names = atd.getNames();
        for ( int i = 0; i < names.length; i++ )
        {
            if ( attributeValueEditorMap.containsKey( names[i].toLowerCase() ) )
            {
                return ( IValueEditor ) this.class2ValueEditors.get( attributeValueEditorMap.get( names[i]
                    .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() ) );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeTypeDescription

     */
    public IValueEditor[] getAlternativeValueEditors( Schema schema, String attributeName )
    {
        List<IValueEditor> alternativeList = new ArrayList<IValueEditor>();

        AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeName );

        if ( atd.getSyntaxDescription().isBinary() )
        {
            alternativeList.add( this.defaultBinaryValueEditor );
            alternativeList.add( this.defaultStringSingleLineValueEditor );
            alternativeList.add( this.defaultStringMultiLineValueEditor );
        }
        else if ( atd.getSyntaxDescription().isString() )
        {
            alternativeList.add( this.defaultStringSingleLineValueEditor );
            alternativeList.add( this.defaultStringMultiLineValueEditor );
            alternativeList.add( this.defaultBinaryValueEditor );
        }
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeTypeDescription

                {
                    if ( relation.getAttributeNumericOidOrType() != null )
                    {
                        if ( attributeTypes2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeTypes2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            String s = atd.getNumericOID();
                            for ( int i = 0; i < atd.getNames().length; i++ )
                            {
                                if ( !relation.getAttributeNumericOidOrType().equals( atd.getNames()[i] ) )
                                {
                                    s += ", " + atd.getNames()[i];
                                }
                            }
                            return s;
                        }
                        else if ( attributeOid2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeOid2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            return atd.toString();
                        }
                    }
                }
                else if ( index == 2 )
                {
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeTypeDescription

                {
                    if ( attribute.getAttributeNumericOidOrName() != null )
                    {
                        if ( attributeNames2AtdMap.containsKey( attribute.getAttributeNumericOidOrName() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeNames2AtdMap
                                .get( attribute.getAttributeNumericOidOrName() );
                            String s = atd.getNumericOID();
                            for ( int i = 0; i < atd.getNames().length; i++ )
                            {
                                if ( !attribute.getAttributeNumericOidOrName().equals( atd.getNames()[i] ) )
                                {
                                    s += ", " + atd.getNames()[i];
                                }
                            }
                            return s;
                        }
                        else if ( attributeOid2AtdMap.containsKey( attribute.getAttributeNumericOidOrName() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeOid2AtdMap
                                .get( attribute.getAttributeNumericOidOrName() );
                            return atd.toString();
                        }
                    }
                }
            }
            return null;
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription

                }

                // validate if value is allowed
                IEntry entry = value.getAttribute().getEntry();
                Collection<AttributeTypeDescription> allAtds = SchemaUtils.getAllAttributeTypeDescriptions( entry );
                AttributeTypeDescription atd = value.getAttribute().getAttributeTypeDescription();
                if ( !allAtds.contains( atd ) )
                {
                    message.append( NLS.bind( Messages.getString( "OpenBestEditorAction.AttributeNotInSubSchema" ), //$NON-NLS-1$
                        value.getAttribute().getDescription() ) );
                    message.append( BrowserCoreConstants.LINE_SEPARATOR );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription

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

Examples of org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription

    private LdapSyntaxDescription getLsd()
    {
        if ( getConnection() != null )
        {
            Schema schema = getConnection().getSchema();
            AttributeTypeDescription atd = getAtd();

            if ( atd != null && SchemaUtils.getSyntaxNumericOidTransitive( atd, schema ) != null
                && schema.hasLdapSyntaxDescription( SchemaUtils.getSyntaxNumericOidTransitive( atd, schema ) ) )
            {
                return schema.getLdapSyntaxDescription( SchemaUtils.getSyntaxNumericOidTransitive( atd, schema ) );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription

     */
    private AttributeTypeDescription getAtd()
    {
        if ( ( getSelectedValues().length + getSelectedAttributes().length ) + getSelectedAttributeHierarchies().length == 1 )
        {
            AttributeTypeDescription atd = null;
            if ( getSelectedValues().length == 1 )
            {
                atd = getSelectedValues()[0].getAttribute().getAttributeTypeDescription();
            }
            else if ( getSelectedAttributes().length == 1 )
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription

    private MatchingRuleDescription getEmrd()
    {
        if ( getConnection() != null )
        {
            Schema schema = getConnection().getSchema();
            AttributeTypeDescription atd = getAtd();
            if ( atd != null
                && SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( atd, schema ) != null
                && schema.hasLdapSyntaxDescription( SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( atd,
                    schema ) ) )
            {
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription

    private MatchingRuleDescription getSmrd()
    {
        if ( getConnection() != null )
        {
            Schema schema = getConnection().getSchema();
            AttributeTypeDescription atd = getAtd();
            if ( atd != null
                && SchemaUtils.getSubstringMatchingRuleNameOrNumericOidTransitive( atd, schema ) != null
                && schema.hasLdapSyntaxDescription( SchemaUtils.getSubstringMatchingRuleNameOrNumericOidTransitive(
                    atd, schema ) ) )
            {
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.