directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 55236 - incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap
Date Thu, 21 Oct 2004 17:29:23 GMT
Author: akarasulu
Date: Thu Oct 21 10:29:23 2004
New Revision: 55236

Removed:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/SyntaxCheckerConfig.java
Modified:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreMatchingRuleProducer.java
Log:
Commit changes ...
 
 o this syn checker config is old news
 o moved and renamed the MutableMatchingRule static class from CoreMRProd




Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/AbstractBootstrapProducer.java
Thu Oct 21 10:29:23 2004
@@ -17,6 +17,7 @@
 package org.apache.eve.schema.bootstrap;
 
 
+import java.util.Comparator;
 import javax.naming.NamingException;
 
 import org.apache.ldap.common.schema.*;
@@ -124,6 +125,64 @@
         public boolean isObsolete()
         {
             return false;
+        }
+    }
+
+
+    public static class BootstrapMatchingRule extends AbstractMatchingRule
+    {
+        final SyntaxRegistry syntaxRegistry;
+        final NormalizerRegistry normalizerRegistry;
+        final ComparatorRegistry comparatorRegistry;
+        String syntaxOid;
+
+
+        protected BootstrapMatchingRule( String oid, BootstrapRegistries registries )
+        {
+            super( oid );
+            this.syntaxRegistry = registries.getSyntaxRegistry();
+            this.normalizerRegistry = registries.getNormalizerRegistry();
+            this.comparatorRegistry = registries.getComparatorRegistry();
+        }
+
+
+        public void setNames( String[] names )
+        {
+            super.setNames( names );
+        }
+
+        public void setSyntaxOid( String syntaxOid )
+        {
+            this.syntaxOid = syntaxOid;
+        }
+
+        public void setDescription( String description )
+        {
+            super.setDescription( description );
+        }
+
+        public void setObsolete( boolean isObsolete )
+        {
+            super.setObsolete( isObsolete );
+        }
+
+
+        // accessors
+
+
+        public Syntax getSyntax() throws NamingException
+        {
+            return syntaxRegistry.lookup( syntaxOid );
+        }
+
+        public Comparator getComparator() throws NamingException
+        {
+            return comparatorRegistry.lookup( getOid() );
+        }
+
+        public Normalizer getNormalizer() throws NamingException
+        {
+            return normalizerRegistry.lookup( getOid() );
         }
     }
 

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreMatchingRuleProducer.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreMatchingRuleProducer.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/schema/bootstrap/CoreMatchingRuleProducer.java
Thu Oct 21 10:29:23 2004
@@ -17,15 +17,6 @@
 package org.apache.eve.schema.bootstrap;
 
 
-import org.apache.ldap.common.schema.Syntax;
-import org.apache.ldap.common.schema.Normalizer;
-import org.apache.ldap.common.schema.AbstractMatchingRule;
-
-import org.apache.eve.schema.SyntaxRegistry;
-import org.apache.eve.schema.NormalizerRegistry;
-import org.apache.eve.schema.ComparatorRegistry;
-
-import java.util.Comparator;
 import javax.naming.NamingException;
 
 
@@ -36,17 +27,18 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class CoreMatchingRuleProducer implements BootstrapProducer
+public class CoreMatchingRuleProducer extends AbstractBootstrapProducer
 {
-    public ProducerTypeEnum getType()
+    public CoreMatchingRuleProducer()
     {
-        return null;
+        super( ProducerTypeEnum.MATCHING_RULE_PRODUCER );
     }
 
+
     public void produce( BootstrapRegistries registries, ProducerCallback cb )
         throws NamingException
     {
-        MutableMatchingRule mrule = null;
+        BootstrapMatchingRule mrule = null;
 
         /*
          * Straight out of RFC 2252: Section 8
@@ -67,27 +59,27 @@
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )
         */
 
-        mrule = new MutableMatchingRule( "2.5.13.0", registries );
+        mrule = new BootstrapMatchingRule( "2.5.13.0", registries );
         mrule.setNames( new String[] { "objectIdentifierMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.38" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.1", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.1", registries  );
         mrule.setNames( new String[] { "distinguishedNameMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.12" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.2", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.2", registries  );
         mrule.setNames( new String[] { "caseIgnoreMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.15" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.3", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.3", registries  );
         mrule.setNames( new String[] { "caseIgnoreOrderingMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.15" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.4", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.4", registries  );
         mrule.setNames( new String[] { "caseIgnoreSubstringsMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.58" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
@@ -111,27 +103,27 @@
           SYNTAX 1.3.6.1.4.1.1466.115.121.1.6 )
         */
 
-        mrule = new MutableMatchingRule( "2.5.13.8", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.8", registries  );
         mrule.setNames( new String[] { "numericStringMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.36" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.10", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.10", registries  );
         mrule.setNames( new String[] { "numericStringSubstringsMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.58" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.11", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.11", registries  );
         mrule.setNames( new String[] { "caseIgnoreListMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.41" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.14", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.14", registries  );
         mrule.setNames( new String[] { "integerMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.27" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.16", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.16", registries  );
         mrule.setNames( new String[] { "bitStringMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.6" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
@@ -155,27 +147,27 @@
           SYNTAX 1.3.6.1.4.1.1466.115.121.1.42 )
         */
 
-        mrule = new MutableMatchingRule( "2.5.13.20", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.20", registries  );
         mrule.setNames( new String[] { "telephoneNumberMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.50" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.21", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.21", registries  );
         mrule.setNames( new String[] { "telephoneNumberSubstringsMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.58" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.22", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.22", registries  );
         mrule.setNames( new String[] { "presentationAddressMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.43" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.23", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.23", registries  );
         mrule.setNames( new String[] { "uniqueMemberMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.34" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.24", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.24", registries  );
         mrule.setNames( new String[] { "protocolInformationMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.42" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
@@ -203,92 +195,34 @@
 
         */
 
-        mrule = new MutableMatchingRule( "2.5.13.27", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.27", registries  );
         mrule.setNames( new String[] { "generalizedTimeMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.24" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.28", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.28", registries  );
         mrule.setNames( new String[] { "generalizedTimeOrderingMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.24" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.29", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.29", registries  );
         mrule.setNames( new String[] { "integerFirstComponentMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.27" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "2.5.13.30", registries  );
+        mrule = new BootstrapMatchingRule( "2.5.13.30", registries  );
         mrule.setNames( new String[] { "objectIdentifierFirstComponentMatch" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.38" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "1.3.6.1.4.1.1466.109.114.1", registries  );
+        mrule = new BootstrapMatchingRule( "1.3.6.1.4.1.1466.109.114.1", registries  );
         mrule.setNames( new String[] { "caseExactIA5Match" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
 
-        mrule = new MutableMatchingRule( "1.3.6.1.4.1.1466.109.114.2", registries  );
+        mrule = new BootstrapMatchingRule( "1.3.6.1.4.1.1466.109.114.2", registries  );
         mrule.setNames( new String[] { "caseIgnoreIA5Match" } );
         mrule.setSyntaxOid( "1.3.6.1.4.1.1466.115.121.1.26" );
         cb.schemaObjectProduced( this, mrule.getOid(), mrule );
-    }
-
-
-    private static class MutableMatchingRule extends AbstractMatchingRule
-    {
-        final SyntaxRegistry syntaxRegistry;
-        final NormalizerRegistry normalizerRegistry;
-        final ComparatorRegistry comparatorRegistry;
-        String syntaxOid;
-
-
-        public MutableMatchingRule( String oid, BootstrapRegistries registries )
-        {
-            super( oid );
-            this.syntaxRegistry = registries.getSyntaxRegistry();
-            this.normalizerRegistry = registries.getNormalizerRegistry();
-            this.comparatorRegistry = registries.getComparatorRegistry();
-        }
-
-
-        protected void setNames( String[] names )
-        {
-            super.setNames( names );
-        }
-
-        protected void setSyntaxOid( String syntaxOid )
-        {
-            this.syntaxOid = syntaxOid;
-        }
-
-        protected void setDescription( String description )
-        {
-            super.setDescription( description );
-        }
-
-        protected void setObsolete( boolean isObsolete )
-        {
-            super.setObsolete( isObsolete );
-        }
-
-
-        // accessors
-
-
-        public Syntax getSyntax() throws NamingException
-        {
-            return syntaxRegistry.lookup( syntaxOid );
-        }
-
-        public Comparator getComparator() throws NamingException
-        {
-            return comparatorRegistry.lookup( getOid() );
-        }
-
-        public Normalizer getNormalizer() throws NamingException
-        {
-            return normalizerRegistry.lookup( getOid() );
-        }
     }
 }

Mime
View raw message