Package org.apache.directory.shared.ldap.schema.syntax

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


            return atd.getEqualityMatchingRule();
        }

        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
        {
            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
            return getEqualityMatchingRuleNameOrNumericOidTransitive( superior, schema );
        }

        return null;
    }
View Full Code Here


            return atd.getSubstringsMatchingRule();
        }

        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
        {
            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
            return getSubstringMatchingRuleNameOrNumericOidTransitive( superior, schema );
        }

        return null;
    }
View Full Code Here

            return atd.getOrderingMatchingRule();
        }

        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
        {
            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
            return getOrderingMatchingRuleNameOrNumericOidTransitive( superior, schema );
        }

        return null;
    }
View Full Code Here

            return atd.getSyntax();
        }

        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
        {
            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
            return getSyntaxNumericOidTransitive( superior, schema );
        }

        return null;
    }
View Full Code Here

            return atd.getSyntaxLength();
        }

        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
        {
            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
            return getSyntaxLengthTransitive( superior, schema );
        }

        return -1;
    }
View Full Code Here

    {
        String[] musts = getMustAttributeNames();
        AttributeTypeDescription[] atds = new AttributeTypeDescription[musts.length];
        for ( int i = 0; i < musts.length; i++ )
        {
            AttributeTypeDescription atd = getSchema().getAttributeTypeDescription( musts[i] );
            atds[i] = atd;
        }
        return atds;
    }
View Full Code Here

    {
        String[] mays = getMayAttributeNames();
        AttributeTypeDescription[] atds = new AttributeTypeDescription[mays.length];
        for ( int i = 0; i < mays.length; i++ )
        {
            AttributeTypeDescription atd = getSchema().getAttributeTypeDescription( mays[i] );
            atds[i] = atd;
        }
        return atds;
    }
View Full Code Here

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

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

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

        if ( this.toOidString( schema ).equals( other.toOidString( schema ) ) )
        {
            return false;
        }

        AttributeTypeDescription myAtd = schema.getAttributeTypeDescription( this.getParsedAttributeType() );
        AttributeTypeDescription otherAtd = schema.getAttributeTypeDescription( other.getParsedAttributeType() );

        // special case *: all user attributes (RFC4511)
        if ( ISearch.ALL_USER_ATTRIBUTES.equals( other.description ) && !SchemaUtils.isOperational( myAtd ) )
        {
            return true;
        }

        // special case +: all operational attributes (RFC3673)
        if ( ISearch.ALL_OPERATIONAL_ATTRIBUTES.equals( other.description ) && SchemaUtils.isOperational( myAtd ) )
        {
            return true;
        }
       
        // special case @: attributes by object class (RFC4529)
        if ( other.description.length() > 1 &&  other.description.startsWith( "@" ) )
        {
            String objectClass = other.description.substring( 1 );
            ObjectClassDescription ocd = schema.getObjectClassDescription( objectClass );
            ocd.getMayAttributeTypes();
            ocd.getMustAttributeTypes();
           
            Collection<String> names = new HashSet<String>();
            names.addAll( SchemaUtils.getMayAttributeTypeDescriptionNamesTransitive( ocd, schema ) );
            names.addAll( SchemaUtils.getMustAttributeTypeDescriptionNamesTransitive( ocd, schema ) );
            for ( String name : names )
            {
                AttributeTypeDescription atd = schema.getAttributeTypeDescription( name );
                if ( myAtd == atd )
                {
                    return true;
                }
            }
        }

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

                {
                    if ( relation.getAttributeNumericOidOrType() != null )
                    {
                        if ( attributeNames2AtdMap.containsKey( relation.getAttributeNumericOidOrType() ) )
                        {
                            AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeNames2AtdMap
                                .get( relation.getAttributeNumericOidOrType() );
                            String s = atd.getNumericOid();
                            for ( String name : atd.getNames() )
                            {
                                if ( !relation.getAttributeNumericOidOrType().equals( name ) )
                                {
                                    s += ", " + name;
                                }
                            }
                            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

TOP

Related Classes of org.apache.directory.shared.ldap.schema.syntax.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.