Examples of ObjectClassDescription


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

        IAttribute ocAttribute = ( IAttribute ) attributeMap.get( IAttribute.OBJECTCLASS_ATTRIBUTE.toLowerCase() );
        String[] ocValues = ocAttribute.getStringValues();
        boolean structuralObjectClassAvailable = false;
        for ( int i = 0; i < ocValues.length; i++ )
        {
            ObjectClassDescription ocd = this.getConnection().getSchema().getObjectClassDescription( ocValues[i] );
            if ( ocd.isStructural() )
            {
                structuralObjectClassAvailable = true;
                break;
            }
        }
View Full Code Here

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

                .toLowerCase() );
            String[] ocValues = ocAttribute.getStringValues();
            boolean structuralObjectClassAvailable = false;
            for ( int i = 0; i < ocValues.length; i++ )
            {
                ObjectClassDescription ocd = this.getConnection().getSchema().getObjectClassDescription( ocValues[i] );
                if ( ocd.isStructural() )
                {
                    structuralObjectClassAvailable = true;
                    break;
                }
            }
View Full Code Here

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

        String displayValue = value.getStringValue();

        if ( !showRawValues() && !"".equals( displayValue ) ) //$NON-NLS-1$
        {
            Schema schema = value.getAttribute().getEntry().getBrowserConnection().getSchema();
            ObjectClassDescription ocd = schema.getObjectClassDescription( displayValue );
            switch ( ocd.getKind() )
            {
                case STRUCTURAL:
                    displayValue = displayValue + Messages.getString( "ObjectClassValueEditor.Structural" ); //$NON-NLS-1$
                    break;
                case ABSTRACT:
                    displayValue = displayValue + Messages.getString( "ObjectClassValueEditor.Abstract" ); //$NON-NLS-1$
                    break;
                case AUXILIARY:
                    displayValue = displayValue + Messages.getString( "ObjectClassValueEditor.Auxiliary" ); //$NON-NLS-1$
                    break;
            }
            if ( ocd.isObsolete() )
            {
                displayValue = displayValue + Messages.getString( "ObjectClassValueEditor.Obsolete" ); //$NON-NLS-1$
            }
        }
View Full Code Here

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

        {
            String[] ocNames = ocAttribute.getStringValues();
            Schema schema = getBrowserConnection().getSchema();
            for ( String ocName : ocNames )
            {
                ObjectClassDescription ocd = schema.getObjectClassDescription( ocName );
                ocds.add( ocd );
            }
        }
        return ocds;
    }
View Full Code Here

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

                String[] ocNumericOids = objectClassIconPair.getOcNumericOids();
                for ( String ocNumericOid : ocNumericOids )
                {
                    if ( numericOids.contains( ocNumericOid ) )
                    {
                        ObjectClassDescription ocd = schema.getObjectClassDescription( ocNumericOid );
                        if ( ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL )
                        {
                            weight += 3;
                        }
                        else if ( ocd.getKind() == ObjectClassTypeEnum.AUXILIARY )
                        {
                            weight += 2;
                        }
                    }
                }
View Full Code Here

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

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

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

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

View Full Code Here

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

                supClient.setLayout( gl );
                for ( String name : names )
                {
                    if ( getSchema().hasObjectClassDescription( name ) )
                    {
                        ObjectClassDescription supOcd = getSchema().getObjectClassDescription( name );
                        Hyperlink superLink = toolkit.createHyperlink( supClient, SchemaUtils.toString( supOcd ),
                            SWT.WRAP );
                        superLink.setHref( supOcd );
                        superLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        superLink.setUnderlined( true );
View Full Code Here

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

                String[] ocNumericOids = objectClassIconPair.getOcNumericOids();
                for ( String ocNumericOid : ocNumericOids )
                {
                    if ( numericOids.contains( ocNumericOid ) )
                    {
                        ObjectClassDescription ocd = schema.getObjectClassDescription( ocNumericOid );
                        if ( ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL )
                        {
                            weight += 3;
                        }
                        else if ( ocd.getKind() == ObjectClassTypeEnum.AUXILIARY )
                        {
                            weight += 2;
                        }
                    }
                }
View Full Code Here

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

    {
        if ( schema != null )
        {
            for ( String possibleObjectClass : possibleObjectClasses.keySet() )
            {
                ObjectClassDescription description = possibleObjectClasses.get( possibleObjectClass );
                if ( possibleObjectClass.toUpperCase().startsWith( objectClass.toUpperCase() ) )
                {
                    String replacementString = possibleObjectClass;
                    String displayString = possibleObjectClass;
                    if ( displayString.equals( description.getNumericOid() ) )
                    {
                        displayString += " (" + SchemaUtils.toString( description ) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
                    }
                    else
                    {
                        displayString += " (" + description.getNumericOid() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
                    }

                    ICompletionProposal proposal = new CompletionProposal( replacementString, offset, objectClass
                        .length(), replacementString.length(), getObjectClassImage(), displayString, null, SchemaUtils
                        .getLdifLine( schema.getObjectClassDescription( possibleObjectClass ) ) );
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.