You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/09/26 07:44:56 UTC

svn commit: rev 47237 - in incubator/directory/ldap/trunk/common: . src/java/org/apache/ldap/common/schema

Author: akarasulu
Date: Sat Sep 25 22:44:55 2004
New Revision: 47237

Modified:
   incubator/directory/ldap/trunk/common/project.xml
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DescriptionUtils.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleEnum.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClassTypeEnum.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/UsageEnum.java
Log:
fixed some compiler issues due to commons lang deps

Modified: incubator/directory/ldap/trunk/common/project.xml
==============================================================================
--- incubator/directory/ldap/trunk/common/project.xml	(original)
+++ incubator/directory/ldap/trunk/common/project.xml	Sat Sep 25 22:44:55 2004
@@ -20,13 +20,13 @@
     <url>http://incubator.apache.org/directory</url>
 
     <description>
-	    Common LDAP packages used for protocol compliant parsing of distinguished
-	    names, LDIFs, filters, and urls.  Also contains the Common Message API 
-	    which enables a plugable interface for ASN.1 BER Message codec providers.
+      Common LDAP packages used for protocol compliant parsing of distinguished
+      names, LDIFs, filters, and urls.  Also contains the Common Message API 
+      which enables a plugable interface for ASN.1 BER Message codec providers.
     </description>
 
     <shortDescription>
-	    Common LDAP packages used by clients and servers.
+      Common LDAP packages used by clients and servers.
     </shortDescription>
     
     <dependencies>
@@ -36,6 +36,13 @@
       <artifactId>regexp</artifactId>
       <version>1.2</version>
       <url>http://jakarta.apache.org/regexp/index.html</url>
+    </dependency>
+
+    <dependency>
+      <groupId>oro</groupId>
+      <artifactId>oro</artifactId>
+      <version>2.0.7</version>
+      <url>http://jakarta.apache.org/oro</url>
     </dependency>
 
     <dependency>

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DescriptionUtils.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DescriptionUtils.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DescriptionUtils.java	Sat Sep 25 22:44:55 2004
@@ -1,53 +1,20 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.apache.ldap.common.schema ;
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.ldap.common.schema;
 
 
 /**
@@ -81,98 +48,98 @@
      * that is 'AttributeTypeDescription = ' is not generated.
      * <pre>
      * AttributeTypeDescription = "(" whsp
-     *    numericoid whsp                 ; AttributeType identifier
-     *    [ "NAME" qdescrs ]              ; name used in AttributeType
-     *    [ "DESC" qdstring ]             ; description
+     *    numericoid whsp                ; AttributeType identifier
+     *    [ "NAME" qdescrs ]             ; name used in AttributeType
+     *    [ "DESC" qdstring ]            ; description
      *    [ "OBSOLETE" whsp ]
-     *    [ "SUP" woid ]                  ; derived from parent AttributeType
-     *    [ "EQUALITY" woid               ; Matching Rule name
-     *    [ "ORDERING" woid               ; Matching Rule name
-     *    [ "SUBSTR" woid ]               ; Matching Rule name
-     *    [ "SYNTAX" whsp noidlen whsp ]  ; see section 4.3 RFC 2252
-     *    [ "SINGLE-VALUE" whsp ]         ; default multi-valued
-     *    [ "COLLECTIVE" whsp ]           ; default not collective
-     *    [ "NO-USER-MODIFICATION" whsp ] ; default user modifiable
-     *    [ "USAGE" whsp AttributeUsage ] ; default userApplications
+     *    [ "SUP" woid ]                 ; derived from parent AttributeType
+     *    [ "EQUALITY" woid              ; Matching Rule name
+     *    [ "ORDERING" woid              ; Matching Rule name
+     *    [ "SUBSTR" woid ]              ; Matching Rule name
+     *    [ "SYNTAX" whsp noidlen whsp ] ; see section 4.3 RFC 2252
+     *    [ "SINGLE-VALUE" whsp ]        ; default multi-valued
+     *    [ "COLLECTIVE" whsp ]          ; default not collective
+     *    [ "NO-USER-MODIFICATION" whsp ]; default user modifiable
+     *    [ "USAGE" whsp AttributeUsage ]; default userApplications
      *    whsp ")"
      * </pre>
-     * @param an_attributeType the attributeType to generate a description for
+     * @param attributeType the attributeType to generate a description for
      * @return the AttributeTypeDescription Syntax for the attributeType in a
      * pretty formated string
      */
-    public static String getDescription( AttributeType an_attributeType ) 
+    public static String getDescription( AttributeType attributeType )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( an_attributeType.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( attributeType.getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( an_attributeType.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( attributeType.getName() );
+        buf.append( '\n' );
         
-        if ( an_attributeType.getDescription() != null )
+        if ( attributeType.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( an_attributeType.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( attributeType.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( an_attributeType.isObsolete() )
+        if ( attributeType.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
-        l_buf.append( an_attributeType.getSuperior().getOid() ) ;
+        buf.append( attributeType.getSuperior().getOid() );
         
-        if ( an_attributeType.getEquality() != null )
+        if ( attributeType.getEquality() != null )
         {
-            l_buf.append( "EQUALITY " ) ;
-            l_buf.append( an_attributeType.getEquality().getOid() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "EQUALITY " );
+            buf.append( attributeType.getEquality().getOid() );
+            buf.append( '\n' );
         }
         
-        if ( an_attributeType.getOrdering() != null )
+        if ( attributeType.getOrdering() != null )
         {
-            l_buf.append( "ORDERING " ) ;
-            l_buf.append( an_attributeType.getOrdering().getOid() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "ORDERING " );
+            buf.append( attributeType.getOrdering().getOid() );
+            buf.append( '\n' );
         }
         
-        if ( an_attributeType.getSubstr() != null )
+        if ( attributeType.getSubstr() != null )
         {
-            l_buf.append( "SUBSTR " ) ;
-            l_buf.append( an_attributeType.getSubstr().getOid() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "SUBSTR " );
+            buf.append( attributeType.getSubstr().getOid() );
+            buf.append( '\n' );
         }
         
-        l_buf.append( "SYNTAX " ) ;
-        l_buf.append( an_attributeType.getSyntax().getOid() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "SYNTAX " );
+        buf.append( attributeType.getSyntax().getOid() );
+        buf.append( '\n' );
         
-        if ( an_attributeType.isSingleValue() )
+        if ( attributeType.isSingleValue() )
         {
-            l_buf.append( "SINGLE-VALUE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "SINGLE-VALUE" );
+            buf.append( '\n' );
         }
         
-        if ( an_attributeType.isCollective() )
+        if ( attributeType.isCollective() )
         {
-            l_buf.append( "COLLECTIVE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "COLLECTIVE" );
+            buf.append( '\n' );
         }
         
-        if ( an_attributeType.isCanUserModify() )
+        if ( attributeType.isCanUserModify() )
         {
-            l_buf.append( "NO-USER-MODIFICATION" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "NO-USER-MODIFICATION" );
+            buf.append( '\n' );
         }
         
-        l_buf.append( "USAGE " ) ;
-        l_buf.append( an_attributeType.getUsage().getName() ) ;
-        l_buf.append( " ) " ) ;
+        buf.append( "USAGE " );
+        buf.append( attributeType.getUsage().getName() );
+        buf.append( " ) " );
         
-        return l_buf.toString() ;
+        return buf.toString();
     }
     
     
@@ -183,94 +150,94 @@
      * that is 'DITContentRuleDescription = ' is not generated.
      * <pre>
      *  DITContentRuleDescription = "("
-     *      numericoid          ; Structural ObjectClass identifier
+     *      numericoid         ; Structural ObjectClass identifier
      *      [ "NAME" qdescrs ]
      *      [ "DESC" qdstring ]
      *      [ "OBSOLETE" ]
-     *      [ "AUX" oids ]      ; Auxiliary ObjectClasses
-     *      [ "MUST" oids ]     ; AttributeType identifiers
-     *      [ "MAY" oids ]      ; AttributeType identifiers
-     *      [ "NOT" oids ]      ; AttributeType identifiers
+     *      [ "AUX" oids ]     ; Auxiliary ObjectClasses
+     *      [ "MUST" oids ]    ; AttributeType identifiers
+     *      [ "MAY" oids ]     ; AttributeType identifiers
+     *      [ "NOT" oids ]     ; AttributeType identifiers
      *     ")"
      * </pre>
-     * @param a_crule the DIT content rule specification 
+     * @param dITContentRule the DIT content rule specification
      * @return the specification according to the DITContentRuleDescription
      * syntax 
      */
-    public static String getDescription( DITContentRule a_dITContentRule )
+    public static String getDescription( DITContentRule dITContentRule )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_dITContentRule.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( dITContentRule.getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_dITContentRule.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( dITContentRule.getName() );
+        buf.append( '\n' );
         
-        if ( a_dITContentRule.getDescription() != null )
+        if ( dITContentRule.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_dITContentRule.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( dITContentRule.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( a_dITContentRule.isObsolete() )
+        if ( dITContentRule.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
         // print out all the auxillary object class oids
-        ObjectClass [] l_aux = a_dITContentRule.getAuxObjectClasses() ;
-        if ( l_aux != null && l_aux.length > 0 )
+        ObjectClass [] aux = dITContentRule.getAuxObjectClasses();
+        if ( aux != null && aux.length > 0 )
         {
-            l_buf.append( "AUX\n" ) ;
-            for ( int ii = 0; ii < l_aux.length; ii++ ) 
+            buf.append( "AUX\n" );
+            for ( int ii = 0; ii < aux.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_aux[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( aux[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        AttributeType [] l_must = a_dITContentRule.getMustNames() ;
-        if ( l_must != null && l_must.length > 0 )
+        AttributeType [] must = dITContentRule.getMustNames();
+        if ( must != null && must.length > 0 )
         {
-            l_buf.append( "MUST\n" ) ;
-            for ( int ii = 0; ii < l_must.length; ii++ ) 
+            buf.append( "MUST\n" );
+            for ( int ii = 0; ii < must.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_must[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( must[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        AttributeType [] l_may = a_dITContentRule.getMayNames() ;
-        if ( l_may != null && l_may.length > 0 )
+        AttributeType [] may = dITContentRule.getMayNames();
+        if ( may != null && may.length > 0 )
         {
-            l_buf.append( "MAY\n" ) ;
-            for ( int ii = 0; ii < l_may.length; ii++ ) 
+            buf.append( "MAY\n" );
+            for ( int ii = 0; ii < may.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_may[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( may[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        AttributeType [] l_not = a_dITContentRule.getNotNames() ;
-        if ( l_not != null && l_not.length > 0 )
+        AttributeType [] not = dITContentRule.getNotNames();
+        if ( not != null && not.length > 0 )
         {
-            l_buf.append( "NOT\n" ) ;
-            for ( int ii = 0; ii < l_not.length; ii++ ) 
+            buf.append( "NOT\n" );
+            for ( int ii = 0; ii < not.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_not[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( not[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
+        buf.append( " )" );
+        return buf.toString();
     }
     
     
@@ -281,43 +248,43 @@
      * that is 'MatchingRuleDescription = ' is not generated.
      * <pre>
      * MatchingRuleDescription = "(" whsp
-     *    numericoid whsp       ; MatchingRule object identifier
+     *    numericoid whsp      ; MatchingRule object identifier
      *    [ "NAME" qdescrs ]
      *    [ "DESC" qdstring ]
      *    [ "OBSOLETE" whsp ]
      *    "SYNTAX" numericoid
      * whsp ")"
      * </pre>
-     * @param a_matchingEule the MatchingRule to generate the description for
+     * @param matchingRule the MatchingRule to generate the description for
      * @return the MatchingRuleDescription string
      */
-    public static String getDescription( MatchingRule a_matchingRule )
+    public static String getDescription( MatchingRule matchingRule )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_matchingRule.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( matchingRule.getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_matchingRule.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( matchingRule.getName() );
+        buf.append( '\n' );
         
-        if ( a_matchingRule.getDescription() != null )
+        if ( matchingRule.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_matchingRule.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( matchingRule.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( a_matchingRule.isObsolete() )
+        if ( matchingRule.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
-        l_buf.append( "SYNTAX " ) ;
-        l_buf.append( a_matchingRule.getSyntax().getOid() ) ;
-        l_buf.append( " ) " ) ;
-        return l_buf.toString() ;
+        buf.append( "SYNTAX " );
+        buf.append( matchingRule.getSyntax().getOid() );
+        buf.append( " ) " );
+        return buf.toString();
     }
     
     
@@ -328,12 +295,12 @@
      * that is 'MatchingRuleUseDescription = ' is not generated.
      * <pre>
      *     MatchingRuleUseDescription = LPAREN WSP
-     *         numericoid                 ; object identifier
-     *         [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
-     *         [ SP "DESC" SP qdstring ]  ; description
-     *         [ SP "OBSOLETE" ]          ; not active
-     *         SP "APPLIES" SP oids       ; attribute types
-     *         extensions WSP RPAREN      ; extensions
+     *         numericoid                ; object identifier
+     *         [ SP "NAME" SP qdescrs ]  ; short names (descriptors)
+     *         [ SP "DESC" SP qdstring ] ; description
+     *         [ SP "OBSOLETE" ]         ; not active
+     *         SP "APPLIES" SP oids      ; attribute types
+     *         extensions WSP RPAREN     ; extensions
      * 
      *   where:
      *     [numericoid] is the object identifier of the matching rule
@@ -346,53 +313,53 @@
      *         to; and
      *     [extensions] describe extensions.
      * </pre>
-     * @param a_matchingRuleUse
+     * @param matchingRuleUse
      * @return
      */
-    public static String getDescription( MatchingRuleUse a_matchingRuleUse )
+    public static String getDescription( MatchingRuleUse matchingRuleUse )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_matchingRuleUse.getMatchingRule().getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( matchingRuleUse.getMatchingRule().getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_matchingRuleUse.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( matchingRuleUse.getName() );
+        buf.append( '\n' );
         
-        if ( a_matchingRuleUse.getDescription() != null )
+        if ( matchingRuleUse.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_matchingRuleUse.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( matchingRuleUse.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( a_matchingRuleUse.isObsolete() )
+        if ( matchingRuleUse.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
-        l_buf.append( "APPLIES " ) ;
-        AttributeType[] l_attributeTypes = 
-            a_matchingRuleUse.getApplicableAttributes() ;
-        if ( l_attributeTypes.length == 1 )
+        buf.append( "APPLIES " );
+        AttributeType[] attributeTypes =
+            matchingRuleUse.getApplicableAttributes();
+        if ( attributeTypes.length == 1 )
         {
-            l_buf.append( l_attributeTypes[0].getOid() ) ;
+            buf.append( attributeTypes[0].getOid() );
         }
         else // for list of oids we need a parenthesis
         {
-            l_buf.append( "( " ) ;
-            l_buf.append( l_attributeTypes[0] ) ;
-            for ( int ii = 1; ii < l_attributeTypes.length; ii++ )
+            buf.append( "( " );
+            buf.append( attributeTypes[0] );
+            for ( int ii = 1; ii < attributeTypes.length; ii++ )
             {
-                l_buf.append( " $ " ) ;
-                l_buf.append( l_attributeTypes[ii] ) ;
+                buf.append( " $ " );
+                buf.append( attributeTypes[ii] );
             }
-            l_buf.append( " ) " ) ;
+            buf.append( " ) " );
         }
         
-        l_buf.append( '\n' ) ;
-        return l_buf.toString() ;
+        buf.append( '\n' );
+        return buf.toString();
     }
     
     
@@ -403,68 +370,68 @@
      * that is 'NameFormDescription = ' is not generated.
      * <pre>
      * NameFormDescription = "(" whsp
-     *     numericoid whsp                ; NameForm identifier
+     *     numericoid whsp               ; NameForm identifier
      *     [ "NAME" qdescrs ]
      *     [ "DESC" qdstring ]
      *     [ "OBSOLETE" whsp ]
-     *     "OC" woid                      ; Structural ObjectClass
-     *     "MUST" oids                    ; AttributeTypes
-     *     [ "MAY" oids ]                 ; AttributeTypes
+     *     "OC" woid                     ; Structural ObjectClass
+     *     "MUST" oids                   ; AttributeTypes
+     *     [ "MAY" oids ]                ; AttributeTypes
      * whsp ")"
      *</pre>
-     * @param a_nameForm the NameForm to generate the description for
+     * @param nameForm the NameForm to generate the description for
      * @return the NameFormDescription string
      */
-    public static String getDescription( NameForm a_nameForm )
+    public static String getDescription( NameForm nameForm )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_nameForm.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( nameForm.getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_nameForm.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( nameForm.getName() );
+        buf.append( '\n' );
         
-        if ( a_nameForm.getDescription() != null )
+        if ( nameForm.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_nameForm.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( nameForm.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( a_nameForm.isObsolete() )
+        if ( nameForm.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
-        l_buf.append( "OC " ) ;
-        l_buf.append( a_nameForm.getObjectClass().getOid() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "OC " );
+        buf.append( nameForm.getObjectClass().getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "MUST\n" ) ;
-        AttributeType[] l_must = a_nameForm.getMustUse() ;
-        for ( int ii = 0; ii < l_must.length; ii++ )
+        buf.append( "MUST\n" );
+        AttributeType[] must = nameForm.getMustUse();
+        for ( int ii = 0; ii < must.length; ii++ )
         {
-            l_buf.append( '\t' ) ;
-            l_buf.append( l_must[ii].getOid() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( '\t' );
+            buf.append( must[ii].getOid() );
+            buf.append( '\n' );
         }
         
-        AttributeType[] l_may = a_nameForm.getMaytUse() ;
-        if ( l_may != null && l_may.length > 0 )
+        AttributeType[] may = nameForm.getMaytUse();
+        if ( may != null && may.length > 0 )
         {
-            l_buf.append( "MAY\n" ) ;
-            for ( int ii = 0; ii < l_must.length; ii++ )
+            buf.append( "MAY\n" );
+            for ( int ii = 0; ii < must.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_may[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( may[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
+        buf.append( " )" );
+        return buf.toString();
     }
     
     
@@ -475,87 +442,87 @@
      * that is 'ObjectClassDescription = ' is not generated.
      * <pre>
      * ObjectClassDescription = "(" whsp
-     *     numericoid whsp      ; ObjectClass identifier
+     *     numericoid whsp     ; ObjectClass identifier
      *     [ "NAME" qdescrs ]
      *     [ "DESC" qdstring ]
      *     [ "OBSOLETE" whsp ]
-     *     [ "SUP" oids ]       ; Superior ObjectClasses
+     *     [ "SUP" oids ]      ; Superior ObjectClasses
      *     [ ( "ABSTRACT" / "STRUCTURAL" / "AUXILIARY" ) whsp ]
-     *                          ; default structural
-     *     [ "MUST" oids ]      ; AttributeTypes
-     *     [ "MAY" oids ]       ; AttributeTypes
+     *                         ; default structural
+     *     [ "MUST" oids ]     ; AttributeTypes
+     *     [ "MAY" oids ]      ; AttributeTypes
      * whsp ")"
      * </pre>
-     * @param a_objectClass the ObjectClass to generate a description for
+     * @param objectClass the ObjectClass to generate a description for
      * @return the description in the ObjectClassDescription syntax
      */
-    public static String getDescription( ObjectClass a_objectClass )
+    public static String getDescription( ObjectClass objectClass )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_objectClass.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( objectClass.getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_objectClass.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( objectClass.getName() );
+        buf.append( '\n' );
         
-        if ( a_objectClass.getDescription() != null )
+        if ( objectClass.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_objectClass.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( objectClass.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( a_objectClass.isObsolete() )
+        if ( objectClass.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
-        ObjectClass [] l_sups = a_objectClass.getSuperClasses() ;
-        if ( l_sups != null && l_sups.length > 0 )
+        ObjectClass [] sups = objectClass.getSuperClasses();
+        if ( sups != null && sups.length > 0 )
         {
-            l_buf.append( "SUP\n" ) ;
-            for ( int ii = 0; ii < l_sups.length; ii++ )
+            buf.append( "SUP\n" );
+            for ( int ii = 0; ii < sups.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_sups[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( sups[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        if ( a_objectClass.getType() != null )
+        if ( objectClass.getType() != null )
         {
-            l_buf.append( a_objectClass.getType().getName() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( objectClass.getType().getName() );
+            buf.append( '\n' );
         }
         
-        AttributeType [] l_must = a_objectClass.getMustList() ;
-        if ( l_must != null && l_must.length > 0 )
+        AttributeType [] must = objectClass.getMustList();
+        if ( must != null && must.length > 0 )
         {
-            l_buf.append( "MUST\n" ) ;
-            for ( int ii = 0; ii < l_must.length; ii++ )
+            buf.append( "MUST\n" );
+            for ( int ii = 0; ii < must.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_must[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( must[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        AttributeType [] l_may = a_objectClass.getMayList() ;
-        if ( l_may != null && l_may.length > 0 )
+        AttributeType [] may = objectClass.getMayList();
+        if ( may != null && may.length > 0 )
         {
-            l_buf.append( "MAY\n" ) ;
-            for ( int ii = 0; ii < l_may.length; ii++ )
+            buf.append( "MAY\n" );
+            for ( int ii = 0; ii < may.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_may[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( may[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
+        buf.append( " )" );
+        return buf.toString();
     }
     
     
@@ -566,59 +533,59 @@
      * generated: that is 'DITStructureRuleDescription = ' is not generated.
      * <pre>
      * DITStructureRuleDescription = "(" whsp
-     *     ruleidentifier whsp            ; DITStructureRule identifier
+     *     ruleidentifier whsp           ; DITStructureRule identifier
      *     [ "NAME" qdescrs ]
      *     [ "DESC" qdstring ]
      *     [ "OBSOLETE" whsp ]
-     *     "FORM" woid whsp               ; NameForm
-     *     [ "SUP" ruleidentifiers whsp ] ; superior DITStructureRules
+     *     "FORM" woid whsp              ; NameForm
+     *     [ "SUP" ruleidentifiers whsp ]; superior DITStructureRules
      * ")"
      * </pre>
-     * @param a_dITStructureRule the DITStructureRule to generate the
+     * @param dITStructureRule the DITStructureRule to generate the
      *      description for
      * @return the description in the DITStructureRuleDescription syntax
      */
-    public static String getDescription( DITStructureRule a_dITStructureRule )
+    public static String getDescription( DITStructureRule dITStructureRule )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_dITStructureRule.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( dITStructureRule.getOid() );
+        buf.append( '\n' );
         
-        l_buf.append( "NAME " ) ;
-        l_buf.append( a_dITStructureRule.getName() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "NAME " );
+        buf.append( dITStructureRule.getName() );
+        buf.append( '\n' );
         
-        if ( a_dITStructureRule.getDescription() != null )
+        if ( dITStructureRule.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_dITStructureRule.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( dITStructureRule.getDescription() );
+            buf.append( '\n' );
         }
         
-        if ( a_dITStructureRule.isObsolete() )
+        if ( dITStructureRule.isObsolete() )
         {    
-            l_buf.append( "OBSOLETE" ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "OBSOLETE" );
+            buf.append( '\n' );
         }
         
-        l_buf.append( "FORM " ) ;
-        l_buf.append( a_dITStructureRule.getNameForm().getOid() ) ;
-        l_buf.append( '\n' ) ;
+        buf.append( "FORM " );
+        buf.append( dITStructureRule.getNameForm().getOid() );
+        buf.append( '\n' );
         
-        DITStructureRule [] l_sups = a_dITStructureRule.getSuperClasses() ;
-        if ( l_sups != null && l_sups.length > 0 )
+        DITStructureRule [] sups = dITStructureRule.getSuperClasses();
+        if ( sups != null && sups.length > 0 )
         {
-            l_buf.append( "SUP\n" ) ;
-            for ( int ii = 0; ii < l_sups.length; ii++ )
+            buf.append( "SUP\n" );
+            for ( int ii = 0; ii < sups.length; ii++ )
             {
-                l_buf.append( '\t' ) ;
-                l_buf.append( l_sups[ii].getOid() ) ;
-                l_buf.append( '\n' ) ;
+                buf.append( '\t' );
+                buf.append( sups[ii].getOid() );
+                buf.append( '\n' );
             }
         }
         
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
+        buf.append( " )" );
+        return buf.toString();
     }
 
 
@@ -633,23 +600,23 @@
      *     [ "DESC" qdstring ]
      * whsp ")"
      * </pre>
-     * @param a_syntax the Syntax to generate a description for
+     * @param syntax the Syntax to generate a description for
      * @return the description in the SyntaxDescription syntax
      */
-    public static String getDescription( Syntax a_syntax )
+    public static String getDescription( Syntax syntax )
     {
-        StringBuffer l_buf = new StringBuffer( "( " ) ;
-        l_buf.append( a_syntax.getOid() ) ;
-        l_buf.append( '\n' ) ;
+        StringBuffer buf = new StringBuffer( "( " );
+        buf.append( syntax.getOid() );
+        buf.append( '\n' );
         
-        if ( a_syntax.getDescription() != null )
+        if ( syntax.getDescription() != null )
         {    
-            l_buf.append( "DESC " ) ;
-            l_buf.append( a_syntax.getDescription() ) ;
-            l_buf.append( '\n' ) ;
+            buf.append( "DESC " );
+            buf.append( syntax.getDescription() );
+            buf.append( '\n' );
         }
         
-        l_buf.append( " )" ) ;
-        return l_buf.toString() ;
+        buf.append( " )" );
+        return buf.toString();
     }
 }

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleEnum.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleEnum.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleEnum.java	Sat Sep 25 22:44:55 2004
@@ -1,60 +1,27 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.apache.ldap.common.schema ;
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.ldap.common.schema;
 
 
-import java.util.Map ;
-import java.util.List ;
+import java.util.Map;
+import java.util.List;
 
-import org.apache.commons.lang.enum.EnumUtils ;
-import org.apache.commons.lang.enum.ValuedEnum ;
+import org.apache.ldap.common.util.EnumUtils;
+import org.apache.ldap.common.util.ValuedEnum;
 
 
 /**
@@ -73,62 +40,61 @@
 public class MatchingRuleEnum extends ValuedEnum
 {
     /** value for ordering usage */
-    public static final int ORDERING_VAL = 0 ;
+    public static final int ORDERING_VAL = 0;
     /** value for equality usage */
-    public static final int EQUALITY_VAL = 1 ;
+    public static final int EQUALITY_VAL = 1;
     /** value for substring usage */
-    public static final int SUBSTRING_VAL = 2 ;
+    public static final int SUBSTRING_VAL = 2;
 
     /** enum for ordering comparator usage */
     public static final MatchingRuleEnum ORDERING = 
-        new MatchingRuleEnum( "ORDERING", ORDERING_VAL ) ;
+        new MatchingRuleEnum( "ORDERING", ORDERING_VAL );
     /** enum for equality comparator usage */
     public static final MatchingRuleEnum EQUALITY = 
-        new MatchingRuleEnum( "EQUALITY", EQUALITY_VAL ) ;
+        new MatchingRuleEnum( "EQUALITY", EQUALITY_VAL );
     /** enum for substring comparator usage */
     public static final MatchingRuleEnum SUBSTRING = 
-        new MatchingRuleEnum( "SUBSTRING", SUBSTRING_VAL ) ;
+        new MatchingRuleEnum( "SUBSTRING", SUBSTRING_VAL );
 
     
     /**
      * Private constructor so no other instances can be created other than the
      * public static constants in this class.
      *
-     * @param a_name a string name for the enumeration value.
-     * @param a_value the integer value of the enumeration.
+     * @param name a string name for the enumeration value.
+     * @param value the integer value of the enumeration.
      */
-    private MatchingRuleEnum( final String a_name, final int a_value )
+    private MatchingRuleEnum( final String name, final int value )
     {
-        super( a_name, a_value ) ;
+        super( name, value );
     }
     
     
     /**
      * Gets the enumeration type for the usage string regardless of case.
      * 
-     * @param a_usage the usage string
+     * @param usage the usage string
      * @return the usage enumeration type
      */
-    public static MatchingRuleEnum getUsage( String a_usage )
+    public static MatchingRuleEnum getUsage( String usage )
     {
-        if ( a_usage.equalsIgnoreCase( MatchingRuleEnum.EQUALITY.getName() ) )
+        if ( usage.equalsIgnoreCase( MatchingRuleEnum.EQUALITY.getName() ) )
         {
-            return MatchingRuleEnum.EQUALITY ;
+            return MatchingRuleEnum.EQUALITY;
         }
         
-        if ( a_usage.equalsIgnoreCase( 
-            MatchingRuleEnum.ORDERING.getName() ) )
+        if ( usage.equalsIgnoreCase( MatchingRuleEnum.ORDERING.getName() ) )
         {
-            return MatchingRuleEnum.ORDERING ;
+            return MatchingRuleEnum.ORDERING;
         }
         
-        if ( a_usage.equalsIgnoreCase( MatchingRuleEnum.SUBSTRING.getName() ) )
+        if ( usage.equalsIgnoreCase( MatchingRuleEnum.SUBSTRING.getName() ) )
         {
-            return MatchingRuleEnum.SUBSTRING ;
+            return MatchingRuleEnum.SUBSTRING;
         }
 
         throw new IllegalArgumentException( "Unknown matching rule usage string"
-            + a_usage ) ;
+            + usage );
     }
     
     
@@ -139,7 +105,7 @@
      */
     public static List list()
     {
-        return EnumUtils.getEnumList( MatchingRuleEnum.class ) ;
+        return EnumUtils.getEnumList( MatchingRuleEnum.class );
     }
     
     
@@ -151,6 +117,6 @@
      */
     public static Map map()
     {
-        return EnumUtils.getEnumMap( MatchingRuleEnum.class ) ;
+        return EnumUtils.getEnumMap( MatchingRuleEnum.class );
     }
 }

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClassTypeEnum.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClassTypeEnum.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClassTypeEnum.java	Sat Sep 25 22:44:55 2004
@@ -1,60 +1,27 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.apache.ldap.common.schema ;
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.ldap.common.schema;
 
 
-import java.util.Map ;
-import java.util.List ;
+import java.util.Map;
+import java.util.List;
 
-import org.apache.commons.lang.enum.EnumUtils ;
-import org.apache.commons.lang.enum.ValuedEnum ;
+import org.apache.ldap.common.util.EnumUtils;
+import org.apache.ldap.common.util.ValuedEnum;
 
 
 /**
@@ -73,35 +40,35 @@
 public class ObjectClassTypeEnum extends ValuedEnum
 {
     /** The enumeration constant value for the abstract objectClasses */
-    public static final int ABSTRACT_VAL = 0 ;
+    public static final int ABSTRACT_VAL = 0;
     /** The enumeration constant value for the auxillary objectClasses */
-    public static final int AUXILLARY_VAL = 1 ;
+    public static final int AUXILLARY_VAL = 1;
     /** The enumeration constant value for the structural objectClasses */
-    public static final int STRUCTURAL_VAL = 2 ;
+    public static final int STRUCTURAL_VAL = 2;
 
     /** ValuedEnum for abstract objectClasses */
     public static final ObjectClassTypeEnum ABSTRACT = 
-        new ObjectClassTypeEnum( "ABSTRACT", ABSTRACT_VAL ) ;
+        new ObjectClassTypeEnum( "ABSTRACT", ABSTRACT_VAL );
     
     /** ValuedEnum for auxillary objectClasses */
     public static final ObjectClassTypeEnum AUXILLARY =
-        new ObjectClassTypeEnum( "AUXILLARY", AUXILLARY_VAL ) ;
+        new ObjectClassTypeEnum( "AUXILLARY", AUXILLARY_VAL );
 
     /** ValuedEnum for structural objectClasses */
     public static final ObjectClassTypeEnum STRUCTURAL =
-        new ObjectClassTypeEnum( "STRUCTURAL", STRUCTURAL_VAL ) ;
+        new ObjectClassTypeEnum( "STRUCTURAL", STRUCTURAL_VAL );
 
 
     /**
      * Private constructor so no other instances can be created other than the
      * public static constants in this class.
      *
-     * @param a_name a string name for the enumeration value.
-     * @param a_value the integer value of the enumeration.
+     * @param name a string name for the enumeration value.
+     * @param value the integer value of the enumeration.
      */
-    private ObjectClassTypeEnum( final String a_name, final int a_value )
+    private ObjectClassTypeEnum( final String name, final int value )
     {
-        super( a_name, a_value ) ;
+        super( name, value );
     }
 
 
@@ -109,28 +76,28 @@
      * Gets the objectClass type enumeration of AUXILLARY, STRUCTURAL, or,
      * ABSTRACT.
      * 
-     * @param a_name options are AUXILLARY, STRUCTURAL, or, ABSTRACT
+     * @param name options are AUXILLARY, STRUCTURAL, or, ABSTRACT
      * @return the type safe enumeration for the objectClass type
      */
-    public static ObjectClassTypeEnum getClassType( String a_name )
+    public static ObjectClassTypeEnum getClassType( String name )
     {
-        String l_upperCase = a_name.trim().toUpperCase() ;
+        String upperCase = name.trim().toUpperCase();
         
-        if ( l_upperCase.equals( "STRUCTURAL" ) )
+        if ( upperCase.equals( "STRUCTURAL" ) )
         {
-            return ABSTRACT ;
+            return ABSTRACT;
         }
-        else if ( l_upperCase.equals( "AUXILLARY" ) )
+        else if ( upperCase.equals( "AUXILLARY" ) )
         {
-            return AUXILLARY ;
+            return AUXILLARY;
         }
-        else if ( l_upperCase.equals( "ABSTRACT" ) )
+        else if ( upperCase.equals( "ABSTRACT" ) )
         {
-            return ABSTRACT ;
+            return ABSTRACT;
         }
         
         throw new IllegalArgumentException( "Unknown objectClass type name '" 
-            + a_name + "': options are AUXILLARY, STRUCTURAL, ABSTRACT." ) ;
+            + name + "': options are AUXILLARY, STRUCTURAL, ABSTRACT." );
     }
 
 
@@ -141,7 +108,7 @@
      */
     public static List list()
     {
-        return EnumUtils.getEnumList( ObjectClassTypeEnum.class ) ;
+        return EnumUtils.getEnumList( ObjectClassTypeEnum.class );
     }
     
     
@@ -153,6 +120,6 @@
      */
     public static Map map()
     {
-        return EnumUtils.getEnumMap( ObjectClassTypeEnum.class ) ;
+        return EnumUtils.getEnumMap( ObjectClassTypeEnum.class );
     }
 }

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/RegexSyntaxChecker.java	Sat Sep 25 22:44:55 2004
@@ -1,59 +1,26 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.apache.ldap.common.schema ;
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.ldap.common.schema;
 
 
-import javax.naming.NamingException ;
-import javax.naming.directory.InvalidAttributeValueException ;
+import javax.naming.NamingException;
+import javax.naming.directory.InvalidAttributeValueException;
 
-import org.apache.oro.text.perl.Perl5Util ;
+import org.apache.oro.text.perl.Perl5Util;
 
 
 /**
@@ -68,24 +35,24 @@
     implements SyntaxChecker
 {
     /** the oid of the syntax checked */
-    private final String m_oid ;
+    private final String oid;
     /** the set of regular expressions */
-    private final String [] m_expressions ;
+    private final String [] expressions;
     /** the Perl5 regex utilities */
-    private final Perl5Util m_perl = new Perl5Util() ;
+    private final Perl5Util perl = new Perl5Util();
 
 
     /**
      * Creates a Syntax validator for a specific Syntax using Perl5 matching
      * rules for validation.
      * 
-     * @param a_oid the oid of the Syntax values checked
-     * @param a_matchExprArray the array of matching expressions
+     * @param oid the oid of the Syntax values checked
+     * @param matchExprArray the array of matching expressions
      */
-    public RegexSyntaxChecker( String a_oid, String [] a_matchExprArray )
+    public RegexSyntaxChecker( String oid, String [] matchExprArray )
     {
-        m_expressions = a_matchExprArray ;
-        m_oid = a_oid ;
+        expressions = matchExprArray;
+        this.oid = oid;
     }
 
 
@@ -94,48 +61,48 @@
      */
     public String getSyntaxOid()
     {
-        return m_oid ;
+        return oid;
     }
 
 
     /**
      * @see org.apache.ldap.common.schema.SyntaxChecker#isValidSyntax(java.lang.Object)
      */
-    public boolean isValidSyntax( Object a_value )
+    public boolean isValidSyntax( Object value )
     {
-        String l_str = null ;
-        boolean l_match = true ;
+        String str = null;
+        boolean match = true;
         
-        if ( a_value instanceof String )
+        if ( value instanceof String )
         {
-            l_str = ( String ) a_value ;
+            str = ( String ) value;
         }
 
-        for ( int ii = 0; ii < m_expressions.length; ii++ ) 
+        for ( int ii = 0; ii < expressions.length; ii++ )
         {
-            l_match = l_match && m_perl.match( m_expressions[ii], l_str ) ;
-            if ( ! l_match ) 
+            match = match && perl.match( expressions[ii], str );
+            if ( ! match )
             {
-                break ;
+                break;
             }
         }
 
-        return l_match ;
+        return match;
     }
 
 
     /**
      * @see org.apache.ldap.common.schema.SyntaxChecker#assertSyntax(java.lang.Object)
      */
-    public void assertSyntax( Object a_value ) throws NamingException
+    public void assertSyntax( Object value ) throws NamingException
     {
-        if ( isValidSyntax( a_value ) )
+        if ( isValidSyntax( value ) )
         {
-            return ;
+            return;
         }
         
-        throw new InvalidAttributeValueException( a_value 
+        throw new InvalidAttributeValueException( value
                 + " does not conform to the syntax specified by " 
-                + m_oid ) ;
+                + oid );
     }
 }

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/UsageEnum.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/UsageEnum.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/UsageEnum.java	Sat Sep 25 22:44:55 2004
@@ -1,60 +1,27 @@
 /*
-
- ============================================================================
-                   The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of  source code must  retain the above copyright  notice,
-    this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
-    include  the following  acknowledgment:  "This product includes  software
-    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
-    Alternately, this  acknowledgment may  appear in the software itself,  if
-    and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
-    and "Apache Software Foundation"  must not be used to endorse or promote
-    products derived  from this  software without  prior written
-    permission. For written permission, please contact apache@apache.org.
-
- 5. Products  derived from this software may not  be called "Apache", nor may
-    "Apache" appear  in their name,  without prior written permission  of the
-    Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
- APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
- ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
- (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software  consists of voluntary contributions made  by many individuals
- on  behalf of the Apache Software  Foundation. For more  information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.apache.ldap.common.schema ;
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.ldap.common.schema;
 
 
-import java.util.Map ;
-import java.util.List ;
+import java.util.Map;
+import java.util.List;
 
-import org.apache.commons.lang.enum.EnumUtils ;
-import org.apache.commons.lang.enum.ValuedEnum ;
+import org.apache.ldap.common.util.EnumUtils;
+import org.apache.ldap.common.util.ValuedEnum;
 
 
 /**
@@ -74,39 +41,39 @@
 public class UsageEnum extends ValuedEnum
 {
     /** value for attributes with userApplications usage */
-    public static final int USERAPPLICATIONS_VAL = 0 ;
+    public static final int USERAPPLICATIONS_VAL = 0;
     /** value for attributes with directoryOperation usage */
-    public static final int DIRECTORYOPERATION_VAL = 1 ;
+    public static final int DIRECTORYOPERATION_VAL = 1;
     /** value for attributes with distributedOperation usage */
-    public static final int DISTRIBUTEDOPERATION_VAL = 2 ;
+    public static final int DISTRIBUTEDOPERATION_VAL = 2;
     /** value for attributes with dSAOperation usage */
-    public static final int DSAOPERATION_VAL = 3 ;
+    public static final int DSAOPERATION_VAL = 3;
 
 
     /** enum for attributes with userApplications usage */
     public static final UsageEnum USERAPPLICATIONS = 
-        new UsageEnum( "userApplications", USERAPPLICATIONS_VAL ) ;
+        new UsageEnum( "userApplications", USERAPPLICATIONS_VAL );
     /** enum for attributes with directoryOperation usage */
     public static final UsageEnum DIRECTORYOPERATION = 
-        new UsageEnum( "directoryOperation", DIRECTORYOPERATION_VAL ) ;
+        new UsageEnum( "directoryOperation", DIRECTORYOPERATION_VAL );
     /** enum for attributes with distributedOperation usage */
     public static final UsageEnum DISTRIBUTEDOPERATION = 
-        new UsageEnum( "distributedOperation", DISTRIBUTEDOPERATION_VAL ) ;
+        new UsageEnum( "distributedOperation", DISTRIBUTEDOPERATION_VAL );
     /** enum for attributes with dSAOperation usage */
     public static final UsageEnum DSAOPERATION = 
-        new UsageEnum( "dSAOperation", DSAOPERATION_VAL ) ;
+        new UsageEnum( "dSAOperation", DSAOPERATION_VAL );
 
 
     /**
      * Private construct so no other instances can be created other than the
      * public static constants in this class.
      *
-     * @param a_name a string name for the enumeration value.
-     * @param a_value the integer value of the enumeration.
+     * @param name a string name for the enumeration value.
+     * @param value the integer value of the enumeration.
      */
-    private UsageEnum( final String a_name, final int a_value )
+    private UsageEnum( final String name, final int value )
     {
-        super( a_name, a_value ) ;
+        super( name, value );
     }
     
     
@@ -114,35 +81,35 @@
      * Gets the enumeration type for the attributeType usage string regardless 
      * of case.
      * 
-     * @param a_usage the usage string
+     * @param usage the usage string
      * @return the usage enumeration type
      */
-    public static UsageEnum getUsage( String a_usage )
+    public static UsageEnum getUsage( String usage )
     {
-        if ( a_usage.equalsIgnoreCase( UsageEnum.USERAPPLICATIONS.getName() ) )
+        if ( usage.equalsIgnoreCase( UsageEnum.USERAPPLICATIONS.getName() ) )
         {
-            return UsageEnum.USERAPPLICATIONS ;
+            return UsageEnum.USERAPPLICATIONS;
         }
         
-        if ( a_usage.equalsIgnoreCase( 
+        if ( usage.equalsIgnoreCase(
             UsageEnum.DIRECTORYOPERATION.getName() ) )
         {
-            return UsageEnum.DIRECTORYOPERATION ;
+            return UsageEnum.DIRECTORYOPERATION;
         }
         
-        if ( a_usage.equalsIgnoreCase( 
+        if ( usage.equalsIgnoreCase(
             UsageEnum.DISTRIBUTEDOPERATION.getName() ) )
         {
-            return UsageEnum.DISTRIBUTEDOPERATION ;
+            return UsageEnum.DISTRIBUTEDOPERATION;
         }
         
-        if ( a_usage.equalsIgnoreCase( UsageEnum.DSAOPERATION.getName() ) )
+        if ( usage.equalsIgnoreCase( UsageEnum.DSAOPERATION.getName() ) )
         {
-            return UsageEnum.DSAOPERATION ;
+            return UsageEnum.DSAOPERATION;
         }
         
         throw new IllegalArgumentException( "Unknown attributeType usage string"
-            + a_usage ) ;
+            + usage );
     }
     
     
@@ -153,7 +120,7 @@
      */
     public static List list()
     {
-        return EnumUtils.getEnumList( UsageEnum.class ) ;
+        return EnumUtils.getEnumList( UsageEnum.class );
     }
     
     
@@ -164,6 +131,6 @@
      */
     public static Map map()
     {
-        return EnumUtils.getEnumMap( UsageEnum.class ) ;
+        return EnumUtils.getEnumMap( UsageEnum.class );
     }
 }