directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208953 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Sun, 03 Jul 2005 17:14:40 GMT
Author: elecharny
Date: Sun Jul  3 10:14:39 2005
New Revision: 208953

URL: http://svn.apache.org/viewcvs?rev=208953&view=rev
Log:
Added the CompareRequest states

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java?rev=208953&r1=208952&r2=208953&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Sun Jul  3 10:14:39 2005
@@ -838,6 +838,47 @@
     public static int LAST_DEL_REQUEST_STATE = 2;
 
     //=========================================================================
+    // Compare Request grammar states 
+    //=========================================================================
+    // Compare Request --------------------------------------------------------
+    /** Compare Tag */
+    public static int COMPARE_REQUEST_TAG = 0;
+    
+    /** Compare Value */
+    public static int COMPARE_REQUEST_VALUE = 1;
+    
+    // Entry ------------------------------------------------------------------
+    /** Entry Tag */
+    public static int COMPARE_REQUEST_ENTRY_TAG = 2;
+    
+    /** Entry Value */
+    public static int COMPARE_REQUEST_ENTRY_VALUE = 3;
+    
+    // AVA --------------------------------------------------------------------
+    /** AVA Tag */
+    public static int COMPARE_REQUEST_AVA_TAG = 4;
+    
+    /** AVA Value */
+    public static int COMPARE_REQUEST_AVA_VALUE = 5;
+    
+    // Attribute desc ---------------------------------------------------------
+    /** Attribute desc Tag */
+    public static int COMPARE_REQUEST_ATTRIBUTE_DESC_TAG = 6;
+    
+    /** Attribute desc Value */
+    public static int COMPARE_REQUEST_ATTRIBUTE_DESC_VALUE = 7;
+    
+    // Assertion value --------------------------------------------------------
+    /** Assertion value Tag */
+    public static int COMPARE_REQUEST_ASSERTION_VALUE_TAG = 8;
+    
+    /** Assertion value Value */
+    public static int COMPARE_REQUEST_ASSERTION_VALUE_VALUE = 9;
+
+    /** The last state */
+    public static int LAST_COMPARE_REQUEST_STATE = 10;
+
+    //=========================================================================
     // Grammars declaration.
     //=========================================================================
     /** Ldap Message Grammar */
@@ -966,6 +1007,12 @@
     /** DelRequest number */
     public static final int DEL_REQUEST_GRAMMAR = 20;
     
+    /** CompareRequest Grammar */
+    public static final int COMPARE_REQUEST_GRAMMAR_SWITCH = 0x1600;
+
+    /** CompareRequest number */
+    public static final int COMPARE_REQUEST_GRAMMAR = 21;
+    
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 25;
 
@@ -996,7 +1043,8 @@
             "SEARCH_RESULT_REFERENCE_GRAMMAR_SWITCH",
             "ADD_REQUEST_GRAMMAR_SWITCH",
             "MODIFY_DN_REQUEST_GRAMMAR_SWITCH",
-            "DEL_REQUEST_GRAMMAR_SWITCH"
+            "DEL_REQUEST_GRAMMAR_SWITCH",
+            "COMPARE_REQUEST_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -1176,158 +1224,171 @@
     private static String[] FilterString =
         new String[]
         {
-                "FILTER_TAG",
-                "FILTER_AND_TAG",
-                "FILTER_AND_VALUE",
-                "FILTER_OR_TAG",
-                "FILTER_OR_VALUE",
-                "FILTER_NOT_TAG",
-                "FILTER_NOT_VALUE",
-                "FILTER_EQUALITY_MATCH_TAG",
-                "FILTER_EQUALITY_MATCH_VALUE",
-                "FILTER_SUBSTRINGS_TAG",
-                "FILTER_SUBSTRINGS_VALUE",
-                "FILTER_GREATER_OR_EQUAL_TAG",
-                "FILTER_GREATER_OR_EQUAL_VALUE",
-                "FILTER_LESS_OR_EQUAL_TAG",
-                "FILTER_LESS_OR_EQUAL_VALUE",
-                "FILTER_PRESENT_TAG",
-                "FILTER_PRESENT_VALUE",
-                "FILTER_APPROX_MATCH_TAG",
-                "FILTER_APPROX_MATCH_VALUE",
-                "FILTER_EXTENSIBLE_MATCH_TAG",
-                "FILTER_EXTENSIBLE_MATCH_VALUE",
-                "FILTER_LOOP_TAG",					
-                "FILTER_ATTRIBUTE_DESC_TAG",
-                "FILTER_ATTRIBUTE_DESC_VALUE",
-                "FILTER_ASSERTION_VALUE_TAG",
-                "FILTER_ASSERTION_VALUE_VALUE",
-    		    "FILTER_SUBSTRINGS_TYPE_TAG",
-    		    "FILTER_SUBSTRINGS_TYPE_VALUE",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_TAG",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_VALUE",    
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_CHOICE_TAG",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_INITIAL_TAG",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_INITIAL_VALUE",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_ANY_OR_FINAL_TAG",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_ANY_VALUE",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_FINAL_TAG",
-    		    "FILTER_SUBSTRINGS_SUBSTRINGS_FINAL_VALUE",
-    		    "FILTER_MATCHING_RULE_ASSERTION_TAG",
-                "FILTER_MATCHING_RULE_ASSERTION_VALUE",
-                "FILTER_MATCHING_RULE_OR_TYPE_TAG",
-                "FILTER_MATCHING_RULE_VALUE",
-                "FILTER_MATCHING_TYPE_OR_MATCH_VALUE_TAG",
-                "FILTER_MATCHING_TYPE_VALUE",
-                "FILTER_MATCHING_MATCH_VALUE_TAG",
-                "FILTER_MATCHING_MATCH_VALUE_VALUE",
-                "FILTER_MATCHING_DN_ATTRIBUTES_OR_END_TAG",
-                "FILTER_MATCHING_DN_ATTRIBUTES_VALUE",
-                "FILTER_END_STATE"
+            "FILTER_TAG",
+            "FILTER_AND_TAG",
+            "FILTER_AND_VALUE",
+            "FILTER_OR_TAG",
+            "FILTER_OR_VALUE",
+            "FILTER_NOT_TAG",
+            "FILTER_NOT_VALUE",
+            "FILTER_EQUALITY_MATCH_TAG",
+            "FILTER_EQUALITY_MATCH_VALUE",
+            "FILTER_SUBSTRINGS_TAG",
+            "FILTER_SUBSTRINGS_VALUE",
+            "FILTER_GREATER_OR_EQUAL_TAG",
+            "FILTER_GREATER_OR_EQUAL_VALUE",
+            "FILTER_LESS_OR_EQUAL_TAG",
+            "FILTER_LESS_OR_EQUAL_VALUE",
+            "FILTER_PRESENT_TAG",
+            "FILTER_PRESENT_VALUE",
+            "FILTER_APPROX_MATCH_TAG",
+            "FILTER_APPROX_MATCH_VALUE",
+            "FILTER_EXTENSIBLE_MATCH_TAG",
+            "FILTER_EXTENSIBLE_MATCH_VALUE",
+            "FILTER_LOOP_TAG",					
+            "FILTER_ATTRIBUTE_DESC_TAG",
+            "FILTER_ATTRIBUTE_DESC_VALUE",
+            "FILTER_ASSERTION_VALUE_TAG",
+            "FILTER_ASSERTION_VALUE_VALUE",
+		    "FILTER_SUBSTRINGS_TYPE_TAG",
+		    "FILTER_SUBSTRINGS_TYPE_VALUE",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_TAG",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_VALUE",    
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_CHOICE_TAG",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_INITIAL_TAG",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_INITIAL_VALUE",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_ANY_OR_FINAL_TAG",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_ANY_VALUE",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_FINAL_TAG",
+		    "FILTER_SUBSTRINGS_SUBSTRINGS_FINAL_VALUE",
+		    "FILTER_MATCHING_RULE_ASSERTION_TAG",
+            "FILTER_MATCHING_RULE_ASSERTION_VALUE",
+            "FILTER_MATCHING_RULE_OR_TYPE_TAG",
+            "FILTER_MATCHING_RULE_VALUE",
+            "FILTER_MATCHING_TYPE_OR_MATCH_VALUE_TAG",
+            "FILTER_MATCHING_TYPE_VALUE",
+            "FILTER_MATCHING_MATCH_VALUE_TAG",
+            "FILTER_MATCHING_MATCH_VALUE_VALUE",
+            "FILTER_MATCHING_DN_ATTRIBUTES_OR_END_TAG",
+            "FILTER_MATCHING_DN_ATTRIBUTES_VALUE"
         };
     
     /** A string representation of all the search result entry states */
     private static String[] SearchResultEntryString =
         new String[]
         {
-			    "SEARCH_RESULT_ENTRY_TAG",
-			    "SEARCH_RESULT_ENTRY_VALUE",
-			    "SEARCH_RESULT_ENTRY_OBJECT_NAME_TAG",
-			    "SEARCH_RESULT_ENTRY_OBJECT_NAME_VALUE",
-			    "SEARCH_RESULT_ENTRY_ATTRIBUTES_TAG",
-			    "SEARCH_RESULT_ENTRY_ATTRIBUTES_VALUE",
-			    "SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_TAG",
-			    "SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE",
-			    "SEARCH_RESULT_ENTRY_TYPE_TAG",
-			    "SEARCH_RESULT_ENTRY_TYPE_VALUE",
-			    "SEARCH_RESULT_ENTRY_VALS_TAG",
-			    "SEARCH_RESULT_ENTRY_VALS_VALUE",
-			    "SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_TAG",
-			    "SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE",
-			    "SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG",
-			    "LAST_SEARCH_RESULT_ENTRY_STATE"
+		    "SEARCH_RESULT_ENTRY_TAG",
+		    "SEARCH_RESULT_ENTRY_VALUE",
+		    "SEARCH_RESULT_ENTRY_OBJECT_NAME_TAG",
+		    "SEARCH_RESULT_ENTRY_OBJECT_NAME_VALUE",
+		    "SEARCH_RESULT_ENTRY_ATTRIBUTES_TAG",
+		    "SEARCH_RESULT_ENTRY_ATTRIBUTES_VALUE",
+		    "SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_TAG",
+		    "SEARCH_RESULT_ENTRY_PARTIAL_ATTRIBUTE_LIST_VALUE",
+		    "SEARCH_RESULT_ENTRY_TYPE_TAG",
+		    "SEARCH_RESULT_ENTRY_TYPE_VALUE",
+		    "SEARCH_RESULT_ENTRY_VALS_TAG",
+		    "SEARCH_RESULT_ENTRY_VALS_VALUE",
+		    "SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_TAG",
+		    "SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_VALUE",
+		    "SEARCH_RESULT_ENTRY_ATTRIBUTE_VALUE_OR_LIST_TAG"
         };
     
     /** A string representation of all the modify request states */
     private static String[] ModifyRequestString =
         new String[]
         {
-			    "MODIFY_REQUEST_TAG",
-			    "MODIFY_REQUEST_VALUE",
-			    "MODIFY_REQUEST_OBJECT_TAG",
-			    "MODIFY_REQUEST_OBJECT_VALUE",
-			    "MODIFY_REQUEST_MODIFICATIONS_TAG",
-			    "MODIFY_REQUEST_MODIFICATIONS_VALUE",
-			    "MODIFY_REQUEST_MODIFICATION_SEQUENCE_TAG",
-			    "MODIFY_REQUEST_MODIFICATION_SEQUENCE_VALUE",
-			    "MODIFY_REQUEST_OPERATION_TAG",
-			    "MODIFY_REQUEST_OPERATION_VALUE",
-			    "MODIFY_REQUEST_MODIFICATION_TAG",
-			    "MODIFY_REQUEST_MODIFICATION_VALUE",
-			    "MODIFY_REQUEST_TYPE_TAG",
-			    "MODIFY_REQUEST_TYPE_VALUE",
-			    "MODIFY_REQUEST_VALS_TAG",
-			    "MODIFY_REQUEST_VALS_VALUE",
-			    "MODIFY_REQUEST_ATTRIBUTE_VALUE_TAG",
-			    "MODIFY_REQUEST_ATTRIBUTE_VALUE_VALUE",
-			    "MODIFY_REQUEST_ATTRIBUTE_VALUE_OR_MODIFICATION_TAG",
-			    "LAST_MODIFY_REQUEST_STATE"
+		    "MODIFY_REQUEST_TAG",
+		    "MODIFY_REQUEST_VALUE",
+		    "MODIFY_REQUEST_OBJECT_TAG",
+		    "MODIFY_REQUEST_OBJECT_VALUE",
+		    "MODIFY_REQUEST_MODIFICATIONS_TAG",
+		    "MODIFY_REQUEST_MODIFICATIONS_VALUE",
+		    "MODIFY_REQUEST_MODIFICATION_SEQUENCE_TAG",
+		    "MODIFY_REQUEST_MODIFICATION_SEQUENCE_VALUE",
+		    "MODIFY_REQUEST_OPERATION_TAG",
+		    "MODIFY_REQUEST_OPERATION_VALUE",
+		    "MODIFY_REQUEST_MODIFICATION_TAG",
+		    "MODIFY_REQUEST_MODIFICATION_VALUE",
+		    "MODIFY_REQUEST_TYPE_TAG",
+		    "MODIFY_REQUEST_TYPE_VALUE",
+		    "MODIFY_REQUEST_VALS_TAG",
+		    "MODIFY_REQUEST_VALS_VALUE",
+		    "MODIFY_REQUEST_ATTRIBUTE_VALUE_TAG",
+		    "MODIFY_REQUEST_ATTRIBUTE_VALUE_VALUE",
+		    "MODIFY_REQUEST_ATTRIBUTE_VALUE_OR_MODIFICATION_TAG"
         };
 
     /** A string representation of all the search result reference states */
     private static String[] SearchResultReferenceString =
         new String[]
         {
-			    "SEARCH_RESULT_REFERENCE_TAG",
-			    "SEARCH_RESULT_REFERENCE_VALUE",
-			    "SEARCH_RESULT_REFERENCE_LDAP_URL_TAG",
-			    "SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE",
-			    "SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG"
+		    "SEARCH_RESULT_REFERENCE_TAG",
+		    "SEARCH_RESULT_REFERENCE_VALUE",
+		    "SEARCH_RESULT_REFERENCE_LDAP_URL_TAG",
+		    "SEARCH_RESULT_REFERENCE_LDAP_URL_VALUE",
+		    "SEARCH_RESULT_REFERENCE_LOOP_OR_END_TAG"
         };
     
     /** A string representation of all the add request states */
     private static String[] AddRequestString =
         new String[]
         {
-                "ADD_REQUEST_TAG",
-                "ADD_REQUEST_VALUE",
-                "ADD_REQUEST_ENTRY_TAG",
-                "ADD_REQUEST_ENTRY_VALUE",
-                "ADD_REQUEST_ATTRIBUTES_TAG",
-                "ADD_REQUEST_ATTRIBUTES_VALUE",
-                "ADD_REQUEST_ATTRIBUTE_TAG",
-                "ADD_REQUEST_ATTRIBUTE_VALUE",
-                "ADD_REQUEST_ATTRIBUTES_TYPE_TAG",
-                "ADD_REQUEST_ATTRIBUTES_TYPE_VALUE",
-                "ADD_REQUEST_ATTRIBUTES_VALS_TAG",
-                "ADD_REQUEST_ATTRIBUTES_VALS_VALUE",
-                "ADD_REQUEST_ATTRIBUTES_VAL_TAG",
-                "ADD_REQUEST_ATTRIBUTES_VAL_VALUE",
-                "ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END"
+            "ADD_REQUEST_TAG",
+            "ADD_REQUEST_VALUE",
+            "ADD_REQUEST_ENTRY_TAG",
+            "ADD_REQUEST_ENTRY_VALUE",
+            "ADD_REQUEST_ATTRIBUTES_TAG",
+            "ADD_REQUEST_ATTRIBUTES_VALUE",
+            "ADD_REQUEST_ATTRIBUTE_TAG",
+            "ADD_REQUEST_ATTRIBUTE_VALUE",
+            "ADD_REQUEST_ATTRIBUTES_TYPE_TAG",
+            "ADD_REQUEST_ATTRIBUTES_TYPE_VALUE",
+            "ADD_REQUEST_ATTRIBUTES_VALS_TAG",
+            "ADD_REQUEST_ATTRIBUTES_VALS_VALUE",
+            "ADD_REQUEST_ATTRIBUTES_VAL_TAG",
+            "ADD_REQUEST_ATTRIBUTES_VAL_VALUE",
+            "ADD_REQUEST_ATTRIBUTES_VAL_OR_ATTRIBUTE_OR_END"
         };
     
     /** A string representation of all the ModifyDN request states */
     private static String[] ModifyDNRequestString =
         new String[]
         {
-			    "MODIFY_DN_REQUEST_TAG",
-			    "MODIFY_DN_REQUEST_VALUE",
-			    "MODIFY_DN_REQUEST_ENTRY_TAG",
-			    "MODIFY_DN_REQUEST_ENTRY_VALUE",
-			    "MODIFY_DN_REQUEST_NEW_RDN_TAG",
-			    "MODIFY_DN_REQUEST_NEW_RDN_VALUE",
-			    "MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG",
-			    "MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE",
-			    "MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG",
-			    "MODIFY_DN_REQUEST_NEW_SUPERIOR_VALUE"
+		    "MODIFY_DN_REQUEST_TAG",
+		    "MODIFY_DN_REQUEST_VALUE",
+		    "MODIFY_DN_REQUEST_ENTRY_TAG",
+		    "MODIFY_DN_REQUEST_ENTRY_VALUE",
+		    "MODIFY_DN_REQUEST_NEW_RDN_TAG",
+		    "MODIFY_DN_REQUEST_NEW_RDN_VALUE",
+		    "MODIFY_DN_REQUEST_DELETE_OLD_RDN_TAG",
+		    "MODIFY_DN_REQUEST_DELETE_OLD_RDN_VALUE",
+		    "MODIFY_DN_REQUEST_NEW_SUPERIOR_TAG",
+		    "MODIFY_DN_REQUEST_NEW_SUPERIOR_VALUE"
         };
 
     /** A string representation of all the delete request states */
     private static String[] DelRequestString =
         new String[]
         {
-			    "DEL_REQUEST_TAG",
-			    "DEL_REQUEST_VALUE"
+		    "DEL_REQUEST_TAG",
+		    "DEL_REQUEST_VALUE"
+        };
+
+    /** A string representation of all the compare request states */
+    private static String[] CompareRequestString =
+        new String[]
+        {
+		    "COMPARE_REQUEST_TAG",
+		    "COMPARE_REQUEST_VALUE",
+		    "COMPARE_REQUEST_ENTRY_TAG",
+		    "COMPARE_REQUEST_ENTRY_VALUE",
+		    "COMPARE_REQUEST_AVA_TAG",
+		    "COMPARE_REQUEST_AVA_VALUE",
+		    "COMPARE_REQUEST_ATTRIBUTE_DESC_TAG",
+		    "COMPARE_REQUEST_ATTRIBUTE_DESC_VALUE",
+		    "COMPARE_REQUEST_ASSERTION_VALUE_TAG",
+		    "COMPARE_REQUEST_ASSERTION_VALUE_VALUE"
         };
 
     /** The instance */
@@ -1384,6 +1445,7 @@
             case ADD_REQUEST_GRAMMAR             : return "ADD_REQUEST_GRAMMAR";
             case MODIFY_DN_REQUEST_GRAMMAR       : return "MODIFY_DN_REQUEST_GRAMMAR";
             case DEL_REQUEST_GRAMMAR             : return "DEL_REQUEST_GRAMMAR";
+            case COMPARE_REQUEST_GRAMMAR         : return "COMPARE_REQUEST_GRAMMAR";
 
         	default                              : return "UNKNOWN";
         }
@@ -1480,6 +1542,10 @@
         {
             return "DEL_REQUEST_GRAMMAR";
         }
+        else if (grammar instanceof CompareRequestGrammar)
+        {
+            return "COMPARE_REQUEST_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -1569,6 +1635,9 @@
                                         
                 case DEL_REQUEST_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "DEL_REQUEST_END_STATE" : DelRequestString[state]
);
+                                        
+                case COMPARE_REQUEST_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "COMPARE_REQUEST_END_STATE" : CompareRequestString[state]
);
                                         
                 default :
                     return "UNKNOWN";



Mime
View raw message