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

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


        String displayValue = value.getStringValue();

        if ( !showRawValues() )
        {
            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


     *
     * 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

     * @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

                    rawValueType = line.getRawValueType();
                }

                if ( offset <= part.getOffset() + rawAttributeDescription.length() )
                {
                    Schema schema = editor.getConnection() != null ? editor.getConnection().getSchema()
                        : Schema.DEFAULT_SCHEMA;
                    String[] attributeNames = schema.getAttributeTypeDescriptionNames();
                    Arrays.sort( attributeNames );
                    for ( int a = 0; a < attributeNames.length; a++ )
                    {
                        if ( rawAttributeDescription.length() == 0
                            || attributeNames[a].startsWith( rawAttributeDescription ) )
                        {

                            String proposal = attributeNames[a];

                            if ( rawValueType.length() == 0 )
                            {
                                if ( schema.getAttributeTypeDescription( proposal ).isBinary() )
                                {
                                    proposal += ":: ";
                                }
                                else
                                {
View Full Code Here

    private void connectionUpdated( IConnection connection )
    {

        if ( !this.dnText.isDisposed() )
        {
            Schema schema = null;
            if ( connection != null )
            {
                schema = connection.getSchema();
            }

            if ( schema != null && schema.getDn() != null )
            {
                dnText.setText( schema.getDn().toString() );
            }
            else
            {
                dnText.setText( "-" );
            }

            if ( schema != null && schema.getCreateTimestamp() != null )
            {
                ctText.setText( schema.getCreateTimestamp() );
            }
            else
            {
                ctText.setText( "-" );
            }

            if ( schema != null && schema.getModifyTimestamp() != null )
            {
                mtText.setText( schema.getModifyTimestamp() );
            }
            else
            {
                mtText.setText( "-" );
            }
View Full Code Here

                    LdifAttrValLine oldLine = ( LdifAttrValLine ) line;
                    attributeDescription = oldLine.getUnfoldedAttributeDescription();
                    oldValue = oldLine.getValueAsString();
                }

                Schema schema = editor.getConnection() != null ? editor.getConnection().getSchema()
                    : Schema.DEFAULT_SCHEMA;
                IConnection dummyConnection = new DummyConnection( schema );

                IEntry dummyEntry = null;
                if ( containers[0] instanceof LdifContentRecord )
View Full Code Here

    {
        public Object[] getElements( Object inputElement )
        {
            if ( inputElement instanceof Schema )
            {
                Schema schema = ( Schema ) inputElement;
                if ( schema != null && schema.getMrdMapByName() != null )
                {
                    Set set = new HashSet( schema.getMrdMapByName().values() );
                    return set.toArray();
                }
            }
            return new Object[0];
        }
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

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

    {
        public Object[] getElements( Object inputElement )
        {
            if ( inputElement instanceof Schema )
            {
                Schema schema = ( Schema ) inputElement;
                if ( schema != null )
                {
                    return schema.getAttributeTypeDescriptions();
                }
            }
            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.