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/10/07 01:40:37 UTC

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

Author: akarasulu
Date: Wed Oct  6 16:40:37 2004
New Revision: 53921

Added:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseMatchingRule.java
      - copied unchanged from rev 53886, incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DefaultMatchingRule.java
Removed:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DefaultMatchingRule.java
Modified:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BinarySyntaxChecker.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/package.html
Log:
renaming DefaultMatchingRule to BaseMatchingRule

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BaseSyntax.java	Wed Oct  6 16:40:37 2004
@@ -72,6 +72,60 @@
     }
 
 
+    /**
+     * Creates a Syntax object using a unique OID.
+     *
+     * @param oid the OID for this Syntax
+     * @param name the name for this Syntax
+     * @param syntaxChecker the syntax checker for this Syntax
+     */
+    protected BaseSyntax( String oid, String name, SyntaxChecker syntaxChecker )
+    {
+        this.oid = oid;
+        this.name = name;
+        this.isHumanReadible = false;
+        this.checker = syntaxChecker;
+    }
+
+
+    /**
+     * Creates a Syntax object using a unique OID.
+     *
+     * @param oid the OID for this Syntax
+     * @param name the name for this Syntax
+     * @param isHumanReadible whether or not Syntax is human readible
+     * @param syntaxChecker the syntax checker for this Syntax
+     */
+    protected BaseSyntax( String oid, String name, boolean isHumanReadible,
+                          SyntaxChecker syntaxChecker )
+    {
+        this.oid = oid;
+        this.name = name;
+        this.isHumanReadible = isHumanReadible;
+        this.checker = syntaxChecker;
+    }
+
+
+    /**
+     * Creates a Syntax object using a unique OID.
+     *
+     * @param oid the OID for this Syntax
+     * @param name the name for this Syntax
+     * @param isHumanReadible whether or not Syntax is human readible
+     * @param description the description for this Syntax
+     * @param syntaxChecker the syntax checker for this Syntax
+     */
+    protected BaseSyntax( String oid, String name, String description,
+                          boolean isHumanReadible, SyntaxChecker syntaxChecker )
+    {
+        this.oid = oid;
+        this.name = name;
+        this.description = description;
+        this.isHumanReadible = isHumanReadible;
+        this.checker = syntaxChecker;
+    }
+
+
     // ------------------------------------------------------------------------
     // Syntax interface methods
     // ------------------------------------------------------------------------

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BinarySyntaxChecker.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BinarySyntaxChecker.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/BinarySyntaxChecker.java	Wed Oct  6 16:40:37 2004
@@ -30,6 +30,8 @@
 {
     /** an instance so we don't have to create one every time */
     public static final SyntaxChecker INSTANCE = new BinarySyntaxChecker();
+    /** the Apache assigned internal OID for this syntax checker */
+    public static final String OID = "1.3.6.1.4.1.1466.115.121.1.5";
 
 
     /**
@@ -66,7 +68,7 @@
      */
     public String getSyntaxOid()
     {
-        return "1.3.6.1.4.1.1466.115.121.1.5";
+        return OID;
     }
 
     

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/package.html
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/package.html	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/package.html	Wed Oct  6 16:40:37 2004
@@ -20,8 +20,8 @@
 <p>
 An interface is defined for each type of schema object.  All these interfaces
 extend from a common root interface: SchemaObject.  Other interfaces have been
-added to associate some useful behavoir with some of these mysterious
-constructs.  These interfaces are listed below:
+added to associate some useful behavoir with these objects.  These interfaces
+are listed below:
 </p>
 
 <ul>
@@ -33,19 +33,18 @@
 <p>
 These interfaces are primitive constructs that help define what some schema
 objects like a syntax or a matchingRule is in terms of use.  Namely these
-constructs determine what instances of these schema objects are and how they
-are applied.  For example a syntax exists not only as an OID to be implemented
-internally by some directory server.  It exists to constrain the values of
-attributes which are associated with the syntax.  This function is defined
-by the SyntaxChecker interface.  All syntaxes have a value checker that can
-apply the syntax to the value to determine if the value is accepted by the
-syntax.  A SyntaxChecker is nothing but a lexical constraint like a regular
-expression for the datatype.
+constructs determine how schema objects applied.  For example a syntax exists
+not only as an OID to be implemented internally by some directory server.  It
+exists to constrain the values of attributes which are associated with the
+syntax.  This function is defined by the SyntaxChecker interface.  All syntaxes
+have a value checker that can apply the syntax to the value to determine if the
+value is accepted by the syntax.  A SyntaxChecker is nothing but a lexical
+pattern matcher like a regular expression.
 </p>
 
 <p>
 Normalizers and Comparators play an important role in controlling matching and
-hence giving meaning to matchingRules.  The respectively define how values are
+hence giving meaning to matchingRules.  They respectively define how values are
 to be reduced to a canonical form and how they are to be compared to match
 filter assertions to values while conducting a search.  This is a very important
 aspect of the directory and unfortunately it is the least understood.  These
@@ -57,7 +56,11 @@
 <p>
 The extra interfaces above are not SchemaObjects although they play a critical
 role in defining how schema objects are applied.  SchemaObjects are those that
-you actually get back from a directory server and are part of the protocol.   
+you actually get back from a directory server and are part of the protocol.
+Within a server environment the relevant schema objects will have valid
+SyntaxCheckers, Normalizers and Comparators.  However outside of the this
+environment these properties MAY be undefined.   We hope to make it defined
+on the client side as well if desired.
 </p>
 
 </BODY>