Examples of ObjectClassDescription


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

            {
                String[] ocValues = ocAttribute.getStringValues();
                for ( int i = 0; i < ocValues.length; i++ )
                {
                    String ocValue = ocValues[i];
                    ObjectClassDescription ocd = wizard.getSelectedConnection().getSchema().getObjectClassDescription(
                        ocValue );
                    availableObjectClasses.remove( ocd );
                    selectedObjectClasses.add( ocd );
                }
            }
View Full Code Here

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

            {
                ocAttribute.deleteValue( values[i] );
            }
            for ( Iterator<ObjectClassDescription> it = selectedObjectClasses.iterator(); it.hasNext(); )
            {
                ObjectClassDescription ocd = it.next();
                ocAttribute.addValue( new Value( ocAttribute, ocd.getNames()[0] ) );
            }
        }
        catch ( ModelModificationException e )
        {
            e.printStackTrace();
View Full Code Here

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

    {
        IStructuredSelection selection = ( IStructuredSelection ) iselection;
        Iterator it = selection.iterator();
        while ( it.hasNext() )
        {
            ObjectClassDescription ocd = ( ObjectClassDescription ) it.next();
            if ( availableObjectClasses.contains( ocd ) && !selectedObjectClasses.contains( ocd ) )
            {
                availableObjectClasses.remove( ocd );
                selectedObjectClasses.add( ocd );

                // recursively add superior object classes
                ObjectClassDescription[] superiorObjectClassDescriptions = ocd.getSuperiorObjectClassDescriptions();
                if ( superiorObjectClassDescriptions.length > 0 )
                {
                    add( new StructuredSelection( superiorObjectClassDescriptions ) );
                }
            }
View Full Code Here

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

    {
        IStructuredSelection selection = ( IStructuredSelection ) iselection;
        Iterator it = selection.iterator();
        while ( it.hasNext() )
        {
            ObjectClassDescription ocd = ( ObjectClassDescription ) it.next();
            if ( !availableObjectClasses.contains( ocd ) && selectedObjectClasses.contains( ocd ) )
            {
                selectedObjectClasses.remove( ocd );
                availableObjectClasses.add( ocd );

                // recursively remove sub object classes
                ObjectClassDescription[] subObjectClassDescriptions = ocd.getSubObjectClassDescriptions();
                if ( subObjectClassDescriptions.length > 0 )
                {
                    remove( new StructuredSelection( subObjectClassDescriptions ) );
                }
            }
View Full Code Here

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

        String displayValue = value.getStringValue();

        if ( !showRawValues() && !"".equals( displayValue ) )
        {
            Schema schema = value.getAttribute().getEntry().getConnection().getSchema();
            ObjectClassDescription ocd = schema.getObjectClassDescription( displayValue );
            if ( ocd.isStructural() )
            {
                displayValue = displayValue + " (structural)";
            }
            else if ( ocd.isAbstract() )
            {
                displayValue = displayValue + " (abstract)";
            }
            else if ( ocd.isAuxiliary() )
            {
                displayValue = displayValue + " (auxiliary)";
            }
            else if ( ocd.isObsolete() )
            {
                displayValue = displayValue + " (obsolete)";
            }
        }
View Full Code Here

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

         */
        public boolean select( Viewer viewer, Object parentElement, Object element )
        {
            if ( element instanceof ObjectClassDescription )
            {
                ObjectClassDescription ocd = ( ObjectClassDescription ) element;
                Set<String> lowerCaseIdentifierSet = ocd.getLowerCaseIdentifierSet();
                for ( Iterator<String> it = lowerCaseIdentifierSet.iterator(); it.hasNext(); )
                {
                    String s = it.next();
                    if ( s.toLowerCase().startsWith( filterText.getText().toLowerCase() ) )
                    {
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.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.ldapstudio.browser.core.model.schema.ObjectClassDescription

                superLinks = new Hyperlink[names.length];
                for ( int i = 0; i < names.length; i++ )
                {
                    if ( ocd.getSchema().hasObjectClassDescription( names[i] ) )
                    {
                        ObjectClassDescription supOcd = ocd.getSchema().getObjectClassDescription( names[i] );
                        superLinks[i] = toolkit.createHyperlink( supClient, supOcd.toString(), SWT.WRAP );
                        superLinks[i].setHref( supOcd );
                        superLinks[i].setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
                        superLinks[i].setUnderlined( true );
                        superLinks[i].setEnabled( true );
                        superLinks[i].addHyperlinkListener( this );
View Full Code Here

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

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

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

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

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

            remainingObjectClassesSet.removeAll( selectedObjectClasses );
            Set remainingAttributeSet = new HashSet();
            for ( Iterator it = remainingObjectClassesSet.iterator(); it.hasNext(); )
            {
                String oc = ( String ) it.next();
                ObjectClassDescription ocd = entry.getConnection().getSchema().getObjectClassDescription( oc );
                if ( ocd != null )
                {
                    remainingAttributeSet
                        .addAll( Arrays.asList( ocd.getMustAttributeTypeDescriptionNamesTransitive() ) );
                    remainingAttributeSet.addAll( Arrays.asList( ocd.getMayAttributeTypeDescriptionNamesTransitive() ) );
                }
            }
            // check against attributes
            IAttribute[] attributes = entry.getAttributes();
            for ( int i = 0; i < attributes.length; i++ )
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.