directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r641069 [1/4] - in /directory/studio/trunk: aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/ ldapbrowser-common/src/...
Date Tue, 25 Mar 2008 23:05:38 GMT
Author: seelmann
Date: Tue Mar 25 16:05:04 2008
New Revision: 641069

URL: http://svn.apache.org/viewvc?rev=641069&view=rev
Log:
Fix for DIRSTUDIO-128: Replaced internal schema parser with shared-ldap schema parser

Removed:
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/AttributeTypeDescription.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/LdapSyntaxDescription.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/MatchingRuleDescription.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/MatchingRuleUseDescription.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/ObjectClassDescription.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaPart2.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/parser/
Modified:
    directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java
    directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java
    directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java
    directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/EntryExistsCopyStrategyDialogImpl.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReturningAttributesWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java
    directory/studio/trunk/ldapbrowser-core/META-INF/MANIFEST.MF
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCorePreferences.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Attribute.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/BinaryAttribute.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Subschema.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/Utils.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/OpenSchemaBrowserAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/AttributePropertyPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SchemaAttributesPropertyPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SchemaObjectClassesPropertyPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionDetailsPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/LdapSyntaxDescriptionPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionDetailsPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleDescriptionPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionDetailsPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/MatchingRuleUseDescriptionPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionDetailsPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ObjectClassDescriptionPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowser.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserInput.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserManager.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaBrowserNavigationLocation.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaDetailsPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/SchemaPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryObjectclassWizardPage.java
    directory/studio/trunk/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifCompletionProcessor.java
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/objectclass/ObjectClassDialog.java
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/objectclass/ObjectClassValueEditor.java

Modified: directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java (original)
+++ directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeAndValueDialog.java Tue Mar 25 16:05:04 2008
@@ -21,11 +21,13 @@
 
 
 import java.util.Arrays;
+import java.util.Collection;
 
 import org.apache.directory.studio.aciitemeditor.Activator;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
@@ -145,7 +147,8 @@
         composite.setLayout( new GridLayout( 3, false ) );
 
         // combo widget
-        String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+        Collection<String> names = SchemaUtils.getNames( schema.getAttributeTypeDescriptions() );
+        String[] allAtNames = names.toArray( new String[names.size()] );
         Arrays.sort( allAtNames );
 
         final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(

Modified: directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java (original)
+++ directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/AttributeTypeDialog.java Tue Mar 25 16:05:04 2008
@@ -22,11 +22,13 @@
 
 
 import java.util.Arrays;
+import java.util.Collection;
 
 import org.apache.directory.studio.aciitemeditor.Activator;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
@@ -130,7 +132,8 @@
         composite.setLayoutData( gd );
 
         // combo widget
-        String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+        Collection<String> names = SchemaUtils.getNames( schema.getAttributeTypeDescriptions() );
+        String[] allAtNames = names.toArray( new String[names.size()] );
         Arrays.sort( allAtNames );
 
         final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(

Modified: directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java (original)
+++ directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/MaxValueCountValueEditor.java Tue Mar 25 16:05:04 2008
@@ -22,6 +22,7 @@
 
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -32,6 +33,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -272,7 +274,8 @@
             BaseWidgetUtils.createLabel( composite, L_CURLY_TYPE, 1 );
 
             // combo widget
-            String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+            Collection<String> names = SchemaUtils.getNames( schema.getAttributeTypeDescriptions() );
+            String[] allAtNames = names.toArray( new String[names.size()] );
             Arrays.sort( allAtNames );
 
             final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(

Modified: directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java (original)
+++ directory/studio/trunk/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/RestrictedByValueEditor.java Tue Mar 25 16:05:04 2008
@@ -21,6 +21,7 @@
 
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -31,6 +32,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
@@ -279,7 +281,8 @@
             BaseWidgetUtils.createLabel( composite, L_CURLY_TYPE, 1 );
 
             // combo widget
-            String[] allAtNames = schema.getAttributeTypeDescriptionNames();
+            Collection<String> names = SchemaUtils.getNames( schema.getAttributeTypeDescriptions() );
+            String[] allAtNames = names.toArray( new String[names.size()] );
             Arrays.sort( allAtNames );
 
             final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/BrowserSelectionUtils.java Tue Mar 25 16:05:04 2008
@@ -29,6 +29,7 @@
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.ui.actions.SelectionUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserCategory;
 import org.apache.directory.studio.ldapbrowser.common.widgets.browser.BrowserEntryPage;
@@ -43,7 +44,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Search;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.utils.LdapFilterUtils;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/DeleteAction.java Tue Mar 25 16:05:04 2008
@@ -23,6 +23,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -32,6 +33,8 @@
 import java.util.Set;
 
 import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteAttributesValueJob;
 import org.apache.directory.studio.ldapbrowser.core.jobs.DeleteEntriesJob;
@@ -42,8 +45,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -589,6 +591,7 @@
         if ( getSelectedValues().length > 0 && !selectedObjectClasses.isEmpty() )
         {
             IEntry entry = getSelectedValues()[0].getAttribute().getEntry();
+            Schema schema = entry.getBrowserConnection().getSchema();
             // get remaining attributes
             String[] ocValues = entry.getSubschema().getObjectClassNames();
             Set<String> remainingObjectClassesSet = new HashSet<String>( Arrays.asList( ocValues ) );
@@ -596,19 +599,23 @@
             Set<AttributeTypeDescription> remainingAttributeSet = new HashSet<AttributeTypeDescription>();
             for ( String oc : remainingObjectClassesSet )
             {
-                ObjectClassDescription ocd = entry.getBrowserConnection().getSchema().getObjectClassDescription( oc );
+                ObjectClassDescription ocd = schema.getObjectClassDescription( oc );
                 if ( ocd != null )
                 {
-                    String[] mustAttrs = ocd.getMustAttributeTypeDescriptionNamesTransitive();
+                    Collection<String> mustAttrs = SchemaUtils.getMustAttributeTypeDescriptionNamesTransitive( ocd,
+                        schema );
                     for ( String mustAttr : mustAttrs )
                     {
-                        AttributeTypeDescription atd = entry.getBrowserConnection().getSchema().getAttributeTypeDescription( mustAttr );
+                        AttributeTypeDescription atd = entry.getBrowserConnection().getSchema()
+                            .getAttributeTypeDescription( mustAttr );
                         remainingAttributeSet.add( atd );
                     }
-                    String[] mayAttrs = ocd.getMayAttributeTypeDescriptionNamesTransitive();
+                    Collection<String> mayAttrs = SchemaUtils.getMayAttributeTypeDescriptionNamesTransitive( ocd,
+                        schema );
                     for ( String mayAttr : mayAttrs )
                     {
-                        AttributeTypeDescription atd = entry.getBrowserConnection().getSchema().getAttributeTypeDescription( mayAttr );
+                        AttributeTypeDescription atd = entry.getBrowserConnection().getSchema()
+                            .getAttributeTypeDescription( mayAttr );
                         remainingAttributeSet.add( atd );
                     }
                 }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/EntryExistsCopyStrategyDialogImpl.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/EntryExistsCopyStrategyDialogImpl.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/EntryExistsCopyStrategyDialogImpl.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/EntryExistsCopyStrategyDialogImpl.java Tue Mar 25 16:05:04 2008
@@ -29,6 +29,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.core.jobs.EntryExistsCopyStrategyDialog;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
@@ -198,8 +199,8 @@
             }
         } );
         dnBuilderWidget.createContents( group );
-        dnBuilderWidget.setInput( browserConnection, browserConnection.getSchema().getAttributeTypeDescriptionNames(),
-            dn.getRdn(), null );
+        dnBuilderWidget.setInput( browserConnection, SchemaUtils.getNamesAsArray( browserConnection.getSchema()
+            .getAttributeTypeDescriptions() ), dn.getRdn(), null );
 
 //        rememberCheckbox = BaseWidgetUtils.createCheckbox( composite, "Remember decision", 2 );
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/BinaryAttributesAndSyntaxesPreferencePage.java Tue Mar 25 16:05:04 2008
@@ -23,19 +23,21 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 import java.util.SortedMap;
 import java.util.TreeMap;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.BinaryAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.BinarySyntax;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -197,13 +199,11 @@
 
     private void createAttributeMaps( Schema schema )
     {
-        AttributeTypeDescription[] atds = schema.getAttributeTypeDescriptions();
+        Collection<AttributeTypeDescription> atds = schema.getAttributeTypeDescriptions();
         for ( AttributeTypeDescription atd : atds )
         {
-            attributeOid2AtdMap.put( atd.getNumericOID(), atd );
-
-            String[] names = atd.getNames();
-            for ( String name : names )
+            attributeOid2AtdMap.put( atd.getNumericOid(), atd );
+            for ( String name : atd.getNames() )
             {
                 attributeNames2AtdMap.put( name, atd );
             }
@@ -213,14 +213,14 @@
 
     private void createSyntaxMaps( Schema schema )
     {
-        LdapSyntaxDescription[] lsds = schema.getLdapSyntaxDescriptions();
+        Collection<LdapSyntaxDescription> lsds = schema.getLdapSyntaxDescriptions();
         for ( LdapSyntaxDescription lsd : lsds )
         {
-            syntaxOid2LsdMap.put( lsd.getNumericOID(), lsd );
+            syntaxOid2LsdMap.put( lsd.getNumericOid(), lsd );
 
-            if ( lsd.getDesc() != null )
+            if ( lsd.getDescription() != null )
             {
-                syntaxDesc2LsdMap.put( lsd.getDesc(), lsd );
+                syntaxDesc2LsdMap.put( lsd.getDescription(), lsd );
             }
         }
     }
@@ -484,7 +484,7 @@
                         {
                             AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeNames2AtdMap
                                 .get( attribute.getAttributeNumericOidOrName() );
-                            String s = atd.getNumericOID();
+                            String s = atd.getNumericOid();
                             for ( String attributeName : atd.getNames() )
                             {
                                 if ( !attribute.getAttributeNumericOidOrName().equals( attributeName ) )
@@ -498,7 +498,7 @@
                         {
                             AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeOid2AtdMap
                                 .get( attribute.getAttributeNumericOidOrName() );
-                            return atd.toString();
+                            return SchemaUtils.toString( atd );
                         }
                     }
                 }
@@ -532,7 +532,7 @@
                         {
                             LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( syntax
                                 .getSyntaxNumericOid() );
-                            return lsd.toString();
+                            return SchemaUtils.toString( lsd );
                         }
                     }
                 }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/preferences/ValueEditorsPreferencePage.java Tue Mar 25 16:05:04 2008
@@ -30,15 +30,16 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.core.BrowserConnectionManager;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeValueEditorRelation;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SyntaxValueEditorRelation;
 import org.apache.directory.studio.valueeditors.ValueEditorManager;
 import org.apache.directory.studio.valueeditors.ValueEditorManager.ValueEditorExtension;
@@ -241,13 +242,12 @@
 
     private void createAttributeMaps( Schema schema )
     {
-        AttributeTypeDescription[] atds = schema.getAttributeTypeDescriptions();
+        Collection<AttributeTypeDescription> atds = schema.getAttributeTypeDescriptions();
         for ( AttributeTypeDescription atd : atds )
         {
-            attributeOid2AtdMap.put( atd.getNumericOID(), atd );
+            attributeOid2AtdMap.put( atd.getNumericOid(), atd );
 
-            String[] names = atd.getNames();
-            for ( String name : names )
+            for ( String name : atd.getNames() )
             {
                 attributeNames2AtdMap.put( name, atd );
             }
@@ -257,14 +257,14 @@
 
     private void createSyntaxMaps( Schema schema )
     {
-        LdapSyntaxDescription[] lsds = schema.getLdapSyntaxDescriptions();
+        Collection<LdapSyntaxDescription> lsds = schema.getLdapSyntaxDescriptions();
         for ( LdapSyntaxDescription lsd : lsds )
         {
-            syntaxOid2LsdMap.put( lsd.getNumericOID(), lsd );
+            syntaxOid2LsdMap.put( lsd.getNumericOid(), lsd );
 
-            if ( lsd.getDesc() != null )
+            if ( lsd.getDescription() != null )
             {
-                syntaxDesc2LsdMap.put( lsd.getDesc(), lsd );
+                syntaxDesc2LsdMap.put( lsd.getDescription(), lsd );
             }
         }
     }
@@ -540,7 +540,7 @@
                         {
                             AttributeTypeDescription atd = ( AttributeTypeDescription ) attributeNames2AtdMap
                                 .get( relation.getAttributeNumericOidOrType() );
-                            String s = atd.getNumericOID();
+                            String s = atd.getNumericOid();
                             for ( String name : atd.getNames() )
                             {
                                 if ( !relation.getAttributeNumericOidOrType().equals( name ) )
@@ -612,7 +612,7 @@
                         {
                             LdapSyntaxDescription lsd = ( LdapSyntaxDescription ) syntaxOid2LsdMap.get( relation
                                 .getSyntaxOID() );
-                            return lsd.toString();
+                            return SchemaUtils.toString( lsd );
                         }
                     }
                 }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterContentAssistProcessor.java Tue Mar 25 16:05:04 2008
@@ -23,12 +23,16 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.Comparator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription;
+import org.apache.directory.shared.ldap.schema.syntax.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -37,10 +41,8 @@
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterItemComponent;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterParser;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterToken;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.fieldassist.IContentProposal;
 import org.eclipse.jface.fieldassist.IContentProposalProvider;
 import org.eclipse.jface.text.Document;
@@ -174,14 +176,13 @@
 
         if ( schema != null )
         {
-            AttributeTypeDescription[] attributeTypeDescriptions = schema.getAttributeTypeDescriptions();
-            for ( int i = 0; i < attributeTypeDescriptions.length; i++ )
+            Collection<AttributeTypeDescription> attributeTypeDescriptions = schema.getAttributeTypeDescriptions();
+            for ( AttributeTypeDescription atd : attributeTypeDescriptions )
             {
-                AttributeTypeDescription description = attributeTypeDescriptions[i];
-                possibleAttributeTypes.put( description.getNumericOID(), description );
-                for ( int k = 0; k < description.getNames().length; k++ )
+                possibleAttributeTypes.put( atd.getNumericOid(), atd );
+                for ( String atdName : atd.getNames() )
                 {
-                    possibleAttributeTypes.put( description.getNames()[k], description );
+                    possibleAttributeTypes.put( atdName, atd );
                 }
             }
 
@@ -191,25 +192,23 @@
             possibleFilterTypes.put( ">=", ">= (greater than or equals)" );
             possibleFilterTypes.put( "~=", "~= (approximately)" );
 
-            ObjectClassDescription[] objectClassDescriptions = schema.getObjectClassDescriptions();
-            for ( int i = 0; i < objectClassDescriptions.length; i++ )
+            Collection<ObjectClassDescription> ocds = schema.getObjectClassDescriptions();
+            for ( ObjectClassDescription ocd : ocds )
             {
-                ObjectClassDescription description = objectClassDescriptions[i];
-                possibleObjectClasses.put( description.getNumericOID(), description );
-                for ( int k = 0; k < description.getNames().length; k++ )
+                possibleObjectClasses.put( ocd.getNumericOid(), ocd );
+                for ( String name : ocd.getNames() )
                 {
-                    possibleObjectClasses.put( description.getNames()[k], description );
+                    possibleObjectClasses.put( name, ocd );
                 }
             }
 
-            MatchingRuleDescription[] matchingRuleDescriptions = schema.getMatchingRuleDescriptions();
-            for ( int i = 0; i < matchingRuleDescriptions.length; i++ )
+            Collection<MatchingRuleDescription> matchingRuleDescriptions = schema.getMatchingRuleDescriptions();
+            for ( MatchingRuleDescription description : matchingRuleDescriptions )
             {
-                MatchingRuleDescription description = matchingRuleDescriptions[i];
-                possibleMatchingRules.put( description.getNumericOID(), description );
-                for ( int k = 0; k < description.getNames().length; k++ )
+                possibleMatchingRules.put( description.getNumericOid(), description );
+                for ( String name : description.getNames() )
                 {
-                    possibleMatchingRules.put( description.getNames()[k], description );
+                    possibleMatchingRules.put( name, description );
                 }
             }
         }
@@ -295,7 +294,8 @@
      */
     private ICompletionProposal[] computeCompletionProposals( int offset )
     {
-        String[] possibleObjectClasses = schema == null ? new String[0] : schema.getObjectClassDescriptionNames();
+        String[] possibleObjectClasses = schema == null ? new String[0] : SchemaUtils.getNamesAsArray( schema
+            .getObjectClassDescriptions() );
         Arrays.sort( possibleObjectClasses );
 
         List<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>();
@@ -436,18 +436,17 @@
                 {
                     String replacementString = possibleAttributeType;
                     String displayString = possibleAttributeType;
-                    if ( displayString.equals( description.getNumericOID() ) )
+                    if ( displayString.equals( description.getNumericOid() ) )
                     {
-                        displayString += " (" + description.toString() + ")";
+                        displayString += " (" + SchemaUtils.toString( description ) + ")";
                     }
                     else
                     {
-                        displayString += " (" + description.getNumericOID() + ")";
+                        displayString += " (" + description.getNumericOid() + ")";
                     }
-
+                    String info = SchemaUtils.getLdifLine( description );
                     ICompletionProposal proposal = new CompletionProposal( replacementString, offset, attributeType
-                        .length(), replacementString.length(), getAttributeTypeImage(), displayString, null, schema
-                        .getAttributeTypeDescription( possibleAttributeType ).getLine().getUnfoldedValue() );
+                        .length(), replacementString.length(), getAttributeTypeImage(), displayString, null, info );
                     proposalList.add( proposal );
                 }
             }
@@ -468,12 +467,14 @@
         if ( schema != null )
         {
             Map<String, String> copy = new LinkedHashMap<String, String>( possibleFilterTypes );
-            if ( schema.getAttributeTypeDescription( attributeType ).getEqualityMatchingRuleDescriptionOIDTransitive() == null )
+            if ( SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( schema
+                .getAttributeTypeDescription( attributeType ), schema ) == null )
             {
                 copy.remove( "=" );
                 copy.remove( "~=" );
             }
-            if ( schema.getAttributeTypeDescription( attributeType ).getOrderingMatchingRuleDescriptionOIDTransitive() == null )
+            if ( SchemaUtils.getOrderingMatchingRuleNameOrNumericOidTransitive( schema
+                .getAttributeTypeDescription( attributeType ), schema ) == null )
             {
                 copy.remove( "<=" );
                 copy.remove( ">=" );
@@ -510,18 +511,18 @@
                 {
                     String replacementString = possibleObjectClass;
                     String displayString = possibleObjectClass;
-                    if ( displayString.equals( description.getNumericOID() ) )
+                    if ( displayString.equals( description.getNumericOid() ) )
                     {
-                        displayString += " (" + description.toString() + ")";
+                        displayString += " (" + SchemaUtils.toString( description ) + ")";
                     }
                     else
                     {
-                        displayString += " (" + description.getNumericOID() + ")";
+                        displayString += " (" + description.getNumericOid() + ")";
                     }
 
                     ICompletionProposal proposal = new CompletionProposal( replacementString, offset, objectClass
-                        .length(), replacementString.length(), getObjectClassImage(), displayString, null, schema
-                        .getObjectClassDescription( possibleObjectClass ).getLine().getUnfoldedValue() );
+                        .length(), replacementString.length(), getObjectClassImage(), displayString, null, SchemaUtils
+                        .getLdifLine( schema.getObjectClassDescription( possibleObjectClass ) ) );
                     proposalList.add( proposal );
                 }
             }
@@ -556,18 +557,17 @@
                         replacementString += "=";
                     }
                     String displayString = possibleMatchingRule;
-                    if ( displayString.equals( description.getNumericOID() ) )
+                    if ( displayString.equals( description.getNumericOid() ) )
                     {
-                        displayString += " (" + description.toString() + ")";
+                        displayString += " (" + SchemaUtils.toString( description ) + ")";
                     }
                     else
                     {
-                        displayString += " (" + description.getNumericOID() + ")";
+                        displayString += " (" + description.getNumericOid() + ")";
                     }
-
+                    String info = SchemaUtils.getLdifLine( description );
                     ICompletionProposal proposal = new CompletionProposal( replacementString, offset, matchingRule
-                        .length(), replacementString.length(), getMatchingRuleImage(), displayString, null, schema
-                        .getMatchingRuleDescription( possibleMatchingRule ).getLine().getUnfoldedValue() );
+                        .length(), replacementString.length(), getMatchingRuleImage(), displayString, null, info );
                     proposalList.add( proposal );
                 }
             }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterTextHover.java Tue Mar 25 16:05:04 2008
@@ -21,16 +21,17 @@
 package org.apache.directory.studio.ldapbrowser.common.filtereditor;
 
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.MatchingRuleDescription;
+import org.apache.directory.shared.ldap.schema.syntax.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilter;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterExtensibleComponent;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilterItemComponent;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterParser;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterToken;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.MatchingRuleDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.text.IRegion;
 import org.eclipse.jface.text.ITextHover;
 import org.eclipse.jface.text.ITextViewer;
@@ -96,8 +97,8 @@
                     String attributeType = fc.getAttributeToken().getValue();
                     AttributeTypeDescription attributeTypeDescription = schema
                         .getAttributeTypeDescription( attributeType );
-                    return attributeTypeDescription.getLine() != null ? attributeTypeDescription.getLine()
-                        .getUnfoldedValue() : null;
+                    String ldifLine = SchemaUtils.getLdifLine( attributeTypeDescription );
+                    return ldifLine;
                 }
                 if ( fc.getAttributeToken() != null
                     && IAttribute.OBJECTCLASS_ATTRIBUTE.equalsIgnoreCase( fc.getAttributeToken().getValue() )
@@ -106,8 +107,8 @@
                 {
                     String objectClass = fc.getValueToken().getValue();
                     ObjectClassDescription objectClassDescription = schema.getObjectClassDescription( objectClass );
-                    return objectClassDescription.getLine() != null ? objectClassDescription.getLine()
-                        .getUnfoldedValue() : null;
+                    String ldifLine = SchemaUtils.getLdifLine( objectClassDescription );
+                    return ldifLine;
                 }
             }
             if ( filter.getFilterComponent() instanceof LdapFilterExtensibleComponent )
@@ -121,8 +122,8 @@
                     String attributeType = fc.getAttributeToken().getValue();
                     AttributeTypeDescription attributeTypeDescription = schema
                         .getAttributeTypeDescription( attributeType );
-                    return attributeTypeDescription.getLine() != null ? attributeTypeDescription.getLine()
-                        .getUnfoldedValue() : null;
+                    String ldifLine = SchemaUtils.getLdifLine( attributeTypeDescription );
+                    return ldifLine;
                 }
                 if ( fc.getMatchingRuleToken() != null
                     && fc.getMatchingRuleToken().getOffset() <= hoverRegion.getOffset()
@@ -131,8 +132,8 @@
                 {
                     String matchingRule = fc.getMatchingRuleToken().getValue();
                     MatchingRuleDescription matchingRuleDescription = schema.getMatchingRuleDescription( matchingRule );
-                    return matchingRuleDescription.getLine() != null ? matchingRuleDescription.getLine()
-                        .getUnfoldedValue() : null;
+                    String info = SchemaUtils.getLdifLine( matchingRuleDescription );
+                    return info;
                 }
             }
         }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/ModWidget.java Tue Mar 25 16:05:04 2008
@@ -26,6 +26,7 @@
 
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
 import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.fieldassist.DecoratedField;
@@ -247,7 +248,7 @@
         modSpec.modType = BaseWidgetUtils.createCombo( modSpecComposite, new String[]
             { "add", "replace", "delete" }, 0, 1 );
         modSpec.modType.addModifyListener( this );
-        String[] attributeDescriptions = schema.getAttributeTypeDescriptionNames();
+        String[] attributeDescriptions = SchemaUtils.getNamesAsArray( schema.getAttributeTypeDescriptions() );
         Arrays.sort( attributeDescriptions );
 
         // attribute combo with field decoration

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java Tue Mar 25 16:05:04 2008
@@ -107,7 +107,6 @@
      */
     private void activateEditor()
     {
-
         if ( !viewer.isCellEditorActive()
             && getSelectedValues().length == 1
             && getSelectedAttributes().length == 0
@@ -147,8 +146,7 @@
      */
     private void editorClosed()
     {
-
-        // remove cell editors from viewer to prevend auto-editing
+        // remove cell editors from viewer to prevent auto-editing
         for ( int i = 0; i < viewer.getCellEditors().length; i++ )
         {
             viewer.getCellEditors()[i] = null;

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReturningAttributesWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReturningAttributesWidget.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReturningAttributesWidget.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/ReturningAttributesWidget.java Tue Mar 25 16:05:04 2008
@@ -27,6 +27,7 @@
 import org.apache.directory.studio.ldapbrowser.common.widgets.DialogContentAssistant;
 import org.apache.directory.studio.ldapbrowser.common.widgets.HistoryUtils;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.eclipse.jface.text.IDocument;
 import org.eclipse.swt.events.ModifyEvent;
@@ -137,8 +138,8 @@
     public void setBrowserConnection( IBrowserConnection browserConnection )
     {
         this.browserConnection = browserConnection;
-        contentAssistProcessor.setPossibleAttributeTypes( browserConnection == null ? new String[0] : browserConnection.getSchema()
-            .getAttributeTypeDescriptionNames() );
+        contentAssistProcessor.setPossibleAttributeTypes( browserConnection == null ? new String[0] : SchemaUtils
+            .getNamesAsArray( browserConnection.getSchema().getAttributeTypeDescriptions() ) );
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java Tue Mar 25 16:05:04 2008
@@ -23,9 +23,11 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BrowserWidget;
@@ -36,7 +38,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch.SearchScope;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -699,10 +700,10 @@
                 {
                     if ( returnOperationalAttributesButton.getSelection() )
                     {
-                        AttributeTypeDescription[] opAtds = SchemaUtils
+                        Collection<AttributeTypeDescription> opAtds = SchemaUtils
                             .getOperationalAttributeDescriptions( browserConnectionWidget.getBrowserConnection().getSchema() );
-                        String[] attributeTypeDescriptionNames = SchemaUtils.getAttributeTypeDescriptionNames( opAtds );
-                        raList.addAll( Arrays.asList( attributeTypeDescriptionNames ) );
+                        Collection<String> opAtdNames = SchemaUtils.getNames( opAtds );
+                        raList.addAll( opAtdNames );
                         raList.add( ISearch.ALL_OPERATIONAL_ATTRIBUTES );
                     }
                     if ( returnOperationalAttributesButton.getSelection() != isActive( RETURN_OPERATIONALATTRIBUTES_CHECKED ) )

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/AttributeTypeWizardPage.java Tue Mar 25 16:05:04 2008
@@ -22,13 +22,16 @@
 
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.common.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.ldapbrowser.common.widgets.ListContentProposalProvider;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
 import org.eclipse.jface.fieldassist.ContentProposalAdapter;
 import org.eclipse.jface.fieldassist.DecoratedField;
@@ -124,7 +127,9 @@
         this.initialShowSubschemaAttributesOnly = initialShowSubschemaAttributesOnly;
         this.initialHideExistingAttributes = initialHideExistingAttributes;
 
-        possibleAttributeTypes = initialEntry.getBrowserConnection().getSchema().getAttributeTypeDescriptionNames();
+        Collection<AttributeTypeDescription> atds = initialEntry.getBrowserConnection().getSchema().getAttributeTypeDescriptions();
+        Collection<String> atdNames = SchemaUtils.getNames( atds );
+        possibleAttributeTypes = atdNames.toArray( new String[atdNames.size()] );
         Arrays.sort( possibleAttributeTypes );
         possibleAttributeTypesSubschemaOnly = initialEntry.getSubschema().getAllAttributeNames();
         Arrays.sort( possibleAttributeTypesSubschemaOnly );

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/valueeditors/ValueEditorManager.java Tue Mar 25 16:05:04 2008
@@ -29,6 +29,8 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
@@ -40,9 +42,8 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Attribute;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.LdapSyntaxDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.apache.directory.studio.ldifparser.LdifUtils;
 import org.eclipse.core.runtime.IConfigurationElement;
@@ -185,49 +186,48 @@
      */
     public IValueEditor getCurrentValueEditor( Schema schema, String attributeType )
     {
-
         // check user-selected (forced) value editor
-        if ( this.userSelectedValueEditor != null )
+        if ( userSelectedValueEditor != null )
         {
-            return this.userSelectedValueEditor;
+            return userSelectedValueEditor;
         }
 
         // check attribute preferences
         AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeType );
         Map<String, String> attributeValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
             .getAttributeValueEditorMap();
-        if ( atd.getNumericOID() != null && attributeValueEditorMap.containsKey( atd.getNumericOID().toLowerCase() ) )
+        if ( atd.getNumericOid() != null && attributeValueEditorMap.containsKey( atd.getNumericOid().toLowerCase() ) )
         {
-            return ( IValueEditor ) this.class2ValueEditors.get( attributeValueEditorMap.get( atd.getNumericOID()
+            return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( atd.getNumericOid()
                 .toLowerCase() ) );
         }
-        String[] names = atd.getNames();
+        List<String> names = atd.getNames();
         for ( String name : names )
         {
             if ( attributeValueEditorMap.containsKey( name.toLowerCase() ) )
             {
-                return ( IValueEditor ) this.class2ValueEditors.get( attributeValueEditorMap.get( name.toLowerCase() ) );
+                return ( IValueEditor ) class2ValueEditors.get( attributeValueEditorMap.get( name.toLowerCase() ) );
             }
         }
 
         // check syntax preferences
-        LdapSyntaxDescription lsd = atd.getSyntaxDescription();
+        String syntaxNumericOid = SchemaUtils.getSyntaxNumericOidTransitive( atd, schema );
         Map<String, String> syntaxValueEditorMap = BrowserCommonActivator.getDefault().getValueEditorsPreferences()
             .getSyntaxValueEditorMap();
-        if ( lsd.getNumericOID() != null && syntaxValueEditorMap.containsKey( lsd.getNumericOID().toLowerCase() ) )
+        if ( syntaxNumericOid != null && syntaxValueEditorMap.containsKey( syntaxNumericOid.toLowerCase() ) )
         {
-            return ( IValueEditor ) this.class2ValueEditors.get( syntaxValueEditorMap.get( lsd.getNumericOID()
-                .toLowerCase() ) );
+            return ( IValueEditor ) class2ValueEditors.get( syntaxValueEditorMap.get( syntaxNumericOid.toLowerCase() ) );
         }
 
         // return default
-        if ( lsd.isBinary() )
+        LdapSyntaxDescription lsd = schema.getLdapSyntaxDescription( syntaxNumericOid );
+        if ( SchemaUtils.isBinary( lsd ) )
         {
-            return this.defaultBinaryValueEditor;
+            return defaultBinaryValueEditor;
         }
         else
         {
-            return this.defaultStringSingleLineValueEditor;
+            return defaultStringSingleLineValueEditor;
         }
 
     }
@@ -261,15 +261,15 @@
             .getDescription() );
 
         // here the value is known, we can check for single-line or multi-line
-        if ( ve == this.defaultStringSingleLineValueEditor )
+        if ( ve == defaultStringSingleLineValueEditor )
         {
             if ( value.getStringValue().indexOf( '\n' ) == -1 && value.getStringValue().indexOf( '\r' ) == -1 )
             {
-                ve = this.defaultStringSingleLineValueEditor;
+                ve = defaultStringSingleLineValueEditor;
             }
             else
             {
-                ve = this.defaultStringMultiLineValueEditor;
+                ve = defaultStringMultiLineValueEditor;
             }
         }
 
@@ -292,7 +292,7 @@
         }
         else if ( attributeHierarchy.size() == 1 && attributeHierarchy.getAttribute().getValueSize() == 0 )
         {
-            return this.getCurrentValueEditor( attributeHierarchy.getAttribute().getEntry(), attributeHierarchy
+            return getCurrentValueEditor( attributeHierarchy.getAttribute().getEntry(), attributeHierarchy
                 .getAttribute().getDescription() );
         }
         else if ( attributeHierarchy.size() == 1
@@ -304,18 +304,18 @@
             // perhaps this should be moved somewhere else
             if ( attributeHierarchy.getAttribute().isObjectClassAttribute() )
             {
-                return this.multiValuedValueEditor;
+                return multiValuedValueEditor;
             }
             if ( attributeHierarchy.getAttribute().getValues()[0].isRdnPart() )
             {
-                return this.multiValuedValueEditor;
+                return multiValuedValueEditor;
             }
 
-            return this.getCurrentValueEditor( attributeHierarchy.getAttribute().getValues()[0] );
+            return getCurrentValueEditor( attributeHierarchy.getAttribute().getValues()[0] );
         }
         else
         {
-            return this.multiValuedValueEditor;
+            return multiValuedValueEditor;
         }
     }
 
@@ -349,20 +349,20 @@
 
         AttributeTypeDescription atd = schema.getAttributeTypeDescription( attributeName );
 
-        if ( atd.getSyntaxDescription().isBinary() )
+        if ( SchemaUtils.isBinary( atd, schema ) )
         {
-            alternativeList.add( this.defaultBinaryValueEditor );
-            alternativeList.add( this.defaultStringSingleLineValueEditor );
-            alternativeList.add( this.defaultStringMultiLineValueEditor );
+            alternativeList.add( defaultBinaryValueEditor );
+            alternativeList.add( defaultStringSingleLineValueEditor );
+            alternativeList.add( defaultStringMultiLineValueEditor );
         }
-        else if ( atd.getSyntaxDescription().isString() )
+        else if ( SchemaUtils.isString( atd, schema ) )
         {
-            alternativeList.add( this.defaultStringSingleLineValueEditor );
-            alternativeList.add( this.defaultStringMultiLineValueEditor );
-            alternativeList.add( this.defaultBinaryValueEditor );
+            alternativeList.add( defaultStringSingleLineValueEditor );
+            alternativeList.add( defaultStringMultiLineValueEditor );
+            alternativeList.add( defaultBinaryValueEditor );
         }
 
-        alternativeList.add( this.multiValuedValueEditor );
+        alternativeList.add( multiValuedValueEditor );
 
         alternativeList.remove( getCurrentValueEditor( schema, attributeName ) );
 
@@ -384,18 +384,18 @@
 
         if ( value.isBinary() )
         {
-            alternativeList.add( this.defaultBinaryValueEditor );
-            alternativeList.add( this.defaultStringSingleLineValueEditor );
-            alternativeList.add( this.defaultStringMultiLineValueEditor );
+            alternativeList.add( defaultBinaryValueEditor );
+            alternativeList.add( defaultStringSingleLineValueEditor );
+            alternativeList.add( defaultStringMultiLineValueEditor );
         }
         else if ( value.isString() )
         {
-            alternativeList.add( this.defaultStringSingleLineValueEditor );
-            alternativeList.add( this.defaultStringMultiLineValueEditor );
-            alternativeList.add( this.defaultBinaryValueEditor );
+            alternativeList.add( defaultStringSingleLineValueEditor );
+            alternativeList.add( defaultStringMultiLineValueEditor );
+            alternativeList.add( defaultBinaryValueEditor );
         }
 
-        alternativeList.add( this.multiValuedValueEditor );
+        alternativeList.add( multiValuedValueEditor );
 
         alternativeList.remove( getCurrentValueEditor( value ) );
 
@@ -419,7 +419,7 @@
         }
         else if ( ah.size() == 1 && ah.getAttribute().getValueSize() == 0 )
         {
-            return this.getAlternativeValueEditors( ah.getAttribute().getEntry(), ah.getAttribute().getDescription() );
+            return getAlternativeValueEditors( ah.getAttribute().getEntry(), ah.getAttribute().getDescription() );
         }
         else if ( ah.size() == 1
             && ah.getAttribute().getValueSize() == 1
@@ -438,7 +438,7 @@
                 return new IValueEditor[0];
             }
 
-            return this.getAlternativeValueEditors( ah.getAttribute().getValues()[0] );
+            return getAlternativeValueEditors( ah.getAttribute().getValues()[0] );
         }
         else
         /* if(attribute.getValueSize() > 1) */{
@@ -457,13 +457,13 @@
         // use a set to avoid double entries
         Set<IValueEditor> list = new LinkedHashSet<IValueEditor>();
 
-        list.add( this.defaultStringSingleLineValueEditor );
-        list.add( this.defaultStringMultiLineValueEditor );
+        list.add( defaultStringSingleLineValueEditor );
+        list.add( defaultStringMultiLineValueEditor );
         list.add( defaultBinaryValueEditor );
 
-        list.addAll( this.class2ValueEditors.values() );
+        list.addAll( class2ValueEditors.values() );
 
-        list.add( this.multiValuedValueEditor );
+        list.add( multiValuedValueEditor );
 
         return list.toArray( new IValueEditor[list.size()] );
     }
@@ -542,8 +542,8 @@
                 EventRegistry.resumeEventFireingInCurrentThread();
 
                 Object newValue;
-                if ( entry.getBrowserConnection().getSchema().getAttributeTypeDescription( attributeDescription )
-                    .getSyntaxDescription().isString() )
+                if ( SchemaUtils.isString( entry.getBrowserConnection().getSchema().getAttributeTypeDescription(
+                    attributeDescription ), entry.getBrowserConnection().getSchema() ) )
                 {
                     if ( newRawValue instanceof String )
                     {

Modified: directory/studio/trunk/ldapbrowser-core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/META-INF/MANIFEST.MF?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/ldapbrowser-core/META-INF/MANIFEST.MF Tue Mar 25 16:05:04 2008
@@ -21,7 +21,6 @@
  org.apache.directory.studio.ldapbrowser.core.model.filter.parser,
  org.apache.directory.studio.ldapbrowser.core.model.impl,
  org.apache.directory.studio.ldapbrowser.core.model.schema,
- org.apache.directory.studio.ldapbrowser.core.model.schema.parser,
  org.apache.directory.studio.ldapbrowser.core.propertypageproviders,
  org.apache.directory.studio.ldapbrowser.core.utils
 Bundle-ClassPath: .,

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCorePreferences.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCorePreferences.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCorePreferences.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserCorePreferences.java Tue Mar 25 16:05:04 2008
@@ -44,22 +44,22 @@
 
 
     /**
-     * Gets the oids and names of the binary attributes
+     * Gets the OIDs and names of the binary attributes
      *
      * @return
-     *      the oids and names of the binary attributes
+     *      the OIDs and names of the binary attributes
      */
-    public Set getBinaryAttributeOidsAndNames()
+    public Set<String> getUpperCasedBinaryAttributeOidsAndNames()
     {
         if ( binaryAttributeCache == null )
         {
             binaryAttributeCache = new HashSet<String>();
-            BinaryAttribute[] binaryAttributes =getBinaryAttributes();
-            for ( int i = 0; i < binaryAttributes.length; i++ )
+            BinaryAttribute[] binaryAttributes = getBinaryAttributes();
+            for ( BinaryAttribute binaryAttribute : binaryAttributes )
             {
-                if ( binaryAttributes[i].getAttributeNumericOidOrName() != null )
+                if ( binaryAttribute.getAttributeNumericOidOrName() != null )
                 {
-                    binaryAttributeCache.add( binaryAttributes[i].getAttributeNumericOidOrName() );
+                    binaryAttributeCache.add( binaryAttribute.getAttributeNumericOidOrName().toUpperCase() );
                 }
             }
         }
@@ -119,21 +119,21 @@
 
 
     /**
-     * Gets the binary syntax oids.
+     * Gets the binary syntax OIDs.
      * 
-     * @return the binary syntax oids
+     * @return the binary syntax OIDs
      */
-    public Set<String> getBinarySyntaxOids()
+    public Set<String> getUpperCasedBinarySyntaxOids()
     {
         if ( binarySyntaxCache == null )
         {
             binarySyntaxCache = new HashSet<String>();
             BinarySyntax[] binarySyntaxes = getBinarySyntaxes();
-            for ( int i = 0; i < binarySyntaxes.length; i++ )
+            for ( BinarySyntax binarySyntax : binarySyntaxes )
             {
-                if ( binarySyntaxes[i].getSyntaxNumericOid() != null )
+                if ( binarySyntax.getSyntaxNumericOid() != null )
                 {
-                    binarySyntaxCache.add( binarySyntaxes[i].getSyntaxNumericOid() );
+                    binarySyntaxCache.add( binarySyntax.getSyntaxNumericOid().toUpperCase() );
                 }
             }
         }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java Tue Mar 25 16:05:04 2008
@@ -23,6 +23,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
@@ -33,6 +34,7 @@
 import javax.naming.InvalidNameException;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -50,7 +52,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.impl.BaseDNEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DirectoryMetadataEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Search;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 
 
@@ -179,10 +180,10 @@
         raSet.add( ISearch.ALL_USER_ATTRIBUTES );
         if ( initOperationalAttributes )
         {
-            AttributeTypeDescription[] opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry
+            Collection<AttributeTypeDescription> opAtds = SchemaUtils.getOperationalAttributeDescriptions( entry
                 .getBrowserConnection().getSchema() );
-            String[] attributeTypeDescriptionNames = SchemaUtils.getAttributeTypeDescriptionNames( opAtds );
-            raSet.addAll( Arrays.asList( attributeTypeDescriptionNames ) );
+            Collection<String> atdNames = SchemaUtils.getNames( opAtds );
+            raSet.addAll( atdNames );
             if ( entry.getBrowserConnection().getRootDSE().isFeatureSupported(
                 IRootDSE.FEATURE_ALL_OPERATIONAL_ATTRIBUTES_OID ) )
             {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java Tue Mar 25 16:05:04 2008
@@ -37,6 +37,7 @@
 import javax.naming.ldap.BasicControl;
 import javax.naming.ldap.Control;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.DnUtils;
@@ -61,7 +62,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Entry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.ReferralBaseEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.Value;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.utils.JNDIUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 
@@ -527,12 +527,13 @@
 
                     if ( IAttribute.OBJECTCLASS_ATTRIBUTE.equalsIgnoreCase( attributeDescription ) )
                     {
-                        if ( ObjectClassDescription.OC_ALIAS.equalsIgnoreCase( value ) )
+                        if ( SchemaConstants.ALIAS_OC.equalsIgnoreCase( value ) )
                         {
                             entry.setAlias( true );
                             entry.setHasChildrenHint( false );
                         }
-                        if ( ObjectClassDescription.OC_REFERRAL.equalsIgnoreCase( value ) )
+                        
+                        if ( SchemaConstants.REFERRAL_OC.equalsIgnoreCase( value ) )
                         {
                             entry.setReferral( true );
                             entry.setHasChildrenHint( false );

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/AttributeDescription.java Tue Mar 25 16:05:04 2008
@@ -26,7 +26,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
 
 
@@ -163,7 +163,7 @@
         }
 
         AttributeTypeDescription atd = schema.getAttributeTypeDescription( parsedAttributeType );
-        String oidString = atd.getNumericOID();
+        String oidString = atd.getNumericOid();
 
         if ( !parsedLangList.isEmpty() )
         {
@@ -228,7 +228,7 @@
         if ( myAtd != otherAtd )
         {
             AttributeTypeDescription superiorAtd = null;
-            String superiorName = myAtd.getSuperiorAttributeTypeDescriptionName();
+            String superiorName = myAtd.getSuperType();
             while ( superiorName != null )
             {
                 superiorAtd = schema.getAttributeTypeDescription( superiorName );
@@ -236,7 +236,7 @@
                 {
                     break;
                 }
-                superiorName = superiorAtd.getSuperiorAttributeTypeDescriptionName();
+                superiorName = superiorAtd.getSuperType();
             }
             if ( superiorAtd != otherAtd )
             {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java Tue Mar 25 16:05:04 2008
@@ -23,8 +23,8 @@
 
 import java.io.Serializable;
 
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.AttributePropertyPageProvider;
 import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
 import org.eclipse.core.runtime.IAdaptable;

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/RDNPart.java Tue Mar 25 16:05:04 2008
@@ -269,7 +269,7 @@
      */
     public String toOidString( Schema schema )
     {
-        String oid = schema != null ? schema.getAttributeTypeDescription( getType() ).getNumericOID() : getType();
+        String oid = schema != null ? schema.getAttributeTypeDescription( getType() ).getNumericOid() : getType();
         return oid.toLowerCase() + "=" + getValue().toLowerCase(); //$NON-NLS-1$
     }
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java?rev=641069&r1=641068&r2=641069&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java Tue Mar 25 16:05:04 2008
@@ -28,7 +28,11 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
+import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.syntax.ObjectClassDescription;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
@@ -46,8 +50,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.URL;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
-import org.apache.directory.studio.ldapbrowser.core.model.schema.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
 import org.eclipse.search.ui.ISearchPageScoreComputer;
 
@@ -232,7 +234,7 @@
             for ( int i = 0; i < ocValues.length; i++ )
             {
                 ObjectClassDescription ocd = getBrowserConnection().getSchema().getObjectClassDescription( ocValues[i] );
-                if ( ocd.isStructural() )
+                if ( ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL )
                 {
                     structuralObjectClassAvailable = true;
                     break;
@@ -247,7 +249,7 @@
             AttributeTypeDescription[] mustAtds = getSubschema().getMustAttributeTypeDescriptions();
             for ( AttributeTypeDescription mustAtd : mustAtds )
             {
-                if ( !ai.attributeMap.containsKey( mustAtd.getNumericOID().toLowerCase() ) )
+                if ( !ai.attributeMap.containsKey( mustAtd.getNumericOid().toLowerCase() ) )
                 {
                     return false;
                 }
@@ -296,7 +298,7 @@
         AttributeInfo ai = getBrowserConnectionImpl().getAttributeInfo( this );
         if ( ai != null )
         {
-            return Arrays.asList( getSubschema().getObjectClassNames() ).contains( ObjectClassDescription.OC_ALIAS );
+            return Arrays.asList( getSubschema().getObjectClassNames() ).contains( SchemaConstants.ALIAS_OC );
         }
 
         return false;
@@ -332,7 +334,7 @@
         AttributeInfo ai = getBrowserConnectionImpl().getAttributeInfo( this );
         if ( ai != null )
         {
-            return Arrays.asList( getSubschema().getObjectClassNames() ).contains( ObjectClassDescription.OC_REFERRAL );
+            return Arrays.asList( getSubschema().getObjectClassNames() ).contains( SchemaConstants.REFERRAL_OC );
         }
 
         return false;
@@ -368,7 +370,7 @@
         AttributeInfo ai = getBrowserConnectionImpl().getAttributeInfo( this );
         if ( ai != null )
         {
-            return Arrays.asList( getSubschema().getObjectClassNames() ).contains( ObjectClassDescription.OC_SUBENTRY );
+            return Arrays.asList( getSubschema().getObjectClassNames() ).contains( SchemaConstants.SUBENTRY_OC );
         }
 
         return false;



Mime
View raw message