Package org.apache.directory.studio.ldapbrowser.core.model

Examples of org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription


     *
     * @return the attribute type description, or the default or a dummy
     */
    public AttributeTypeDescription getAttributeTypeDescription( String nameOrOid )
    {
        AttributeDescription ad = new AttributeDescription( nameOrOid );
        String attributeType = ad.getParsedAttributeType();

        if ( atdMapByNameOrNumericOid.containsKey( attributeType.toLowerCase() ) )
        {
            return atdMapByNameOrNumericOid.get( attributeType.toLowerCase() );
        }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public IAttribute getAttribute( String attributeDescription )
    {
        AttributeDescription ad = new AttributeDescription( attributeDescription );
        String oidString = ad.toOidString( getBrowserConnection().getSchema() );
        return attributeMap.get( oidString.toLowerCase() );
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public AttributeHierarchy getAttributeWithSubtypes( String attributeDescription )
    {
        AttributeDescription ad = new AttributeDescription( attributeDescription );

        List<IAttribute> attributeList = new ArrayList<IAttribute>();
        for ( IAttribute attribute : attributeMap.values() )
        {
            AttributeDescription other = attribute.getAttributeDescription();
            if ( other.isSubtypeOf( ad, getBrowserConnection().getSchema() ) )
            {
                attributeList.add( attribute );
            }
        }

View Full Code Here

        // check must-attributes
        String[] mustAttributeNames = getSubschema().getMustAttributeNames();
        for ( String mustAttributeName : mustAttributeNames )
        {
            AttributeDescription ad = new AttributeDescription( mustAttributeName );
            String oidString = ad.toOidString( getBrowserConnection().getSchema() );
            if ( !attributeMap.containsKey( oidString.toLowerCase() ) )
            {
                return false;
            }
        }
View Full Code Here

        {
            return null;
        }
        else
        {
            AttributeDescription ad = new AttributeDescription( attributeDescription );
            String oidString = ad.toOidString( getBrowserConnection().getSchema() );
            return ( IAttribute ) ai.attributeMap.get( oidString.toLowerCase() );
        }
    }
View Full Code Here

            if ( myAttribute != null )
            {
                attributeList.add( myAttribute );
            }

            AttributeDescription ad = new AttributeDescription( attributeDescription );
            Map<String, IAttribute> clonedAttributeMap = new HashMap<String, IAttribute>( ai.attributeMap );
            for ( IAttribute attribute : clonedAttributeMap.values() )
            {
                AttributeDescription other = attribute.getAttributeDescription();
                if ( other.isSubtypeOf( ad, getBrowserConnection().getSchema() ) )
                {
                    attributeList.add( attribute );
                }
            }
View Full Code Here

        }
        for ( int i = 0; i < attributes.length; i++ )
        {

            String attributeName = attributes[i];
            AttributeDescription ad = new AttributeDescription( attributeName );
            String oidString = ad.toOidString( browserConnection.getSchema() );
            if ( attributeMap.containsKey( oidString ) )
            {
                String value = attributeMap.get( oidString );

                // escape
View Full Code Here

        {
            String attributeName = lines[i].getUnfoldedAttributeDescription();
            if ( browserConnection != null )
            {
                // convert attributeName to oid
                AttributeDescription ad = new AttributeDescription( attributeName );
                attributeName = ad.toOidString( browserConnection.getSchema() );
            }
            String value = lines[i].getValueAsString();
            if ( !Charset.forName( encoding ).newEncoder().canEncode( value ) )
            {
                if ( binaryEncoding == BrowserCoreConstants.BINARYENCODING_BASE64 )
View Full Code Here

     *                the attribute description
     * @return the attribute type description, or the default or a dummy
     */
    public AttributeTypeDescription getAttributeTypeDescription( String description )
    {
        AttributeDescription ad = new AttributeDescription( description );
        String attributeType = ad.getParsedAttributeType();

        if ( this.atdMapByName.containsKey( attributeType.toLowerCase() ) )
        {
            return ( AttributeTypeDescription ) this.atdMapByName.get( attributeType.toLowerCase() );
        }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public IAttribute getAttribute( String attributeDescription )
    {
        AttributeDescription ad = new AttributeDescription( attributeDescription );
        String oidString = ad.toOidString( getBrowserConnection().getSchema() );
        return attributeMap.get( oidString.toLowerCase() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription

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.