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

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


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


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

            if ( superName != null )
            {
                superSection.setText( "Supertype (" + "1" + ")" );
                if ( atd.getSchema().hasAttributeTypeDescription( superName ) )
                {
                    AttributeTypeDescription supAtd = atd.getSchema().getAttributeTypeDescription( superName );
                    superLink = toolkit.createHyperlink( superClient, supAtd.toString(), SWT.WRAP );
                    superLink.setHref( supAtd );
                    superLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                    superLink.setUnderlined( true );
                    superLink.setEnabled( true );
                    superLink.addHyperlinkListener( new HyperlinkAdapter()
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( new HyperlinkAdapter()
View Full Code Here

            attributeSizeText.setText( Utils.formatBytes( bytes ) );

            if ( attribute.getEntry().getConnection().getSchema().hasAttributeTypeDescription(
                attribute.getDescription() ) )
            {
                AttributeTypeDescription atd = attribute.getEntry().getConnection().getSchema()
                    .getAttributeTypeDescription( attribute.getDescription() );

                atdOidText.setText( atd.getNumericOID() );
                String atdNames = Arrays.asList( atd.getNames() ).toString();
                atdNamesText.setText( atdNames.substring( 1, atdNames.length() - 1 ) );
                atdDescText.setText( Utils.getNonNullString( atd.getDesc() ) );
                atdUsageText.setText( Utils.getNonNullString( atd.getUsage() ) );

                singleValuedFlag.setSelection( atd.isSingleValued() );
                noUserModificationFlag.setSelection( atd.isNoUserModification() );
                collectiveFlag.setSelection( atd.isCollective() );
                obsoleteFlag.setSelection( atd.isObsolete() );

                syntaxOidText.setText( Utils.getNonNullString( atd.getSyntaxDescriptionNumericOIDTransitive() ) );
                syntaxDescText.setText( Utils.getNonNullString( atd.getSyntaxDescription().getDesc() ) );
                syntaxLengthText.setText( Utils.getNonNullString( atd.getSyntaxDescriptionLengthTransitive() ) );

                equalityMatchingRuleText.setText( Utils.getNonNullString( atd
                    .getEqualityMatchingRuleDescriptionOIDTransitive() ) );
                substringMatchingRuleText.setText( Utils.getNonNullString( atd
                    .getSubstringMatchingRuleDescriptionOIDTransitive() ) );
                orderingMatchingRuleText.setText( Utils.getNonNullString( atd
                    .getOrderingMatchingRuleDescriptionOIDTransitive() ) );
            }
        }

        return parent;
View Full Code Here

                {
                    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

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

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.