You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2010/10/06 18:40:46 UTC

svn commit: r1005116 [3/4] - in /directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core: ./ events/ jobs/ model/ model/impl/ model/schema/ utils/

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/BrowserConnection.java Wed Oct  6 16:40:44 2010
@@ -25,9 +25,8 @@ import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
@@ -165,7 +164,7 @@ public class BrowserConnection implement
     /**
      * {@inheritDoc}
      */
-    public IEntry getEntryFromCache( LdapDN dn )
+    public IEntry getEntryFromCache( DN dn )
     {
         if ( dn == null )
         {
@@ -207,13 +206,13 @@ public class BrowserConnection implement
     /**
      * {@inheritDoc}
      */
-    public LdapDN getBaseDN()
+    public DN getBaseDN()
     {
         try
         {
-            return new LdapDN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
+            return new DN( connection.getConnectionParameter().getExtendedProperty( CONNECTION_PARAMETER_BASE_DN ) );
         }
-        catch ( InvalidNameException e )
+        catch ( LdapInvalidDnException e )
         {
             return null;
         }
@@ -223,7 +222,7 @@ public class BrowserConnection implement
     /**
      * {@inheritDoc}
      */
-    public void setBaseDN( LdapDN baseDN )
+    public void setBaseDN( DN baseDN )
     {
         connection.getConnectionParameter().setExtendedProperty( CONNECTION_PARAMETER_BASE_DN, baseDN.toString() );
         ConnectionEventRegistry.fireConnectionUpdated( connection, this );
@@ -612,7 +611,7 @@ public class BrowserConnection implement
      * 
      * @param dn the DN of the entry to remove from cache
      */
-    protected synchronized void uncacheEntry( LdapDN dn )
+    protected synchronized void uncacheEntry( DN dn )
     {
         dnToEntryCache.remove( Utils.getNormalizedOidString( dn, getSchema() ) );
     }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/ContinuedSearchResultEntry.java Wed Oct  6 16:40:44 2010
@@ -24,7 +24,7 @@ package org.apache.directory.studio.ldap
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
@@ -69,7 +69,7 @@ public class ContinuedSearchResultEntry 
      * @param connection the connection of the continued search
      * @param dn the DN of the entry
      */
-    public ContinuedSearchResultEntry( IBrowserConnection connection, LdapDN dn )
+    public ContinuedSearchResultEntry( IBrowserConnection connection, DN dn )
     {
         super( connection, dn );
         this.state = State.RESOLVED;

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java Wed Oct  6 16:40:44 2010
@@ -23,9 +23,9 @@ package org.apache.directory.studio.ldap
 
 import java.util.Collection;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
@@ -55,7 +55,7 @@ public abstract class DelegateEntry impl
     protected String connectionId;
 
     /** The DN. */
-    protected LdapDN dn;
+    protected DN dn;
 
     /** The entry does not exist flag. */
     protected boolean entryDoesNotExist;
@@ -75,7 +75,7 @@ public abstract class DelegateEntry impl
      * @param browserConnection the browser connection of the delegate
      * @param dn the DN of the delegate
      */
-    protected DelegateEntry( IBrowserConnection browserConnection, LdapDN dn )
+    protected DelegateEntry( IBrowserConnection browserConnection, DN dn )
     {
         this.connectionId = browserConnection.getConnection() != null ? browserConnection.getConnection().getId()
             : null;
@@ -149,7 +149,7 @@ public abstract class DelegateEntry impl
     /**
      * {@inheritDoc}
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         if ( getDelegate() != null )
         {
@@ -397,7 +397,7 @@ public abstract class DelegateEntry impl
     /**
      * {@inheritDoc}
      */
-    public Rdn getRdn()
+    public RDN getRdn()
     {
         if ( getDelegate() != null )
         {
@@ -405,8 +405,8 @@ public abstract class DelegateEntry impl
         }
         else
         {
-            Rdn rdn = dn.getRdn();
-            return rdn == null ? new Rdn() : rdn;
+            RDN rdn = dn.getRdn();
+            return rdn == null ? new RDN() : rdn;
         }
     }
 
@@ -917,7 +917,7 @@ public abstract class DelegateEntry impl
     /**
      * {@inheritDoc}
      */
-    public Collection<ObjectClassDescription> getObjectClassDescriptions()
+    public Collection<ObjectClass> getObjectClassDescriptions()
     {
         if ( getDelegate() != null )
         {

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DirectoryMetadataEntry.java Wed Oct  6 16:40:44 2010
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 
 
@@ -51,7 +51,7 @@ public class DirectoryMetadataEntry exte
      * @param dn the DN
      * @param browserConnection the browser connection
      */
-    public DirectoryMetadataEntry( LdapDN dn, IBrowserConnection browserConnection )
+    public DirectoryMetadataEntry( DN dn, IBrowserConnection browserConnection )
     {
         super();
         this.baseDn = dn;

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyConnection.java Wed Oct  6 16:40:44 2010
@@ -21,7 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.BookmarkManager;
@@ -61,9 +61,9 @@ public class DummyConnection implements 
     /** 
      * {@inheritDoc}
      */
-    public LdapDN getBaseDN()
+    public DN getBaseDN()
     {
-        return LdapDN.EMPTY_LDAPDN;
+        return DN.EMPTY_DN;
     }
 
 
@@ -97,7 +97,7 @@ public class DummyConnection implements 
     /** 
      * {@inheritDoc}
      */
-    public IEntry getEntryFromCache( LdapDN dn )
+    public IEntry getEntryFromCache( DN dn )
     {
         return null;
     }
@@ -151,7 +151,7 @@ public class DummyConnection implements 
     /** 
      * {@inheritDoc}
      */
-    public void setBaseDN( LdapDN baseDN )
+    public void setBaseDN( DN baseDN )
     {
     }
 

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java Wed Oct  6 16:40:44 2010
@@ -28,9 +28,9 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.events.AttributeAddedEvent;
@@ -64,7 +64,7 @@ public class DummyEntry implements IEntr
     private static final long serialVersionUID = 4833907766031149971L;
 
     /** The DN. */
-    private LdapDN dn;
+    private DN dn;
 
     /** The browser connection. */
     private IBrowserConnection browserConnection;
@@ -84,7 +84,7 @@ public class DummyEntry implements IEntr
      * @param dn the DN
      * @param browserConnection the browser connection
      */
-    public DummyEntry( LdapDN dn, IBrowserConnection browserConnection )
+    public DummyEntry( DN dn, IBrowserConnection browserConnection )
     {
         this.dn = dn;
         this.browserConnection = browserConnection;
@@ -97,7 +97,7 @@ public class DummyEntry implements IEntr
      * 
      * @param dn the new DN
      */
-    public void setDn( LdapDN dn )
+    public void setDn( DN dn )
     {
         this.dn = dn;
     }
@@ -208,7 +208,7 @@ public class DummyEntry implements IEntr
     /**
      * {@inheritDoc}
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         return dn;
     }
@@ -235,10 +235,10 @@ public class DummyEntry implements IEntr
     /**
      * {@inheritDoc}
      */
-    public Rdn getRdn()
+    public RDN getRdn()
     {
-        Rdn rdn = dn.getRdn();
-        return rdn == null ? new Rdn() : rdn;
+        RDN rdn = dn.getRdn();
+        return rdn == null ? new RDN() : rdn;
     }
 
 
@@ -528,9 +528,9 @@ public class DummyEntry implements IEntr
     }
 
 
-    public Collection<ObjectClassDescription> getObjectClassDescriptions()
+    public Collection<ObjectClass> getObjectClassDescriptions()
     {
-        Collection<ObjectClassDescription> ocds = new ArrayList<ObjectClassDescription>();
+        Collection<ObjectClass> ocds = new ArrayList<ObjectClass>();
         IAttribute ocAttribute = getAttribute( SchemaConstants.OBJECT_CLASS_AT );
         if ( ocAttribute != null )
         {
@@ -538,7 +538,7 @@ public class DummyEntry implements IEntr
             Schema schema = getBrowserConnection().getSchema();
             for ( String ocName : ocNames )
             {
-                ObjectClassDescription ocd = schema.getObjectClassDescription( ocName );
+                ObjectClass ocd = schema.getObjectClassDescription( ocName );
                 ocds.add( ocd );
             }
         }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Entry.java Wed Oct  6 16:40:44 2010
@@ -21,8 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.core.model.impl;
 
 
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.studio.connection.core.DnUtils;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -39,7 +39,7 @@ public class Entry extends AbstractEntry
     private static final long serialVersionUID = -4718107307581983276L;
 
     /** The RDN. */
-    protected Rdn rdn;
+    protected RDN rdn;
 
     /** The parent entry. */
     protected IEntry parent;
@@ -56,7 +56,7 @@ public class Entry extends AbstractEntry
      * @param parent the parent entry
      * @param rdn the RDN
      */
-    public Entry( IEntry parent, Rdn rdn )
+    public Entry( IEntry parent, RDN rdn )
     {
         assert parent != null;
         assert rdn != null;
@@ -70,7 +70,7 @@ public class Entry extends AbstractEntry
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.impl.AbstractEntry#getRdn()
      */
-    public Rdn getRdn()
+    public RDN getRdn()
     {
         // performance opt.
         return rdn;
@@ -80,9 +80,9 @@ public class Entry extends AbstractEntry
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.IEntry#getDn()
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
-        LdapDN dn = DnUtils.composeDn( rdn, parent.getDn() );
+        DN dn = DnUtils.composeDn( rdn, parent.getDn() );
         return dn;
     }
 
@@ -108,7 +108,7 @@ public class Entry extends AbstractEntry
     /**
      * @see org.apache.directory.studio.ldapbrowser.core.model.impl.AbstractEntry#setRdn(org.apache.directory.studio.ldapbrowser.core.model.RDN)
      */
-    protected void setRdn( Rdn newRdn )
+    protected void setRdn( RDN newRdn )
     {
         this.rdn = newRdn;
     }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/RootDSE.java Wed Oct  6 16:40:44 2010
@@ -24,7 +24,7 @@ package org.apache.directory.studio.ldap
 import java.util.Arrays;
 
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
@@ -54,7 +54,7 @@ public final class RootDSE extends BaseD
      */
     public RootDSE( IBrowserConnection browserConnection )
     {
-        super( LdapDN.EMPTY_LDAPDN, browserConnection );
+        super( DN.EMPTY_DN, browserConnection );
     }
 
 

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Search.java Wed Oct  6 16:40:44 2010
@@ -25,12 +25,12 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
+import org.apache.directory.studio.connection.core.StudioControl;
 import org.apache.directory.studio.connection.core.jobs.StudioConnectionBulkRunnableWithProgress;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.SearchUpdateEvent;
@@ -151,7 +151,7 @@ public class Search implements ISearch
      * @param controls
      *                the controls
      */
-    public Search( String searchName, IBrowserConnection conn, LdapDN searchBase, String filter,
+    public Search( String searchName, IBrowserConnection conn, DN searchBase, String filter,
         String[] returningAttributes, SearchScope scope, int countLimit, int timeLimit,
         AliasDereferencingMethod aliasesDereferencingMethod, ReferralHandlingMethod referralsHandlingMethod,
         boolean initHasChildrenFlag, List<StudioControl> controls )
@@ -345,7 +345,7 @@ public class Search implements ISearch
     /**
      * {@inheritDoc}
      */
-    public LdapDN getSearchBase()
+    public DN getSearchBase()
     {
         return searchParameter.getSearchBase();
     }
@@ -354,7 +354,7 @@ public class Search implements ISearch
     /**
      * {@inheritDoc}
      */
-    public void setSearchBase( LdapDN searchBase )
+    public void setSearchBase( DN searchBase )
     {
         searchParameter.setSearchBase( searchBase );
         fireSearchUpdated( SearchUpdateEvent.EventDetail.SEARCH_PARAMETER_UPDATED );

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchContinuation.java Wed Oct  6 16:40:44 2010
@@ -81,17 +81,17 @@ public class SearchContinuation extends 
         {
             getSearchParameter().setFilter( searchContinuationURL.getFilter() );
         }
-        if ( searchContinuationURL.getScope() > -1 )
+        if ( searchContinuationURL.getScope().getScope() > -1 )
         {
             switch ( searchContinuationURL.getScope() )
             {
-                case 0:
+                case OBJECT:
                     getSearchParameter().setScope( SearchScope.OBJECT );
                     break;
-                case 1:
+                case ONELEVEL:
                     getSearchParameter().setScope( SearchScope.ONELEVEL );
                     break;
-                case 2:
+                case SUBTREE:
                     getSearchParameter().setScope( SearchScope.SUBTREE );
                     break;
             }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/SearchResult.java Wed Oct  6 16:40:44 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.util.ArrayList;
 
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
@@ -73,7 +73,7 @@ public class SearchResult implements ISe
     /**
      * {@inheritDoc}
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         return entry.getDn();
     }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/Value.java Wed Oct  6 16:40:44 2010
@@ -23,7 +23,7 @@ package org.apache.directory.studio.ldap
 
 import java.util.Iterator;
 
-import org.apache.directory.shared.ldap.name.AttributeTypeAndValue;
+import org.apache.directory.shared.ldap.name.AVA;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.ldapbrowser.core.internal.search.LdapSearchPageScoreComputer;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -305,12 +305,12 @@ public class Value implements IValue
      */
     public boolean isRdnPart()
     {
-        Iterator<AttributeTypeAndValue> atavIterator = getAttribute().getEntry().getRdn().iterator();
+        Iterator<AVA> atavIterator = getAttribute().getEntry().getRdn().iterator();
         while ( atavIterator.hasNext() )
         {
-            AttributeTypeAndValue atav = atavIterator.next();
-            if ( getAttribute().getDescription().equals( atav.getUpType() )
-                && getStringValue().equals( atav.getNormValue().getString() ) )
+            AVA ava = atavIterator.next();
+            if ( getAttribute().getDescription().equals( ava.getUpType() )
+                && getStringValue().equals( ava.getNormValue().getString() ) )
             {
                 return true;
             }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Wed Oct  6 16:40:44 2010
@@ -36,17 +36,17 @@ import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
 import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescription;
 import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescriptionSchemaParser;
 import org.apache.directory.studio.connection.core.Utils;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeDescription;
@@ -72,12 +72,10 @@ public class Schema
 
     public static final String DN_SYNTAX_OID = "1.3.6.1.4.1.1466.115.121.1.12";
 
-    public static final LdapSyntaxDescription DUMMY_LDAP_SYNTAX;
+    public static final LdapSyntax DUMMY_LDAP_SYNTAX;
     static
     {
-        DUMMY_LDAP_SYNTAX = new LdapSyntaxDescription();
-        DUMMY_LDAP_SYNTAX.setNumericOid( "" );
-        DUMMY_LDAP_SYNTAX.setDescription( "" );
+        DUMMY_LDAP_SYNTAX = new LdapSyntax( "", "" );
     }
 
     public static final HashMap<String, List<String>> DUMMY_EXTENSIONS;
@@ -122,21 +120,21 @@ public class Schema
 
     private LdifContentRecord schemaRecord;
 
-    private LdapDN dn;
+    private DN dn;
 
     private String createTimestamp;
 
     private String modifyTimestamp;
 
-    private Map<String, ObjectClassDescription> ocdMapByNameOrNumericOid;
+    private Map<String, ObjectClass> ocdMapByNameOrNumericOid;
 
-    private Map<String, AttributeTypeDescription> atdMapByNameOrNumericOid;
+    private Map<String, AttributeType> atdMapByNameOrNumericOid;
 
-    private Map<String, LdapSyntaxDescription> lsdMapByNumericOid;
+    private Map<String, LdapSyntax> lsdMapByNumericOid;
 
-    private Map<String, MatchingRuleDescription> mrdMapByNameOrNumericOid;
+    private Map<String, MatchingRule> mrdMapByNameOrNumericOid;
 
-    private Map<String, MatchingRuleUseDescription> mrudMapByNameOrNumericOid;
+    private Map<String, MatchingRuleUse> mrudMapByNameOrNumericOid;
 
 
     /**
@@ -148,11 +146,11 @@ public class Schema
         this.dn = null;
         this.createTimestamp = null;
         this.modifyTimestamp = null;
-        this.ocdMapByNameOrNumericOid = new HashMap<String, ObjectClassDescription>();
-        this.atdMapByNameOrNumericOid = new HashMap<String, AttributeTypeDescription>();
-        this.lsdMapByNumericOid = new HashMap<String, LdapSyntaxDescription>();
-        this.mrdMapByNameOrNumericOid = new HashMap<String, MatchingRuleDescription>();
-        this.mrudMapByNameOrNumericOid = new HashMap<String, MatchingRuleUseDescription>();
+        this.ocdMapByNameOrNumericOid = new HashMap<String, ObjectClass>();
+        this.atdMapByNameOrNumericOid = new HashMap<String, AttributeType>();
+        this.lsdMapByNumericOid = new HashMap<String, LdapSyntax>();
+        this.mrdMapByNameOrNumericOid = new HashMap<String, MatchingRule>();
+        this.mrudMapByNameOrNumericOid = new HashMap<String, MatchingRuleUse>();
     }
 
 
@@ -234,7 +232,7 @@ public class Schema
     private void parseSchemaRecord( LdifContentRecord schemaRecord ) throws Exception
     {
         setSchemaRecord( schemaRecord );
-        setDn( new LdapDN( schemaRecord.getDnLine().getValueAsString() ) );
+        setDn( new DN( schemaRecord.getDnLine().getValueAsString() ) );
 
         ObjectClassDescriptionSchemaParser ocdPparser = new ObjectClassDescriptionSchemaParser();
         ocdPparser.setQuirksMode( true );
@@ -260,38 +258,38 @@ public class Schema
             {
                 if ( attributeName.equalsIgnoreCase( SchemaConstants.OBJECT_CLASSES_AT ) )
                 {
-                    ObjectClassDescription ocd = ocdPparser.parseObjectClassDescription( value );
+                    ObjectClass ocd = ocdPparser.parseObjectClassDescription( value );
                     ocd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
-                    addObjectClassDescription( ocd );
+                    addObjectClass( ocd );
                 }
                 else if ( attributeName.equalsIgnoreCase( SchemaConstants.ATTRIBUTE_TYPES_AT ) )
                 {
-                    AttributeTypeDescription atd = atdParser.parseAttributeTypeDescription( value );
+                    AttributeType atd = atdParser.parseAttributeTypeDescription( value );
                     atd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
-                    addAttributeTypeDescription( atd );
+                    addAttributeType( atd );
                 }
                 else if ( attributeName.equalsIgnoreCase( SchemaConstants.LDAP_SYNTAXES_AT ) )
                 {
-                    LdapSyntaxDescription lsd = lsdParser.parseLdapSyntaxDescription( value );
+                    LdapSyntax lsd = lsdParser.parseLdapSyntaxDescription( value );
                     if ( StringUtils.isEmpty( lsd.getDescription() )
-                        && Utils.getOidDescription( lsd.getNumericOid() ) != null )
+                        && Utils.getOidDescription( lsd.getOid() ) != null )
                     {
-                        lsd.setDescription( Utils.getOidDescription( lsd.getNumericOid() ) );
+                        lsd.setDescription( Utils.getOidDescription( lsd.getOid() ) );
                     }
                     lsd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
-                    addLdapSyntaxDescription( lsd );
+                    addLdapSyntax( lsd );
                 }
                 else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULES_AT ) )
                 {
-                    MatchingRuleDescription mrd = mrdParser.parseMatchingRuleDescription( value );
+                    MatchingRule mrd = mrdParser.parseMatchingRuleDescription( value );
                     mrd.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
-                    addMatchingRuleDescription( mrd );
+                    addMatchingRule( mrd );
                 }
                 else if ( attributeName.equalsIgnoreCase( SchemaConstants.MATCHING_RULE_USE_AT ) )
                 {
-                    MatchingRuleUseDescription mrud = mrudParser.parseMatchingRuleUseDescription( value );
+                    MatchingRuleUse mrud = mrudParser.parseMatchingRuleUseDescription( value );
                     mrud.addExtension( RAW_SCHEMA_DEFINITION_LDIF_VALUE, ldifValues );
-                    addMatchingRuleUseDescription( mrud );
+                    addMatchingRuleUse( mrud );
                 }
                 else if ( attributeName.equalsIgnoreCase( SchemaConstants.CREATE_TIMESTAMP_AT ) )
                 {
@@ -310,32 +308,31 @@ public class Schema
             }
         }
 
-        for ( AttributeTypeDescription atd : getAttributeTypeDescriptions() )
+        for ( AttributeType atd : getAttributeTypeDescriptions() )
         {
             // assume all received syntaxes in attributes are valid -> create pseudo syntaxes if missing
-            String syntaxOid = atd.getSyntax();
+            String syntaxOid = atd.getSyntaxName();
             if ( syntaxOid != null && !hasLdapSyntaxDescription( syntaxOid ) )
             {
-                LdapSyntaxDescription lsd = new LdapSyntaxDescription();
-                lsd.setNumericOid( syntaxOid );
+                LdapSyntax lsd = new LdapSyntax( syntaxOid );
                 lsd.setDescription( Utils.getOidDescription( syntaxOid ) );
-                addLdapSyntaxDescription( lsd );
+                addLdapSyntax( lsd );
             }
 
             // assume all received matching rules in attributes are valid -> create pseudo matching rules if missing
-            String emr = atd.getEqualityMatchingRule();
-            String omr = atd.getOrderingMatchingRule();
-            String smr = atd.getSubstringsMatchingRule();
+            String emr = atd.getEqualityName();
+            String omr = atd.getOrderingName();
+            String smr = atd.getSubstringName();
             checkMatchingRules( emr, omr, smr );
         }
 
         // set extensibleObject may attributes
-        ObjectClassDescription extensibleObjectOcd = this
+        ObjectClass extensibleObjectOcd = this
             .getObjectClassDescription( SchemaConstants.EXTENSIBLE_OBJECT_OC );
-        Collection<AttributeTypeDescription> userAtds = SchemaUtils.getUserAttributeDescriptions( this );
+        Collection<AttributeType> userAtds = SchemaUtils.getUserAttributeDescriptions( this );
         Collection<String> atdNames = SchemaUtils.getNames( userAtds );
         List<String> atdNames2 = new ArrayList<String>( atdNames );
-        extensibleObjectOcd.setMayAttributeTypes( atdNames2 );
+        extensibleObjectOcd.setMayAttributeTypeOids( atdNames2 );
     }
 
 
@@ -345,10 +342,9 @@ public class Schema
         {
             if ( matchingRule != null && !hasMatchingRuleDescription( matchingRule ) )
             {
-                MatchingRuleDescription mrd = new MatchingRuleDescription();
-                mrd.setNumericOid( matchingRule );
+                MatchingRule mrd = new MatchingRule( matchingRule );
                 mrd.getNames().add( matchingRule );
-                addMatchingRuleDescription( mrd );
+                addMatchingRule( mrd );
             }
         }
     }
@@ -382,7 +378,7 @@ public class Schema
      * 
      * @return the DN of the schema record, may be null
      */
-    public LdapDN getDn()
+    public DN getDn()
     {
         return dn;
     }
@@ -393,7 +389,7 @@ public class Schema
      * 
      * @param dn the new DN
      */
-    public void setDn( LdapDN dn )
+    public void setDn( DN dn )
     {
         this.dn = dn;
     }
@@ -450,11 +446,11 @@ public class Schema
      * 
      * @param ocd the object class description
      */
-    private void addObjectClassDescription( ObjectClassDescription ocd )
+    private void addObjectClass( ObjectClass ocd )
     {
-        if ( ocd.getNumericOid() != null )
+        if ( ocd.getOid() != null )
         {
-            ocdMapByNameOrNumericOid.put( ocd.getNumericOid().toLowerCase(), ocd );
+            ocdMapByNameOrNumericOid.put( ocd.getOid().toLowerCase(), ocd );
         }
         if ( ocd.getNames() != null && !ocd.getNames().isEmpty() )
         {
@@ -471,9 +467,9 @@ public class Schema
      * 
      * @return the object class descriptions
      */
-    public Collection<ObjectClassDescription> getObjectClassDescriptions()
+    public Collection<ObjectClass> getObjectClassDescriptions()
     {
-        Set<ObjectClassDescription> set = new HashSet<ObjectClassDescription>( ocdMapByNameOrNumericOid.values() );
+        Set<ObjectClass> set = new HashSet<ObjectClass>( ocdMapByNameOrNumericOid.values() );
         return set;
     }
 
@@ -501,7 +497,7 @@ public class Schema
      * 
      * @return the object class description, or the default or a dummy
      */
-    public ObjectClassDescription getObjectClassDescription( String nameOrOid )
+    public ObjectClass getObjectClassDescription( String nameOrOid )
     {
         if ( ocdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) )
         {
@@ -516,8 +512,7 @@ public class Schema
             // DUMMY
             List<String> names = new ArrayList<String>();
             names.add( nameOrOid );
-            ObjectClassDescription ocd = new ObjectClassDescription();
-            ocd.setNumericOid( nameOrOid );
+            ObjectClass ocd = new ObjectClass( nameOrOid );
             ocd.setNames( names );
             ocd.setExtensions( DUMMY_EXTENSIONS );
             return ocd;
@@ -532,11 +527,11 @@ public class Schema
      * 
      * @param atd the attribute type description
      */
-    private void addAttributeTypeDescription( AttributeTypeDescription atd )
+    private void addAttributeType( AttributeType atd )
     {
-        if ( atd.getNumericOid() != null )
+        if ( atd.getOid() != null )
         {
-            atdMapByNameOrNumericOid.put( atd.getNumericOid().toLowerCase(), atd );
+            atdMapByNameOrNumericOid.put( atd.getOid().toLowerCase(), atd );
         }
         if ( atd.getNames() != null && !atd.getNames().isEmpty() )
         {
@@ -553,9 +548,9 @@ public class Schema
      * 
      * @return the attribute type descriptions
      */
-    public Collection<AttributeTypeDescription> getAttributeTypeDescriptions()
+    public Collection<AttributeType> getAttributeTypeDescriptions()
     {
-        Set<AttributeTypeDescription> set = new HashSet<AttributeTypeDescription>( atdMapByNameOrNumericOid.values() );
+        Set<AttributeType> set = new HashSet<AttributeType>( atdMapByNameOrNumericOid.values() );
         return set;
     }
 
@@ -583,7 +578,7 @@ public class Schema
      * 
      * @return the attribute type description, or the default or a dummy
      */
-    public AttributeTypeDescription getAttributeTypeDescription( String nameOrOid )
+    public AttributeType getAttributeTypeDescription( String nameOrOid )
     {
         AttributeDescription ad = new AttributeDescription( nameOrOid );
         String attributeType = ad.getParsedAttributeType();
@@ -601,8 +596,7 @@ public class Schema
             // DUMMY
             List<String> attributeTypes = new ArrayList<String>();
             attributeTypes.add( attributeType );
-            AttributeTypeDescription atd = new AttributeTypeDescription();
-            atd.setNumericOid( attributeType );
+            AttributeType atd = new AttributeType( attributeType );
             atd.setNames( attributeTypes );
             atd.setUserModifiable( true );
             atd.setUsage( UsageEnum.USER_APPLICATIONS );
@@ -619,11 +613,11 @@ public class Schema
      * 
      * @param lsd the LDAP syntax description
      */
-    private void addLdapSyntaxDescription( LdapSyntaxDescription lsd )
+    private void addLdapSyntax( LdapSyntax lsd )
     {
-        if ( lsd.getNumericOid() != null )
+        if ( lsd.getOid() != null )
         {
-            lsdMapByNumericOid.put( lsd.getNumericOid().toLowerCase(), lsd );
+            lsdMapByNumericOid.put( lsd.getOid().toLowerCase(), lsd );
         }
     }
 
@@ -633,9 +627,9 @@ public class Schema
      * 
      * @return the LDAP syntax descriptions
      */
-    public Collection<LdapSyntaxDescription> getLdapSyntaxDescriptions()
+    public Collection<LdapSyntax> getLdapSyntaxDescriptions()
     {
-        Set<LdapSyntaxDescription> set = new HashSet<LdapSyntaxDescription>( lsdMapByNumericOid.values() );
+        Set<LdapSyntax> set = new HashSet<LdapSyntax>( lsdMapByNumericOid.values() );
         return set;
     }
 
@@ -661,7 +655,7 @@ public class Schema
      * 
      * @return the attribute type description or the default or a dummy
      */
-    public LdapSyntaxDescription getLdapSyntaxDescription( String numericOid )
+    public LdapSyntax getLdapSyntaxDescription( String numericOid )
     {
         if ( numericOid == null )
         {
@@ -678,8 +672,7 @@ public class Schema
         else
         {
             // DUMMY
-            LdapSyntaxDescription lsd = new LdapSyntaxDescription();
-            lsd.setNumericOid( numericOid );
+            LdapSyntax lsd = new LdapSyntax( numericOid );
             lsd.setExtensions( DUMMY_EXTENSIONS );
             return lsd;
         }
@@ -693,11 +686,11 @@ public class Schema
      * 
      * @param mrud the matching rule description
      */
-    private void addMatchingRuleDescription( MatchingRuleDescription mrd )
+    private void addMatchingRule( MatchingRule mrd )
     {
-        if ( mrd.getNumericOid() != null )
+        if ( mrd.getOid() != null )
         {
-            mrdMapByNameOrNumericOid.put( mrd.getNumericOid().toLowerCase(), mrd );
+            mrdMapByNameOrNumericOid.put( mrd.getOid().toLowerCase(), mrd );
         }
         if ( mrd.getNames() != null && !mrd.getNames().isEmpty() )
         {
@@ -714,9 +707,9 @@ public class Schema
      * 
      * @return the matching rule descriptions
      */
-    public Collection<MatchingRuleDescription> getMatchingRuleDescriptions()
+    public Collection<MatchingRule> getMatchingRuleDescriptions()
     {
-        Set<MatchingRuleDescription> set = new HashSet<MatchingRuleDescription>( mrdMapByNameOrNumericOid.values() );
+        Set<MatchingRule> set = new HashSet<MatchingRule>( mrdMapByNameOrNumericOid.values() );
         return set;
     }
 
@@ -744,7 +737,7 @@ public class Schema
      * 
      * @return the matching rule description or the default or a dummy
      */
-    public MatchingRuleDescription getMatchingRuleDescription( String nameOrOid )
+    public MatchingRule getMatchingRuleDescription( String nameOrOid )
     {
         if ( mrdMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) )
         {
@@ -757,8 +750,7 @@ public class Schema
         else
         {
             // DUMMY
-            MatchingRuleDescription mrd = new MatchingRuleDescription();
-            mrd.setNumericOid( nameOrOid );
+            MatchingRule mrd = new MatchingRule( nameOrOid );
             mrd.setExtensions( DUMMY_EXTENSIONS );
             return mrd;
         }
@@ -772,11 +764,11 @@ public class Schema
      * 
      * @param mrud the matching rule use description
      */
-    private void addMatchingRuleUseDescription( MatchingRuleUseDescription mrud )
+    private void addMatchingRuleUse( MatchingRuleUse mrud )
     {
-        if ( mrud.getNumericOid() != null )
+        if ( mrud.getOid() != null )
         {
-            mrudMapByNameOrNumericOid.put( mrud.getNumericOid().toLowerCase(), mrud );
+            mrudMapByNameOrNumericOid.put( mrud.getOid().toLowerCase(), mrud );
         }
         if ( mrud.getNames() != null && !mrud.getNames().isEmpty() )
         {
@@ -793,9 +785,9 @@ public class Schema
      * 
      * @return the matching rule use descriptions
      */
-    public Collection<MatchingRuleUseDescription> getMatchingRuleUseDescriptions()
+    public Collection<MatchingRuleUse> getMatchingRuleUseDescriptions()
     {
-        Set<MatchingRuleUseDescription> set = new HashSet<MatchingRuleUseDescription>( mrudMapByNameOrNumericOid
+        Set<MatchingRuleUse> set = new HashSet<MatchingRuleUse>( mrudMapByNameOrNumericOid
             .values() );
         return set;
     }
@@ -824,7 +816,7 @@ public class Schema
      * 
      * @return the matching rule use description or the default or a dummy
      */
-    public MatchingRuleUseDescription getMatchingRuleUseDescription( String nameOrOid )
+    public MatchingRuleUse getMatchingRuleUseDescription( String nameOrOid )
     {
         if ( mrudMapByNameOrNumericOid.containsKey( nameOrOid.toLowerCase() ) )
         {
@@ -837,8 +829,7 @@ public class Schema
         else
         {
             // DUMMY
-            MatchingRuleUseDescription mrud = new MatchingRuleUseDescription();
-            mrud.setNumericOid( nameOrOid );
+            MatchingRuleUse mrud = new MatchingRuleUse( nameOrOid );
             mrud.setExtensions( DUMMY_EXTENSIONS );
             return mrud;
         }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/SchemaUtils.java Wed Oct  6 16:40:44 2010
@@ -31,14 +31,14 @@ import java.util.TreeSet;
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.schema.AbstractSchemaObject;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.LdapSyntax;
+import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
+import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.ObjectClassTypeEnum;
 import org.apache.directory.shared.ldap.schema.UsageEnum;
-import org.apache.directory.shared.ldap.schema.parsers.AbstractSchemaDescription;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
-import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescription;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleUseDescription;
-import org.apache.directory.shared.ldap.schema.parsers.ObjectClassDescription;
 import org.apache.directory.studio.ldapbrowser.core.BrowserCorePlugin;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -165,9 +165,9 @@ public class SchemaUtils
         }
     };
 
-    private static final Comparator<AbstractSchemaDescription> schemaElementNameComparator = new Comparator<AbstractSchemaDescription>()
+    private static final Comparator<AbstractSchemaObject> schemaElementNameComparator = new Comparator<AbstractSchemaObject>()
     {
-        public int compare( AbstractSchemaDescription s1, AbstractSchemaDescription s2 )
+        public int compare( AbstractSchemaObject s1, AbstractSchemaObject s2 )
         {
             return SchemaUtils.toString( s1 ).compareToIgnoreCase( SchemaUtils.toString( s2 ) );
         }
@@ -181,10 +181,10 @@ public class SchemaUtils
      * 
      * @return the names
      */
-    public static Collection<String> getNames( Collection<? extends AbstractSchemaDescription> asds )
+    public static Collection<String> getNames( Collection<? extends AbstractSchemaObject> asds )
     {
         Set<String> nameSet = new TreeSet<String>( nameAndOidComparator );
-        for ( AbstractSchemaDescription asd : asds )
+        for ( AbstractSchemaObject asd : asds )
         {
             nameSet.addAll( asd.getNames() );
         }
@@ -199,7 +199,7 @@ public class SchemaUtils
      * 
      * @return the names
      */
-    public static String[] getNamesAsArray( Collection<? extends AbstractSchemaDescription> asds )
+    public static String[] getNamesAsArray( Collection<? extends AbstractSchemaObject> asds )
     {
         return getNames( asds ).toArray( new String[0] );
     }
@@ -210,12 +210,12 @@ public class SchemaUtils
      * 
      * @return the numeric OIDs of the given schema descriptions
      */
-    public static Collection<String> getNumericOids( Collection<? extends AbstractSchemaDescription> descritpions )
+    public static Collection<String> getNumericOids( Collection<? extends AbstractSchemaObject> descriptions )
     {
         Set<String> oids = new HashSet<String>();
-        for ( AbstractSchemaDescription asd : descritpions )
+        for ( AbstractSchemaObject asd : descriptions )
         {
-            oids.add( asd.getNumericOid() );
+            oids.add( asd.getOid() );
 
         }
         return oids;
@@ -229,12 +229,12 @@ public class SchemaUtils
      * 
      * @return the identifiers
      */
-    public static Collection<String> getLowerCaseIdentifiers( AbstractSchemaDescription asd )
+    public static Collection<String> getLowerCaseIdentifiers( AbstractSchemaObject asd )
     {
         Set<String> identiers = new HashSet<String>();
-        if ( asd.getNumericOid() != null )
+        if ( asd.getOid() != null )
         {
-            identiers.add( asd.getNumericOid().toLowerCase() );
+            identiers.add( asd.getOid().toLowerCase() );
         }
         if ( asd.getNames() != null && !asd.getNames().isEmpty() )
         {
@@ -258,13 +258,13 @@ public class SchemaUtils
      * 
      * @return the friendly identifier
      */
-    public static String getFriendlyIdentifier( AbstractSchemaDescription asd )
+    public static String getFriendlyIdentifier( AbstractSchemaObject asd )
     {
         if ( asd.getNames() != null && !asd.getNames().isEmpty() )
         {
             return asd.getNames().get( 0 );
         }
-        return asd.getNumericOid();
+        return asd.getOid();
     }
 
 
@@ -275,10 +275,10 @@ public class SchemaUtils
      * 
      * @return all operational attributes types
      */
-    public static Collection<AttributeTypeDescription> getOperationalAttributeDescriptions( Schema schema )
+    public static Collection<AttributeType> getOperationalAttributeDescriptions( Schema schema )
     {
-        Set<AttributeTypeDescription> operationalAtds = new HashSet<AttributeTypeDescription>();
-        for ( AttributeTypeDescription atd : schema.getAttributeTypeDescriptions() )
+        Set<AttributeType> operationalAtds = new HashSet<AttributeType>();
+        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
         {
             if ( isOperational( atd ) )
             {
@@ -296,10 +296,10 @@ public class SchemaUtils
      * 
      * @return all user attributes type descriptions
      */
-    public static Collection<AttributeTypeDescription> getUserAttributeDescriptions( Schema schema )
+    public static Collection<AttributeType> getUserAttributeDescriptions( Schema schema )
     {
-        Set<AttributeTypeDescription> userAtds = new HashSet<AttributeTypeDescription>();
-        for ( AttributeTypeDescription atd : schema.getAttributeTypeDescriptions() )
+        Set<AttributeType> userAtds = new HashSet<AttributeType>();
+        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
         {
             if ( !isOperational( atd ) )
             {
@@ -323,14 +323,14 @@ public class SchemaUtils
      * 
      * @return true, if is operational
      */
-    public static boolean isOperational( AttributeTypeDescription atd )
+    public static boolean isOperational( AttributeType atd )
     {
         return atd.getUsage() != UsageEnum.USER_APPLICATIONS || atd.getExtensions() == Schema.DUMMY_EXTENSIONS
             || CollectionUtils.containsAny( OPERATIONAL_ATTRIBUTES_OIDS_AND_NAMES, getLowerCaseIdentifiers( atd ) );
     }
 
 
-    public static boolean isModifiable( AttributeTypeDescription atd )
+    public static boolean isModifiable( AttributeType atd )
     {
         if ( atd == null )
         {
@@ -361,16 +361,16 @@ public class SchemaUtils
      * 
      * @return the must attribute type descriptions of all object class descriptions of the given entry.
      */
-    public static Collection<AttributeTypeDescription> getMustAttributeTypeDescriptions( IEntry entry )
+    public static Collection<AttributeType> getMustAttributeTypeDescriptions( IEntry entry )
     {
         Schema schema = entry.getBrowserConnection().getSchema();
-        Collection<AttributeTypeDescription> atds = new HashSet<AttributeTypeDescription>();
-        for ( ObjectClassDescription ocd : entry.getObjectClassDescriptions() )
+        Collection<AttributeType> atds = new HashSet<AttributeType>();
+        for ( ObjectClass ocd : entry.getObjectClassDescriptions() )
         {
             Collection<String> musts = getMustAttributeTypeDescriptionNamesTransitive( ocd, schema );
             for ( String must : musts )
             {
-                AttributeTypeDescription atd = schema.getAttributeTypeDescription( must );
+                AttributeType atd = schema.getAttributeTypeDescription( must );
                 atds.add( atd );
             }
         }
@@ -385,16 +385,16 @@ public class SchemaUtils
      * 
      * @return the may attribute type descriptions of all object class descriptions of the given entry.
      */
-    public static Collection<AttributeTypeDescription> getMayAttributeTypeDescriptions( IEntry entry )
+    public static Collection<AttributeType> getMayAttributeTypeDescriptions( IEntry entry )
     {
         Schema schema = entry.getBrowserConnection().getSchema();
-        Collection<AttributeTypeDescription> atds = new HashSet<AttributeTypeDescription>();
-        for ( ObjectClassDescription ocd : entry.getObjectClassDescriptions() )
+        Collection<AttributeType> atds = new HashSet<AttributeType>();
+        for ( ObjectClass ocd : entry.getObjectClassDescriptions() )
         {
             Collection<String> mays = getMayAttributeTypeDescriptionNamesTransitive( ocd, schema );
             for ( String may : mays )
             {
-                AttributeTypeDescription atd = schema.getAttributeTypeDescription( may );
+                AttributeType atd = schema.getAttributeTypeDescription( may );
                 atds.add( atd );
             }
         }
@@ -409,9 +409,9 @@ public class SchemaUtils
      * 
      * @return all attribute type descriptions of all object class descriptions of the given entry.
      */
-    public static Collection<AttributeTypeDescription> getAllAttributeTypeDescriptions( IEntry entry )
+    public static Collection<AttributeType> getAllAttributeTypeDescriptions( IEntry entry )
     {
-        Collection<AttributeTypeDescription> atds = new HashSet<AttributeTypeDescription>();
+        Collection<AttributeType> atds = new HashSet<AttributeType>();
         atds.addAll( getMustAttributeTypeDescriptions( entry ) );
         atds.addAll( getMayAttributeTypeDescriptions( entry ) );
         return atds;
@@ -427,7 +427,7 @@ public class SchemaUtils
      * 
      * @return false if the syntax is defined as binary
      */
-    public static boolean isString( LdapSyntaxDescription lsd )
+    public static boolean isString( LdapSyntax lsd )
     {
         return !isBinary( lsd );
     }
@@ -441,12 +441,12 @@ public class SchemaUtils
      * 
      * @return true if the syntax is defined as binary
      */
-    public static boolean isBinary( LdapSyntaxDescription lsd )
+    public static boolean isBinary( LdapSyntax lsd )
     {
         // check user-defined binary syntaxes
         Set<String> binarySyntaxOids = BrowserCorePlugin.getDefault().getCorePreferences()
             .getUpperCasedBinarySyntaxOids();
-        return binarySyntaxOids.contains( lsd.getNumericOid().toUpperCase() );
+        return binarySyntaxOids.contains( lsd.getOid().toUpperCase() );
     }
 
 
@@ -459,7 +459,7 @@ public class SchemaUtils
      * 
      * @return false if the attribute type is defined as binary
      */
-    public static boolean isString( AttributeTypeDescription atd, Schema schema )
+    public static boolean isString( AttributeType atd, Schema schema )
     {
         return !isBinary( atd, schema );
     }
@@ -474,12 +474,12 @@ public class SchemaUtils
      * 
      * @return true if the attribute type is defined as binary
      */
-    public static boolean isBinary( AttributeTypeDescription atd, Schema schema )
+    public static boolean isBinary( AttributeType atd, Schema schema )
     {
         // check user-defined binary attribute types
         Set<String> binaryAttributeOidsAndNames = BrowserCorePlugin.getDefault().getCorePreferences()
             .getUpperCasedBinaryAttributeOidsAndNames();
-        if ( binaryAttributeOidsAndNames.contains( atd.getNumericOid().toUpperCase() ) )
+        if ( binaryAttributeOidsAndNames.contains( atd.getOid().toUpperCase() ) )
         {
             return true;
         }
@@ -495,7 +495,7 @@ public class SchemaUtils
         String syntax = getSyntaxNumericOidTransitive( atd, schema );
         if ( syntax != null && schema.hasLdapSyntaxDescription( syntax ) )
         {
-            LdapSyntaxDescription lsd = schema.getLdapSyntaxDescription( syntax );
+            LdapSyntax lsd = schema.getLdapSyntaxDescription( syntax );
             return isBinary( lsd );
         }
 
@@ -511,15 +511,15 @@ public class SchemaUtils
      * 
      * @return all attribute type description using this syntax description
      */
-    public static Collection<AttributeTypeDescription> getUsedFromAttributeTypeDescriptions( LdapSyntaxDescription lsd,
+    public static Collection<AttributeType> getUsedFromAttributeTypeDescriptions( LdapSyntax lsd,
         Schema schema )
     {
-        Set<AttributeTypeDescription> usedFroms = new TreeSet<AttributeTypeDescription>( schemaElementNameComparator );
-        for ( AttributeTypeDescription atd : schema.getAttributeTypeDescriptions() )
+        Set<AttributeType> usedFroms = new TreeSet<AttributeType>( schemaElementNameComparator );
+        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
         {
             String syntax = getSyntaxNumericOidTransitive( atd, schema );
-            if ( syntax != null && lsd.getNumericOid() != null
-                && syntax.toLowerCase().equals( lsd.getNumericOid().toLowerCase() ) )
+            if ( syntax != null && lsd.getOid() != null
+                && syntax.toLowerCase().equals( lsd.getOid().toLowerCase() ) )
             {
                 usedFroms.add( atd );
             }
@@ -537,11 +537,11 @@ public class SchemaUtils
      * @return all attribute type descriptions using this matching rule for
      * equality, substring or ordering matching
      */
-    public static Collection<AttributeTypeDescription> getUsedFromAttributeTypeDescriptions(
-        MatchingRuleDescription mrd, Schema schema )
+    public static Collection<AttributeType> getUsedFromAttributeTypeDescriptions(
+        MatchingRule mrd, Schema schema )
     {
-        Set<AttributeTypeDescription> usedFromSet = new TreeSet<AttributeTypeDescription>( schemaElementNameComparator );
-        for ( AttributeTypeDescription atd : schema.getAttributeTypeDescriptions() )
+        Set<AttributeType> usedFromSet = new TreeSet<AttributeType>( schemaElementNameComparator );
+        for ( AttributeType atd : schema.getAttributeTypeDescriptions() )
         {
             Collection<String> lowerCaseIdentifiers = getLowerCaseIdentifiers( mrd );
             String emr = getEqualityMatchingRuleNameOrNumericOidTransitive( atd, schema );
@@ -574,16 +574,16 @@ public class SchemaUtils
      * @return the equality matching rule description name or OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getEqualityMatchingRuleNameOrNumericOidTransitive( AttributeTypeDescription atd, Schema schema )
+    public static String getEqualityMatchingRuleNameOrNumericOidTransitive( AttributeType atd, Schema schema )
     {
-        if ( atd.getEqualityMatchingRule() != null )
+        if ( atd.getEqualityName() != null )
         {
-            return atd.getEqualityMatchingRule();
+            return atd.getEqualityName();
         }
 
-        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
+        if ( atd.getSuperiorName() != null && schema.hasAttributeTypeDescription( atd.getSuperiorName() ) )
         {
-            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
+            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorName() );
             return getEqualityMatchingRuleNameOrNumericOidTransitive( superior, schema );
         }
 
@@ -601,16 +601,16 @@ public class SchemaUtils
      * @return the substring matching rule description name or OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getSubstringMatchingRuleNameOrNumericOidTransitive( AttributeTypeDescription atd, Schema schema )
+    public static String getSubstringMatchingRuleNameOrNumericOidTransitive( AttributeType atd, Schema schema )
     {
-        if ( atd.getSubstringsMatchingRule() != null )
+        if ( atd.getSubstringName() != null )
         {
-            return atd.getSubstringsMatchingRule();
+            return atd.getSubstringName();
         }
 
-        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
+        if ( atd.getSuperiorName() != null && schema.hasAttributeTypeDescription( atd.getSubstringName() ) )
         {
-            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
+            AttributeType superior = schema.getAttributeTypeDescription( atd.getSubstringName() );
             return getSubstringMatchingRuleNameOrNumericOidTransitive( superior, schema );
         }
 
@@ -628,16 +628,16 @@ public class SchemaUtils
      * @return the ordering matching rule description name or OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getOrderingMatchingRuleNameOrNumericOidTransitive( AttributeTypeDescription atd, Schema schema )
+    public static String getOrderingMatchingRuleNameOrNumericOidTransitive( AttributeType atd, Schema schema )
     {
-        if ( atd.getOrderingMatchingRule() != null )
+        if ( atd.getOrderingName() != null )
         {
-            return atd.getOrderingMatchingRule();
+            return atd.getOrderingName();
         }
 
-        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
+        if ( atd.getSuperiorName() != null && schema.hasAttributeTypeDescription( atd.getSuperiorName() ) )
         {
-            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
+            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorName() );
             return getOrderingMatchingRuleNameOrNumericOidTransitive( superior, schema );
         }
 
@@ -655,16 +655,16 @@ public class SchemaUtils
      * @return the syntax description OID of the given or the
      *         superior attribute type description, may be null
      */
-    public static String getSyntaxNumericOidTransitive( AttributeTypeDescription atd, Schema schema )
+    public static String getSyntaxNumericOidTransitive( AttributeType atd, Schema schema )
     {
-        if ( atd.getSyntax() != null )
+        if ( atd.getSyntaxName() != null )
         {
-            return atd.getSyntax();
+            return atd.getSyntaxName();
         }
 
-        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
+        if ( atd.getSuperiorName() != null && schema.hasAttributeTypeDescription( atd.getSuperiorName() ) )
         {
-            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
+            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorName() );
             return getSyntaxNumericOidTransitive( superior, schema );
         }
 
@@ -682,16 +682,16 @@ public class SchemaUtils
      * @return the syntax length of the given or the
      *         superior attribute type description, may be null
      */
-    public static int getSyntaxLengthTransitive( AttributeTypeDescription atd, Schema schema )
+    public static long getSyntaxLengthTransitive( AttributeType atd, Schema schema )
     {
         if ( atd.getSyntaxLength() != -1 )
         {
             return atd.getSyntaxLength();
         }
 
-        if ( atd.getSuperType() != null && schema.hasAttributeTypeDescription( atd.getSuperType() ) )
+        if ( atd.getSuperiorName() != null && schema.hasAttributeTypeDescription( atd.getSuperiorName() ) )
         {
-            AttributeTypeDescription superior = schema.getAttributeTypeDescription( atd.getSuperType() );
+            AttributeType superior = schema.getAttributeTypeDescription( atd.getSuperiorName() );
             return getSyntaxLengthTransitive( superior, schema );
         }
 
@@ -711,12 +711,12 @@ public class SchemaUtils
      *         description applies to according to the schema's matching 
      *         rule use descriptions
      */
-    public static Collection<String> getOtherMatchingRuleDescriptionNames( AttributeTypeDescription atd, Schema schema )
+    public static Collection<String> getOtherMatchingRuleDescriptionNames( AttributeType atd, Schema schema )
     {
         Set<String> otherMatchingRules = new TreeSet<String>( nameAndOidComparator );
-        for ( MatchingRuleUseDescription mrud : schema.getMatchingRuleUseDescriptions() )
+        for ( MatchingRuleUse mrud : schema.getMatchingRuleUseDescriptions() )
         {
-            Collection<String> atdSet = toLowerCaseSet( mrud.getApplicableAttributes() );
+            Collection<String> atdSet = toLowerCaseSet( mrud.getApplicableAttributeOids() );
             if ( atdSet.removeAll( getLowerCaseIdentifiers( atd ) ) )
             {
                 otherMatchingRules.addAll( mrud.getNames() );
@@ -736,13 +736,13 @@ public class SchemaUtils
      * @return all attribute type descriptions using this attribute type
      *         description as superior
      */
-    public static Collection<AttributeTypeDescription> getDerivedAttributeTypeDescriptions(
-        AttributeTypeDescription atd, Schema schema )
+    public static Collection<AttributeType> getDerivedAttributeTypeDescriptions(
+        AttributeType atd, Schema schema )
     {
-        Set<AttributeTypeDescription> derivedAtds = new TreeSet<AttributeTypeDescription>( schemaElementNameComparator );
-        for ( AttributeTypeDescription derivedAtd : schema.getAttributeTypeDescriptions() )
+        Set<AttributeType> derivedAtds = new TreeSet<AttributeType>( schemaElementNameComparator );
+        for ( AttributeType derivedAtd : schema.getAttributeTypeDescriptions() )
         {
-            String superType = derivedAtd.getSuperType();
+            String superType = derivedAtd.getSuperiorName();
             if ( superType != null && getLowerCaseIdentifiers( atd ).contains( superType.toLowerCase() ) )
             {
                 derivedAtds.add( derivedAtd );
@@ -762,11 +762,11 @@ public class SchemaUtils
      * @return all object class description using the given attribute type
      *         description as must attribute
      */
-    public static Collection<ObjectClassDescription> getUsedAsMust( AttributeTypeDescription atd, Schema schema )
+    public static Collection<ObjectClass> getUsedAsMust( AttributeType atd, Schema schema )
     {
         Collection<String> lowerCaseIdentifiers = getLowerCaseIdentifiers( atd );
-        Set<ObjectClassDescription> ocds = new TreeSet<ObjectClassDescription>( schemaElementNameComparator );
-        for ( ObjectClassDescription ocd : schema.getObjectClassDescriptions() )
+        Set<ObjectClass> ocds = new TreeSet<ObjectClass>( schemaElementNameComparator );
+        for ( ObjectClass ocd : schema.getObjectClassDescriptions() )
         {
             Collection<String> mustSet = toLowerCaseSet( getMustAttributeTypeDescriptionNamesTransitive( ocd, schema ) );
             if ( mustSet.removeAll( lowerCaseIdentifiers ) )
@@ -788,11 +788,11 @@ public class SchemaUtils
      * @return all object class description using the given attribute type
      *         description as may attribute
      */
-    public static Collection<ObjectClassDescription> getUsedAsMay( AttributeTypeDescription atd, Schema schema )
+    public static Collection<ObjectClass> getUsedAsMay( AttributeType atd, Schema schema )
     {
         Collection<String> lowerCaseIdentifiers = getLowerCaseIdentifiers( atd );
-        Set<ObjectClassDescription> ocds = new TreeSet<ObjectClassDescription>( schemaElementNameComparator );
-        for ( ObjectClassDescription ocd : schema.getObjectClassDescriptions() )
+        Set<ObjectClass> ocds = new TreeSet<ObjectClass>( schemaElementNameComparator );
+        for ( ObjectClass ocd : schema.getObjectClassDescriptions() )
         {
             Collection<String> mustSet = toLowerCaseSet( getMayAttributeTypeDescriptionNamesTransitive( ocd, schema ) );
             if ( mustSet.removeAll( lowerCaseIdentifiers ) )
@@ -804,11 +804,11 @@ public class SchemaUtils
     }
 
 
-    private static Collection<ObjectClassDescription> getExistingSuperiorObjectClassDescription(
-        ObjectClassDescription ocd, Schema schema )
+    private static Collection<ObjectClass> getExistingSuperiorObjectClassDescription(
+        ObjectClass ocd, Schema schema )
     {
-        List<ObjectClassDescription> superiorList = new ArrayList<ObjectClassDescription>();
-        for ( String superior : ocd.getSuperiorObjectClasses() )
+        List<ObjectClass> superiorList = new ArrayList<ObjectClass>();
+        for ( String superior : ocd.getSuperiorOids() )
         {
             if ( schema.hasObjectClassDescription( superior ) )
             {
@@ -827,11 +827,11 @@ public class SchemaUtils
      * 
      * @return the superior object class descriptions
      */
-    public static List<ObjectClassDescription> getSuperiorObjectClassDescriptions( ObjectClassDescription ocd,
+    public static List<ObjectClass> getSuperiorObjectClassDescriptions( ObjectClass ocd,
         Schema schema )
     {
-        List<ObjectClassDescription> superiorList = new ArrayList<ObjectClassDescription>();
-        for ( String superior : ocd.getSuperiorObjectClasses() )
+        List<ObjectClass> superiorList = new ArrayList<ObjectClass>();
+        for ( String superior : ocd.getSuperiorOids() )
         {
             superiorList.add( schema.getObjectClassDescription( superior ) );
         }
@@ -847,12 +847,12 @@ public class SchemaUtils
      * 
      * @return the sub object class descriptions
      */
-    public static List<ObjectClassDescription> getSubObjectClassDescriptions( ObjectClassDescription ocd, Schema schema )
+    public static List<ObjectClass> getSubObjectClassDescriptions( ObjectClass ocd, Schema schema )
     {
-        List<ObjectClassDescription> subOcds = new ArrayList<ObjectClassDescription>();
-        for ( ObjectClassDescription testOcd : schema.getObjectClassDescriptions() )
+        List<ObjectClass> subOcds = new ArrayList<ObjectClass>();
+        for ( ObjectClass testOcd : schema.getObjectClassDescriptions() )
         {
-            Collection<String> superiorNames = toLowerCaseSet( testOcd.getSuperiorObjectClasses() );
+            Collection<String> superiorNames = toLowerCaseSet( testOcd.getSuperiorOids() );
             if ( superiorNames.removeAll( getLowerCaseIdentifiers( ocd ) ) )
             {
                 subOcds.add( testOcd );
@@ -872,13 +872,13 @@ public class SchemaUtils
      * @return the must attribute type description names of the given
      *         and all superior object class description, transitively
      */
-    public static Collection<String> getMustAttributeTypeDescriptionNamesTransitive( ObjectClassDescription ocd,
+    public static Collection<String> getMustAttributeTypeDescriptionNamesTransitive( ObjectClass ocd,
         Schema schema )
     {
         Set<String> musts = new TreeSet<String>( nameAndOidComparator );
-        musts.addAll( ocd.getMustAttributeTypes() );
-        Collection<ObjectClassDescription> superiors = getExistingSuperiorObjectClassDescription( ocd, schema );
-        for ( ObjectClassDescription superior : superiors )
+        musts.addAll( ocd.getMustAttributeTypeOids() );
+        Collection<ObjectClass> superiors = getExistingSuperiorObjectClassDescription( ocd, schema );
+        for ( ObjectClass superior : superiors )
         {
             musts.addAll( getMustAttributeTypeDescriptionNamesTransitive( superior, schema ) );
         }
@@ -896,13 +896,13 @@ public class SchemaUtils
      * @return the may attribute type description names of the given
      *         and all superior object class description, transitively
      */
-    public static Collection<String> getMayAttributeTypeDescriptionNamesTransitive( ObjectClassDescription ocd,
+    public static Collection<String> getMayAttributeTypeDescriptionNamesTransitive( ObjectClass ocd,
         Schema schema )
     {
         Set<String> mays = new TreeSet<String>( nameAndOidComparator );
-        mays.addAll( ocd.getMayAttributeTypes() );
-        Collection<ObjectClassDescription> superiors = getExistingSuperiorObjectClassDescription( ocd, schema );
-        for ( ObjectClassDescription superior : superiors )
+        mays.addAll( ocd.getMayAttributeTypeOids() );
+        Collection<ObjectClass> superiors = getExistingSuperiorObjectClassDescription( ocd, schema );
+        for ( ObjectClass superior : superiors )
         {
             mays.addAll( getMayAttributeTypeDescriptionNamesTransitive( superior, schema ) );
         }
@@ -916,7 +916,7 @@ public class SchemaUtils
      * @param asd the schema element
      * @return the LDIF line of the given schema element, may be null
      */
-    public static String getLdifLine( AbstractSchemaDescription asd )
+    public static String getLdifLine( AbstractSchemaObject asd )
     {
         List<String> ldifLines = asd.getExtensions().get( Schema.RAW_SCHEMA_DEFINITION_LDIF_VALUE );
         String ldifLine = ldifLines != null && !ldifLines.isEmpty() ? ldifLines.get( 0 ) : null;
@@ -945,10 +945,10 @@ public class SchemaUtils
      * 
      * @return the string representation of the given schema element
      */
-    public static String toString( AbstractSchemaDescription asd )
+    public static String toString( AbstractSchemaObject asd )
     {
         StringBuffer sb = new StringBuffer();
-        if ( asd instanceof LdapSyntaxDescription )
+        if ( asd instanceof LdapSyntax )
         {
             if ( asd.getDescription() != null && asd.getDescription().length() > 0 )
             {
@@ -956,7 +956,7 @@ public class SchemaUtils
             }
             else
             {
-                sb.append( asd.getNumericOid() );
+                sb.append( asd.getOid() );
             }
         }
         else
@@ -1005,9 +1005,9 @@ public class SchemaUtils
             boolean structuralObjectClassAvailable = false;
             for ( String ocValue : ocValues )
             {
-                ObjectClassDescription ocd = entry.getBrowserConnection().getSchema().getObjectClassDescription(
+                ObjectClass ocd = entry.getBrowserConnection().getSchema().getObjectClassDescription(
                     ocValue );
-                if ( ocd.getKind() == ObjectClassTypeEnum.STRUCTURAL )
+                if ( ocd.getType() == ObjectClassTypeEnum.STRUCTURAL )
                 {
                     structuralObjectClassAvailable = true;
                     break;
@@ -1019,10 +1019,10 @@ public class SchemaUtils
             }
 
             // check must-attributes
-            Collection<AttributeTypeDescription> mustAtds = getMustAttributeTypeDescriptions( entry );
-            for ( AttributeTypeDescription mustAtd : mustAtds )
+            Collection<AttributeType> mustAtds = getMustAttributeTypeDescriptions( entry );
+            for ( AttributeType mustAtd : mustAtds )
             {
-                AttributeHierarchy ah = entry.getAttributeWithSubtypes( mustAtd.getNumericOid() );
+                AttributeHierarchy ah = entry.getAttributeWithSubtypes( mustAtd.getOid() );
                 if ( ah == null )
                 {
                     messages.add( NLS.bind( Messages.getString( "SchemaUtils.MandatoryAttributeIsMissing" ), //$NON-NLS-1$ 
@@ -1031,12 +1031,12 @@ public class SchemaUtils
             }
 
             // check unallowed attributes
-            Collection<AttributeTypeDescription> allAtds = getAllAttributeTypeDescriptions( entry );
+            Collection<AttributeType> allAtds = getAllAttributeTypeDescriptions( entry );
             for ( IAttribute attribute : entry.getAttributes() )
             {
                 if ( !attribute.isOperationalAttribute() )
                 {
-                    AttributeTypeDescription atd = attribute.getAttributeTypeDescription();
+                    AttributeType atd = attribute.getAttributeTypeDescription();
                     if ( !allAtds.contains( atd ) )
                     {
                         messages.add( NLS.bind( Messages.getString( "SchemaUtils.AttributeNotAllowed" ), attribute //$NON-NLS-1$

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/CompoundModification.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/CompoundModification.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/CompoundModification.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/CompoundModification.java Wed Oct  6 16:40:44 2010
@@ -23,11 +23,10 @@ package org.apache.directory.studio.ldap
 
 import java.util.Collection;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.studio.ldapbrowser.core.events.EventRegistry;
 import org.apache.directory.studio.ldapbrowser.core.events.ValueAddedEvent;
 import org.apache.directory.studio.ldapbrowser.core.events.ValueDeletedEvent;
@@ -355,7 +354,7 @@ public class CompoundModification
             IEntry clonedEntry = ModelConverter.ldifContentRecordToEntry( record, browserConnection );
             return clonedEntry;
         }
-        catch ( InvalidNameException e )
+        catch ( LdapInvalidDnException e )
         {
             throw new RuntimeException( e );
         }

Modified: directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java?rev=1005116&r1=1005115&r2=1005116&view=diff
==============================================================================
--- directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java (original)
+++ directory/studio/branches/shared-trunk-merge/plugins/ldapbrowser.core/src/main/java/org/apache/directory/studio/ldapbrowser/core/utils/JNDIUtils.java Wed Oct  6 16:40:44 2010
@@ -21,9 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.core.utils;
 
 
-import javax.naming.NamingException;
-
-import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
+import org.apache.directory.shared.ldap.name.DN;
 
 
 /**
@@ -39,12 +38,12 @@ public class JNDIUtils
      *
      * @param sr the JNDI search result
      * @return the LdapDN 
-     * @throws NamingException
+     * @throws LdapInvalidDnException
      */
-    public static LdapDN getDn( javax.naming.directory.SearchResult sr ) throws NamingException
+    public static DN getDn( javax.naming.directory.SearchResult sr ) throws LdapInvalidDnException
     {
         String dn = sr.getNameInNamespace();
-        LdapDN ldapDn = new LdapDN( unescapeJndiName( dn ) );
+        DN ldapDn = new DN( unescapeJndiName( dn ) );
         return ldapDn;
     }