directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r778529 - /directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/
Date Mon, 25 May 2009 23:06:10 GMT
Author: elecharny
Date: Mon May 25 23:06:10 2009
New Revision: 778529

URL: http://svn.apache.org/viewvc?rev=778529&view=rev
Log:
Replaced tabs by spaces

Modified:
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java
    directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
Mon May 25 23:06:10 2009
@@ -209,14 +209,14 @@
     {
         try
         {
-        	String oid = oidRegistry.getOid( id );
-        	
-        	if ( oid != null )
-        	{
-        		return byOidAT.containsKey( oid );
-        	}
-        	
-        	return false;
+            String oid = oidRegistry.getOid( id );
+            
+            if ( oid != null )
+            {
+                return byOidAT.containsKey( oid );
+            }
+            
+            return false;
         }
         catch ( NamingException e )
         {
@@ -260,8 +260,8 @@
         
         for ( String aliase : aliases )
         {
-        	oidNormalizerMap.remove( aliase );
-        	oidNormalizerMap.remove( aliase.toLowerCase() );
+            oidNormalizerMap.remove( aliase );
+            oidNormalizerMap.remove( aliase.toLowerCase() );
         }
     }
 
@@ -292,8 +292,8 @@
         
         for ( String aliase : aliases )
         {
-        	oidNormalizerMap.put( aliase, oidNormalizer );
-        	oidNormalizerMap.put( aliase.toLowerCase(), oidNormalizer );
+            oidNormalizerMap.put( aliase, oidNormalizer );
+            oidNormalizerMap.put( aliase.toLowerCase(), oidNormalizer );
         }
     }
 
@@ -351,8 +351,8 @@
     {
         if ( ! OID.isOID( numericOid ) )
         {
-        	String msg = "Looks like the arg " + numericOid + " is not a numeric OID";
-        	LOG.error(msg );
+            String msg = "Looks like the arg " + numericOid + " is not a numeric OID";
+            LOG.error(msg );
             throw new NamingException( msg );
         }
 
@@ -360,4 +360,17 @@
         byOidAT.remove( numericOid );
         oidToDescendantSet.remove( numericOid );
     }
+    
+    
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        for ( String value:byOidAT.keySet() )
+        {
+            sb.append( value ).append( ":" ).append( byOidAT.get( value ) ).append( '\n'
);
+        }
+        
+        return sb.toString();
+    }
 }

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultComparatorRegistry.java
Mon May 25 23:06:10 2009
@@ -65,7 +65,7 @@
      */
     public DefaultComparatorRegistry()
     {
-    	byOidComparator = new ConcurrentHashMap<String, Comparator<?>>();
+        byOidComparator = new ConcurrentHashMap<String, Comparator<?>>();
         oidToDescription = new ConcurrentHashMap<String, ComparatorDescription>();
     }
 
@@ -78,12 +78,12 @@
      */
     public void register( ComparatorDescription description, Comparator<?> comparator
) throws NamingException
     {
-    	String oid = description.getNumericOid();
-    	
+        String oid = description.getNumericOid();
+        
         if ( byOidComparator.containsKey( oid ) )
         {
-        	String msg = "Comparator '" + description + "' with OID " + oid + " already registered!";
-        	LOG.warn( msg );
+            String msg = "Comparator '" + description + "' with OID " + oid + " already registered!";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -122,9 +122,9 @@
         
         if ( c == null )
         {
-        	String msg = "Comparator not found for OID: " + oid;
-        	LOG.error( msg );
-        	throw new NamingException( msg );
+            String msg = "Comparator not found for OID: " + oid;
+            LOG.error( msg );
+            throw new NamingException( msg );
         }
         
         if ( DEBUG )
@@ -152,8 +152,8 @@
     {
         if ( ! OID.isOID( oid ) )
         {
-        	String msg = "OID " + oid + " is not a numeric OID";
-        	LOG.error( msg );
+            String msg = "OID " + oid + " is not a numeric OID";
+            LOG.error( msg );
             throw new NamingException( msg );
         }
 
@@ -186,8 +186,8 @@
     {
         if ( ! OID.isOID( oid ) )
         {
-        	String msg = "OID " + oid + " is not a numeric OID";
-        	LOG.error( msg );
+            String msg = "OID " + oid + " is not a numeric OID";
+            LOG.error( msg );
             throw new NamingException( msg );
         }
 
@@ -210,7 +210,7 @@
             
             if ( schemaNameForOid.equalsIgnoreCase( schemaName ) )
             {
-            	byOidComparator.remove( oid );
+                byOidComparator.remove( oid );
                 oidToDescription.remove( oid );
             }
         }

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNormalizerRegistry.java
Mon May 25 23:06:10 2009
@@ -67,7 +67,7 @@
      */
     public DefaultNormalizerRegistry()
     {
-    	byOidNormalizer = new ConcurrentHashMap<String, Normalizer>();
+        byOidNormalizer = new ConcurrentHashMap<String, Normalizer>();
         oidToDescription = new ConcurrentHashMap<String, NormalizerDescription>();
     }
 
@@ -84,8 +84,8 @@
         
         if ( byOidNormalizer.containsKey( oid ) )
         {
-        	String msg = "Normalizer already registered for OID " + oid;
-        	LOG.warn( msg );
+            String msg = "Normalizer already registered for OID " + oid;
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -106,8 +106,8 @@
     {
         if ( !byOidNormalizer.containsKey( oid ) )
         {
-        	String msg = "Normalizer for OID " + oid + " does not exist!";
-        	LOG.debug( msg );
+            String msg = "Normalizer for OID " + oid + " does not exist!";
+            LOG.debug( msg );
             throw new NamingException( msg );
         }
 
@@ -138,8 +138,8 @@
     {
         if ( !OID.isOID( oid ) )
         {
-        	String msg = "OID " + oid + " is not a numeric OID";
-        	LOG.error( msg );
+            String msg = "OID " + oid + " is not a numeric OID";
+            LOG.error( msg );
             throw new NamingException( msg );
         }
 
@@ -185,8 +185,8 @@
     {
         if ( !OID.isOID( oid ) )
         {
-        	String msg = "OID " + oid + " is not a numeric OID";
-        	LOG.error( msg );
+            String msg = "OID " + oid + " is not a numeric OID";
+            LOG.error( msg );
             throw new NamingException( msg );
         }
 
@@ -209,7 +209,7 @@
             
             if ( schemaNameForOid.equalsIgnoreCase( schemaName ) )
             {
-            	byOidNormalizer.remove( oid );
+                byOidNormalizer.remove( oid );
                 oidToDescription.remove( oid );
             }
         }

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
Mon May 25 23:06:10 2009
@@ -79,13 +79,13 @@
      */
     public void register( ObjectClass objectClass ) throws NamingException
     {
-    	String oid = objectClass.getOid();
-    	
+        String oid = objectClass.getOid();
+        
         if ( byOidOC.containsKey( oid ) )
         {
-        	String msg = "objectClass " + objectClass.getName() + " w/ OID " + oid
-            	+ " has already been registered!";
-        	LOG.warn( msg );
+            String msg = "objectClass " + objectClass.getName() + " w/ OID " + oid
+                + " has already been registered!";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -115,12 +115,12 @@
      */
     public ObjectClass lookup( String id ) throws NamingException
     {
-    	String ocId = StringTools.trim( id ).toLowerCase();
-    	
+        String ocId = StringTools.trim( id ).toLowerCase();
+        
         if ( StringTools.isEmpty( ocId ) )
         {
-        	String msg = "Lookup in the OC registry : name should not be empty";
-        	LOG.error( msg );
+            String msg = "Lookup in the OC registry : name should not be empty";
+            LOG.error( msg );
             throw new NamingException( msg );
         }
         
@@ -130,8 +130,8 @@
 
         if ( objectClass == null )
         {
-        	String msg = "objectClass " + id + " w/ OID " + oid + " not registered!";
-        	LOG.warn( msg );
+            String msg = "objectClass " + id + " w/ OID " + oid + " not registered!";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
         
@@ -151,13 +151,13 @@
     {
         try
         {
-        	String oid = oidRegistry.getOid( id );
-        	
-        	if ( oid == null )
-        	{
-        		return false;
-        	}
-        	
+            String oid = oidRegistry.getOid( id );
+            
+            if ( oid == null )
+            {
+                return false;
+            }
+            
             return byOidOC.containsKey( oid );
         }
         catch ( NamingException e )
@@ -176,8 +176,8 @@
         
         if ( ocOid == null )
         {
-        	String msg = "Element " + id + " not found in the OID registry !";
-        	LOG.warn( msg );
+            String msg = "Element " + id + " not found in the OID registry !";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -210,8 +210,8 @@
     {
         if ( ! OID.isOID( numericOid ) )
         {
-        	String msg = "Looks like the arg " + numericOid + " is not a numeric OID";
-        	LOG.warn( msg );
+            String msg = "Looks like the arg " + numericOid + " is not a numeric OID";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultRegistries.java
Mon May 25 23:06:10 2009
@@ -43,7 +43,7 @@
  */
 public class DefaultRegistries implements Registries
 {
-	/** The AttributeType registry */
+    /** The AttributeType registry */
     private AttributeTypeRegistry attributeTypeRegistry;
     
     /** The ObjectClass registry */

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxCheckerRegistry.java
Mon May 25 23:06:10 2009
@@ -74,12 +74,12 @@
      */
     public void register( SyntaxCheckerDescription syntaxCheckerDescription, SyntaxChecker
syntaxChecker ) throws NamingException
     {
-    	String oid = syntaxChecker.getSyntaxOid();
-    	
+        String oid = syntaxChecker.getSyntaxOid();
+        
         if ( byOidSyntaxChecker.containsKey( oid ) )
         {
-        	String msg = "SyntaxChecker with OID " + oid + " already registered!";
-        	LOG.warn( msg );
+            String msg = "SyntaxChecker with OID " + oid + " already registered!";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -102,8 +102,8 @@
 
         if ( syntaxChecker == null )
         {
-        	String msg = "SyntaxChecker for OID " + oid + " not found!";
-        	LOG.warn( msg );
+            String msg = "SyntaxChecker for OID " + oid + " not found!";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
         
@@ -132,8 +132,8 @@
     {
         if ( ! OID.isOID( oid ) )
         {
-        	String msg = "Looks like the arg is not a numeric OID";
-        	LOG.warn( msg );
+            String msg = "Looks like the arg is not a numeric OID";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -144,8 +144,8 @@
             return getSchema( description );
         }
 
-    	String msg = "OID " + oid + " not found in oid to schema name map!";
-    	LOG.warn( msg );
+        String msg = "OID " + oid + " not found in oid to schema name map!";
+        LOG.warn( msg );
         throw new NamingException( msg );
     }
     
@@ -179,8 +179,8 @@
     {
         if ( ! OID.isOID( numericOid ) )
         {
-        	String msg = "Looks like the arg is not a numeric OID";
-        	LOG.warn( msg );
+            String msg = "Looks like the arg is not a numeric OID";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -203,7 +203,7 @@
             
             if ( schemaNameForOid.equalsIgnoreCase( schemaName ) )
             {
-            	byOidSyntaxChecker.remove( oid );
+                byOidSyntaxChecker.remove( oid );
                 oidToDescription.remove( oid );
             }
         }

Modified: directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java?rev=778529&r1=778528&r2=778529&view=diff
==============================================================================
--- directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
(original)
+++ directory/apacheds/trunk/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
Mon May 25 23:06:10 2009
@@ -103,13 +103,13 @@
      */
     public void register( Syntax syntax ) throws NamingException
     {
-    	String oid = syntax.getOid();
-    	
+        String oid = syntax.getOid();
+        
         if ( byOidSyntax.containsKey( oid ) )
         {
-        	String msg = "syntax " + syntax + " w/ OID " + oid
-            	+ " has already been registered!";
-        	LOG.warn( msg );
+            String msg = "syntax " + syntax + " w/ OID " + oid
+                + " has already been registered!";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -137,14 +137,14 @@
     {
         try
         {
-        	String oid = oidRegistry.getOid( id );
-        	
-        	if ( oid != null )
-        	{
-        		return byOidSyntax.containsKey( oid );
-        	}
-        	
-        	return false;
+            String oid = oidRegistry.getOid( id );
+            
+            if ( oid != null )
+            {
+                return byOidSyntax.containsKey( oid );
+            }
+            
+            return false;
         }
         catch ( NamingException e )
         {
@@ -160,8 +160,8 @@
     {
         if ( ! OID.isOID( id ) )
         {
-        	String msg = "Looks like the arg is not a numeric OID";
-        	LOG.warn( msg );
+            String msg = "Looks like the arg is not a numeric OID";
+            LOG.warn( msg );
             throw new NamingException( msg );
         }
 
@@ -193,11 +193,11 @@
      */
     public void unregister( String numericOid ) throws NamingException
     {
-    	if ( !OID.isOID(numericOid ) )
+        if ( !OID.isOID(numericOid ) )
         {
-    		String msg = "Looks like the arg " + numericOid + " is not a numeric OID";
-    		LOG.error( msg );
-    		throw new NamingException( msg );
+            String msg = "Looks like the arg " + numericOid + " is not a numeric OID";
+            LOG.error( msg );
+            throw new NamingException( msg );
         }
 
         byOidSyntax.remove( numericOid );



Mime
View raw message