Examples of LdapSyntaxDescription


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

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

View Full Code Here

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

        noUserModificationText.setEnabled( atd != null && !atd.isUserModifiable() );
        flagSection.layout();

        // set syntax content
        String lsdOid = null;
        LdapSyntaxDescription lsd = null;
        int lsdLength = 0;
        if ( atd != null )
        {
            lsdOid = SchemaUtils.getSyntaxNumericOidTransitive( atd, getSchema() );
            if ( lsdOid != null && getSchema().hasLdapSyntaxDescription( lsdOid ) )
            {
                lsd = getSchema().getLdapSyntaxDescription( lsdOid );
            }
            lsdLength = SchemaUtils.getSyntaxLengthTransitive( atd, getSchema() );
        }
        syntaxLink.setText( getNonNullString( lsd != null ? lsd.getNumericOid() : lsdOid ) );
        syntaxLink.setHref( lsd );
        syntaxLink.setUnderlined( lsd != null );
        syntaxLink.setEnabled( lsd != null );
        syntaxDescText.setText( getNonNullString( lsd != null ? lsd.getDescription() : null ) );
        lengthText.setText( getNonNullString( lsdLength > 0 ? Integer.toString( lsdLength ) : null ) );
        syntaxSection.layout();

        // set matching rules content
        String emrOid = null;
View Full Code Here

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

        {
            return ( IValueEditor ) class2ValueEditors.get( syntaxValueEditorMap.get( syntaxNumericOid.toLowerCase() ) );
        }

        // return default
        LdapSyntaxDescription lsd = schema.getLdapSyntaxDescription( syntaxNumericOid );
        if ( SchemaUtils.isBinary( lsd ) )
        {
            return defaultBinaryValueEditor;
        }
        else
View Full Code Here

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

                {
                    if ( syntax.getSyntaxNumericOid() != null )
                    {
                        if ( syntaxOid2LsdMap.containsKey( syntax.getSyntaxNumericOid() ) )
                        {
                            LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( syntax
                                .getSyntaxNumericOid() );
                            return SchemaUtils.toString( lsd );
                        }
                        else if ( Utils.getOidDescription( syntax.getSyntaxNumericOid() ) != null )
                        {
View Full Code Here

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

            return DEFAULT_SCHEMA.getLdapSyntaxDescription( numericOid );
        }
        else
        {
            // DUMMY
            LdapSyntaxDescription lsd = new LdapSyntaxDescription();
            lsd.setNumericOid( numericOid );
            lsd.setExtensions( DUMMY_EXTENSIONS );
            return lsd;
        }
    }
View Full Code Here

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

                while ( ne.hasMoreElements() )
                {
                    String value = ( String ) ne.nextElement();
                    LdapSyntaxDescriptionSchemaParser parser = new LdapSyntaxDescriptionSchemaParser();
                    parser.setQuirksMode( true );
                    LdapSyntaxDescription lsd = parser.parseLdapSyntaxDescription( value );

                    SyntaxImpl impl = new SyntaxImpl( lsd.getNumericOid() );
                    impl.setDescription( lsd.getDescription() );
                    impl.setNames( new String[]
                        { lsd.getDescription() } );
                    //impl.setObsolete( lsd.isObsolete() );
                    impl.setHumanReadable( true );
                    impl.setSchema( schema.getName() );
                    impl.setSchemaObject( schema );
View Full Code Here

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

        // check user-defined binary syntaxes
        String syntax = getSyntaxNumericOidTransitive( atd, schema );
        if ( syntax != null && schema.hasLdapSyntaxDescription( syntax ) )
        {
            LdapSyntaxDescription lsd = schema.getLdapSyntaxDescription( syntax );
            return isBinary( lsd );
        }

        return false;
    }
View Full Code Here

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

                    atd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                    addAttributeTypeDescription( atd );
                }
                else if ( attributeName.equalsIgnoreCase( SchemaConstants.LDAP_SYNTAXES_AT ) )
                {
                    LdapSyntaxDescription lsd = lsdParser.parseLdapSyntaxDescription( value );
                    if ( StringUtils.isEmpty( lsd.getDescription() )
                        && Utils.getOidDescription( lsd.getNumericOid() ) != null )
                    {
                        lsd.setDescription( Utils.getOidDescription( lsd.getNumericOid() ) );
                    }
                    lsd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                    addLdapSyntaxDescription( lsd );
                }
                else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT ) )
                {
                    MatchingRuleDescription mrd = mrdParser.parseMatchingRuleDescription( value );
                    mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                    addMatchingRuleDescription( mrd );
                }
                else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULE_USE_AT ) )
                {
                    MatchingRuleUseDescription mrud = mrudParser.parseMatchingRuleUseDescription( value );
                    mrud.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
                    addMatchingRuleUseDescription( mrud );
                }
                else if ( attributeName.equalsIgnoreCase( SchemaConstants.CREATE_TIMESTAMP_AT ) )
                {
                    setCreateTimestamp( value );
                }
                else if ( attributeName.equalsIgnoreCase( SchemaConstants.MODIFY_TIMESTAMP_AT ) )
                {
                    setModifyTimestamp( value );
                }
            }
            catch ( Exception e )
            {
                // TODO: exception handling
                System.out.println( "Error reading schema: " + attributeName + " = " + value );
                System.out.println( e.getMessage() );
            }
        }

        for ( AttributeTypeDescription atd : getAttributeTypeDescriptions() )
        {
            // assume all received syntaxes in attributes are valid -> create pseudo syntaxes if missing
            String syntaxOid = atd.getSyntax();
            if ( syntaxOid != null && !hasLdapSyntaxDescription( syntaxOid ) )
            {
                LdapSyntaxDescription lsd = new LdapSyntaxDescription();
                lsd.setNumericOid( syntaxOid );
                lsd.setDescription( Utils.getOidDescription( syntaxOid ) );
                addLdapSyntaxDescription( lsd );
            }

            // assume all received matching rules in attributes are valid -> create pseudo matching rules if missing
            String emr = atd.getEqualityMatchingRule();
View Full Code Here

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

                {
                    if ( relation.getSyntaxOID() != null )
                    {
                        if ( syntaxOid2LsdMap.containsKey( relation.getSyntaxOID() ) )
                        {
                            LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( relation
                                .getSyntaxOID() );
                            return SchemaUtils.toString( lsd );
                        }
                    }
                }
View Full Code Here

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

        // set flag
        isObsoleteText.setEnabled( mrd != null && mrd.isObsolete() );

        // set syntax content
        String lsdOid = null;
        LdapSyntaxDescription lsd = null;
        if ( mrd != null )
        {
            Schema schema = getSchema();
            lsdOid = mrd.getSyntax();
            if ( lsdOid != null && schema.hasLdapSyntaxDescription( lsdOid ) )
            {
                lsd = schema.getLdapSyntaxDescription( lsdOid );
            }
        }
        syntaxLink.setText( getNonNullString( lsd != null ? lsd.getNumericOid() : lsdOid ) );
        syntaxLink.setHref( lsd );
        syntaxLink.setUnderlined( lsd != null );
        syntaxLink.setEnabled( lsd != null );
        syntaxDescText.setText( getNonNullString( lsd != null ? lsd.getDescription() : null ) );
        syntaxSection.layout();

        // create contents of dynamic sections
        createUsedFromContents( mrd );
        createRawContents( mrd );
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.