From directory-cvs-return-1679-apmail-incubator-directory-cvs-archive=incubator.apache.org@incubator.apache.org Wed Oct 06 18:38:09 2004 Return-Path: Delivered-To: apmail-incubator-directory-cvs-archive@www.apache.org Received: (qmail 30734 invoked from network); 6 Oct 2004 18:38:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Oct 2004 18:38:08 -0000 Received: (qmail 99719 invoked by uid 500); 6 Oct 2004 18:37:57 -0000 Delivered-To: apmail-incubator-directory-cvs-archive@incubator.apache.org Received: (qmail 99646 invoked by uid 500); 6 Oct 2004 18:37:56 -0000 Mailing-List: contact directory-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: directory-dev@incubator.apache.org Delivered-To: mailing list directory-cvs@incubator.apache.org Received: (qmail 99598 invoked by uid 99); 6 Oct 2004 18:37:56 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 06 Oct 2004 11:37:55 -0700 Received: (qmail 30524 invoked by uid 65534); 6 Oct 2004 18:37:53 -0000 Date: 6 Oct 2004 18:37:53 -0000 Message-ID: <20041006183753.30518.qmail@minotaur.apache.org> From: akarasulu@apache.org To: directory-cvs@incubator.apache.org Subject: svn commit: rev 53892 - incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/schema X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 Apache Directory Project * @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 Apache Directory Project * @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 Apache Directory Project * @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 Apache Directory Project * @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 Apache Directory Project * @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 Apache Directory Project * @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 Apache Directory Project * @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 @@ - - - - - - - - -

-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:

+ +
    +
  • attributeTypes
  • +
  • dITContentRules
  • +
  • dItStructureRules
  • +
  • matchingRules
  • +
  • matchingRuleUses
  • +
  • nameForms
  • +
  • objectClasses
  • +
  • syntaxes
  • +
+ +

+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: +

+ +
    +
  • Normalizer
  • +
  • Comparator [from SDK]
  • +
  • SyntaxChecker
  • +
+ +

+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. +

+ +

+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. +

+ +

+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. +

+