directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 53892 - incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema
Date Wed, 06 Oct 2004 18:37:53 GMT
Author: akarasulu
Date: Wed Oct  6 11:37:52 2004
New Revision: 53892

Modified:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AttributeType.java
   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/DITContentRule.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITStructureRule.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleUse.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NameForm.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClass.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/package.html
Log:
making interfaces derive from SchemaObject and more docos about this pkg

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AttributeType.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AttributeType.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/AttributeType.java
Wed Oct  6 11:37:52 2004
@@ -123,7 +123,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface AttributeType
+public interface AttributeType extends SchemaObject
 {
     /**
      * Gets the object identifier for this AttributeType.
@@ -145,13 +145,6 @@
      * @return String names for this AttributeType
      */
     String[] getAllNames();
-
-    /**
-     * Gets a description for this AttributeType.
-     *
-     * @return the verbal description
-     */
-    String getDescription();
 
     /**
      * Gets whether or not this AttributeType is single-valued.

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 11:37:52 2004
@@ -46,11 +46,11 @@
 
     
     /**
-     * Creates a Syntax object.
+     * Creates a Syntax object using a unique OID.
      * 
      * @param oid the OID for this Syntax
      */
-    public BaseSyntax( String oid )
+    protected BaseSyntax( String oid )
     {
         this.oid = oid;
         this.isHumanReadible = false;
@@ -58,6 +58,20 @@
     }
     
     
+    /**
+     * Creates a Syntax object using a unique OID.
+     *
+     * @param oid the OID for this Syntax
+     * @param syntaxChecker the syntax checker for this Syntax
+     */
+    protected BaseSyntax( String oid, SyntaxChecker syntaxChecker )
+    {
+        this.oid = oid;
+        this.isHumanReadible = false;
+        this.checker = syntaxChecker;
+    }
+
+
     // ------------------------------------------------------------------------
     // Syntax interface methods
     // ------------------------------------------------------------------------

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITContentRule.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITContentRule.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITContentRule.java
Wed Oct  6 11:37:52 2004
@@ -104,15 +104,8 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface DITContentRule
+public interface DITContentRule extends SchemaObject
 {
-    /**
-     * Gets a description of this DITContentRule.
-     *
-     * @return a description
-     */
-    String getDescription();
-
     /**
      * Gets a short descriptive name for the DITContentRule.
      *

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITStructureRule.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITStructureRule.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/DITStructureRule.java
Wed Oct  6 11:37:52 2004
@@ -72,15 +72,8 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface DITStructureRule
+public interface DITStructureRule extends SchemaObject
 {
-    /**
-     * Gets a description of this DITStructureRule.
-     *
-     * @return a description
-     */
-    String getDescription();
-
     /**
      * Gets a short descriptive name for the DITStructureRule.
      *

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleUse.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleUse.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/MatchingRuleUse.java
Wed Oct  6 11:37:52 2004
@@ -73,15 +73,8 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface MatchingRuleUse
+public interface MatchingRuleUse extends SchemaObject
 {
-    /**
-     * Gets a long description for the MatchingRuleUse.
-     * 
-     * @return a long description
-     */
-    String getDescription();
-
     /**
      * Gets a short descriptive name for the MatchingRuleUse. 
      * 

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NameForm.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NameForm.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NameForm.java
Wed Oct  6 11:37:52 2004
@@ -82,15 +82,8 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface NameForm
+public interface NameForm extends SchemaObject
 {
-    /**
-     * Gets a description of this NameForm.
-     *
-     * @return a description
-     */
-    String getDescription();
-
     /**
      * Gets a short descriptive name for the NameForm.
      *

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClass.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClass.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/ObjectClass.java
Wed Oct  6 11:37:52 2004
@@ -61,15 +61,8 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface ObjectClass
+public interface ObjectClass extends SchemaObject
 {
-    /**
-     * Gets a verbal description of this ObjectClass.
-     *
-     * @return a verbal description
-     */
-    String getDescription();
-
     /**
      * Gets the object identifier for this ObjectClass definition.
      *

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema/Syntax.java
Wed Oct  6 11:37:52 2004
@@ -61,7 +61,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface Syntax
+public interface Syntax extends SchemaObject
 {
     /**
      * Gets whether or not the Syntax is human readable.
@@ -69,13 +69,6 @@
      * @return true if the syntax can be interpretted by humans, false otherwise
      */
     boolean isHumanReadable();
-    
-    /**
-     * Gets a description of this Syntax.
-     * 
-     * @return a description
-     */
-    String getDescription();
     
     /**
      * Gets a short descriptive name for the Syntax. 

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 11:37:52 2004
@@ -1,21 +1,64 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML>
-<HEAD>
-	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
-	<TITLE></TITLE>
-	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Win32)">
-	<META NAME="AUTHOR" CONTENT="Alex Karasulu">
-	<META NAME="CREATED" CONTENT="20031214;9322755">
-	<META NAME="CHANGEDBY" CONTENT="Alex Karasulu">
-	<META NAME="CHANGED" CONTENT="20031214;9325833">
-</HEAD>
 <BODY LANG="en-US" DIR="LTR">
 <P>
-Contains schema class definitions used by the Eve Directory Server.  LDAP and 
-X.500 directories contain schema information.  The classes and interfaces 
-defined within this package represent the schema information used to constrain 
-the values of attributes, the attributes of entries and the structure of the 
-directory information tree.
+Contains interfaces and base classes for representing the LDAP schema domain
+model.  We model the following LDAP schema objects:
 </P>
+
+<ul>
+  <li>attributeTypes</li>
+  <li>dITContentRules</li>
+  <li>dItStructureRules</li>
+  <li>matchingRules</li>
+  <li>matchingRuleUses</li>
+  <li>nameForms</li>
+  <li>objectClasses</li>
+  <li>syntaxes</li>
+</ul>
+
+<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:
+</p>
+
+<ul>
+  <li>Normalizer</li>
+  <li>Comparator [from SDK]</li>
+  <li>SyntaxChecker</li>
+</ul>
+
+<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.
+</p>
+
+<p>
+Normalizers and Comparators play an important role in controlling matching and
+hence giving meaning to matchingRules.  The 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
+two interfaces give tangible meaning to what a matchingRule is about making a
+matchingRule definition more than just an OID tag or place holder but something
+that can be used.
+</p>
+
+<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.   
+</p>
+
 </BODY>
 </HTML>

Mime
View raw message