Package org.apache.directory.ldapstudio.browser.core.model.schema

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


     * @return
     *      the LDAP Syntax Description
     */
    private LdapSyntaxDescription getLsd()
    {
        AttributeTypeDescription atd = getAtd();

        if ( atd != null && atd.getSyntaxDescriptionNumericOIDTransitive() != null
            && atd.getSchema().hasLdapSyntaxDescription( atd.getSyntaxDescriptionNumericOIDTransitive() ) )
        {
            return atd.getSchema().getLdapSyntaxDescription( atd.getSyntaxDescriptionNumericOIDTransitive() );
        }

        return null;
    }
View Full Code Here


     */
    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

     * @return
     *      the Equality Matching Rule Description
     */
    private MatchingRuleDescription getEmrd()
    {
        AttributeTypeDescription atd = getAtd();

        if ( atd != null && atd.getEqualityMatchingRuleDescriptionOIDTransitive() != null
            && atd.getSchema().hasMatchingRuleDescription( atd.getEqualityMatchingRuleDescriptionOIDTransitive() ) )
        {
            return atd.getSchema().getMatchingRuleDescription( atd.getEqualityMatchingRuleDescriptionOIDTransitive() );
        }

        return null;
    }
View Full Code Here

     * @return
     *      the Substring Matching Rule Description
     */
    private MatchingRuleDescription getSmrd()
    {
        AttributeTypeDescription atd = getAtd();

        if ( atd != null && atd.getSubstringMatchingRuleDescriptionOIDTransitive() != null
            && atd.getSchema().hasMatchingRuleDescription( atd.getSubstringMatchingRuleDescriptionOIDTransitive() ) )
        {
            return atd.getSchema().getMatchingRuleDescription( atd.getSubstringMatchingRuleDescriptionOIDTransitive() );
        }

        return null;
    }
View Full Code Here

     * @return
     *      the Ordering Matching Rule Description
     */
    private MatchingRuleDescription getOmrd()
    {
        AttributeTypeDescription atd = getAtd();

        if ( atd != null && atd.getOrderingMatchingRuleDescriptionOIDTransitive() != null
            && atd.getSchema().hasMatchingRuleDescription( atd.getOrderingMatchingRuleDescriptionOIDTransitive() ) )
        {
            return atd.getSchema().getMatchingRuleDescription( atd.getOrderingMatchingRuleDescriptionOIDTransitive() );
        }

        return null;
    }
View Full Code Here

                appliesLinks = new Hyperlink[names.length];
                for ( int i = 0; i < names.length; i++ )
                {
                    if ( mrud.getSchema().hasAttributeTypeDescription( names[i] ) )
                    {
                        AttributeTypeDescription appliesAtd = mrud.getSchema().getAttributeTypeDescription( names[i] );
                        appliesLinks[i] = toolkit.createHyperlink( appliesClient, appliesAtd.toString(), SWT.WRAP );
                        appliesLinks[i].setHref( appliesAtd );
                        appliesLinks[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        appliesLinks[i].setUnderlined( true );
                        appliesLinks[i].setEnabled( true );
                        appliesLinks[i].addHyperlinkListener( this );
View Full Code Here

            // return false;
            // }
            AttributeTypeDescription[] mustAtds = this.getSubschema().getMustAttributeTypeDescriptions();
            for ( int i = 0; i < mustAtds.length; i++ )
            {
                AttributeTypeDescription mustAtd = mustAtds[i];
                if ( !ai.attributeMap.containsKey( mustAtd.getNumericOID().toLowerCase() ) )
                    return false;
            }
        }

        return true;
View Full Code Here

        if ( schema == null )
        {
            return description;
        }

        AttributeTypeDescription atd = schema.getAttributeTypeDescription( parsedAttributeType );
        String oidString = atd.getNumericOID();

        if ( !parsedLangList.isEmpty() )
        {
            for ( Iterator it = parsedLangList.iterator(); it.hasNext(); )
            {
View Full Code Here

        {
            return false;
        }

        // check type
        AttributeTypeDescription myAtd = schema.getAttributeTypeDescription( this.getParsedAttributeType() );
        AttributeTypeDescription otherAtd = schema.getAttributeTypeDescription( other.getParsedAttributeType() );
        if ( myAtd != otherAtd )
        {
            AttributeTypeDescription superiorAtd = null;
            String superiorName = myAtd.getSuperiorAttributeTypeDescriptionName();
            while ( superiorName != null )
            {
                superiorAtd = schema.getAttributeTypeDescription( superiorName );
                if ( superiorAtd == otherAtd )
                {
                    break;
                }
                superiorName = superiorAtd.getSuperiorAttributeTypeDescriptionName();
            }
            if ( superiorAtd != otherAtd )
            {
                return false;
            }
View Full Code Here

        {
            return this.userSelectedValueEditor;
        }

        // check attribute preferences
        AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeType );
        Map attributeValueEditorMap = BrowserUIPlugin.getDefault().getUIPreferences().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 = BrowserUIPlugin.getDefault().getUIPreferences().getSyntaxValueEditorMap();
        if ( lsd.getNumericOID() != null && syntaxValueEditorMap.containsKey( lsd.getNumericOID().toLowerCase() ) )
        {
            return ( IValueEditor ) this.class2ValueEditors.get( syntaxValueEditorMap.get( lsd.getNumericOID()
                .toLowerCase() ) );
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.schema.AttributeTypeDescription

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.