Package org.apache.directory.ldapstudio.browser.core.model.schema

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


     *
     * Returns an MaxValueCountValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here


     *
     * Returns a AttributeTypeValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here

     *
     * Returns an RestrictedByValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here

     *
     * Returns an AttributeTypeAndValueValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here

     * @param attributeName the attribute
     * @return alternative value editors
     */
    public IValueEditor[] getAlternativeValueEditors( IEntry entry, String attributeName )
    {
        Schema schema = entry.getConnection().getSchema();
        return getAlternativeValueEditors( schema, attributeName );
    }
View Full Code Here

     *
     * Returns a ObjectClassValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here

        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() )
View Full Code Here

        this.attributeOid2AtdMap = new TreeMap();
        ConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
        IConnection[] connections = cm.getConnections();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createAttributeMaps( schema );
            }
        }
        createAttributeMaps( Schema.DEFAULT_SCHEMA );
        this.attributeTypesAndOids = new String[this.attributeTypes2AtdMap.size() + this.attributeOid2AtdMap.size()];
        System.arraycopy( this.attributeTypes2AtdMap.keySet().toArray(), 0, this.attributeTypesAndOids, 0,
            this.attributeTypes2AtdMap.size() );
        System.arraycopy( this.attributeOid2AtdMap.keySet().toArray(), 0, this.attributeTypesAndOids,
            this.attributeTypes2AtdMap.size(), this.attributeOid2AtdMap.size() );

        // init available syntaxes
        this.syntaxOid2LsdMap = new TreeMap();
        this.syntaxDesc2LsdMap = new TreeMap();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createSyntaxMaps( schema );
            }
        }
View Full Code Here

        this.attributeOid2AtdMap = new TreeMap();
        ConnectionManager cm = BrowserCorePlugin.getDefault().getConnectionManager();
        IConnection[] connections = cm.getConnections();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createAttributeMaps( schema );
            }
        }
        createAttributeMaps( Schema.DEFAULT_SCHEMA );
        this.attributeNamesAndOids = new String[this.attributeNames2AtdMap.size() + this.attributeOid2AtdMap.size()];
        System.arraycopy( this.attributeNames2AtdMap.keySet().toArray(), 0, this.attributeNamesAndOids, 0,
            this.attributeNames2AtdMap.size() );
        System.arraycopy( this.attributeOid2AtdMap.keySet().toArray(), 0, this.attributeNamesAndOids,
            this.attributeNames2AtdMap.size(), this.attributeOid2AtdMap.size() );

        // init available syntaxes
        this.syntaxOid2LsdMap = new TreeMap();
        this.syntaxDesc2LsdMap = new TreeMap();
        for ( int i = 0; i < connections.length; i++ )
        {
            Schema schema = connections[i].getSchema();
            if ( schema != null )
            {
                createSyntaxMaps( schema );
            }
        }
View Full Code Here

         */
        public Object[] getElements( Object inputElement )
        {
            if ( inputElement instanceof Schema )
            {
                Schema schema = ( Schema ) inputElement;
                if ( schema != null && schema.getMrdMapByName() != null )
                {
                    Set<Object> set = new HashSet<Object>( schema.getMrdMapByName().values() );
                    return set.toArray();
                }
            }
            return new Object[0];
        }
View Full Code Here

TOP

Related Classes of org.apache.directory.ldapstudio.browser.core.model.schema.Schema

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.