directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r431243 - in /directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions: MatchingRule.java Normalizer.java
Date Sun, 13 Aug 2006 21:18:55 GMT
Author: akarasulu
Date: Sun Aug 13 14:18:55 2006
New Revision: 431243

URL: http://svn.apache.org/viewvc?rev=431243&view=rev
Log:
adding upgraded MatchingRule and Normalizer interfaces

Added:
    directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/MatchingRule.java
    directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/Normalizer.java

Added: directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/MatchingRule.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/MatchingRule.java?rev=431243&view=auto
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/MatchingRule.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/MatchingRule.java
Sun Aug 13 14:18:55 2006
@@ -0,0 +1,99 @@
+/*
+ *   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.directory.server2.schema.descriptions;
+
+
+import javax.naming.NamingException;
+import java.util.Comparator;
+
+
+/**
+ * A matchingRule definition. MatchingRules associate a comparator and a
+ * normalizer, forming the basic tools necessary to assert actions against
+ * attribute values. MatchingRules are associated with a specific Syntax for the
+ * purpose of resolving a normalized form and for comparisons.
+ * <p>
+ * According to rfc 4512:
+ * </p>
+ * 
+ * <pre>
+ *  4.1.3.  Matching Rules
+ *
+ *     Matching rules are used in performance of attribute value assertions,
+ *     such as in performance of a Compare operation.  They are also used in
+ *     evaluating search filters, determining which individual values are to
+ *     be added or deleted during performance of a Modify operation, and in
+ *     comparing distinguished names.
+ *
+ *     Each matching rule is identified by an object identifier (OID) and,
+ *     optionally, one or more short names (descriptors).
+ * 
+ *     Matching rule definitions are written according to the ABNF:
+ * 
+ *       MatchingRuleDescription = LPAREN WSP
+ *           numericoid                 ; object identifier
+ *           [ SP "NAME" SP qdescrs ]   ; short names (descriptors)
+ *           [ SP "DESC" SP qdstring ]  ; description
+ *           [ SP "OBSOLETE" ]          ; not active
+ *             SP "SYNTAX" SP numericoid  ; assertion syntax
+ *             extensions WSP RPAREN      ; extensions
+ *
+ *     where:
+ *       <numericoid> is object identifier assigned to this matching rule;
+ *       NAME <qdescrs> are short names (descriptors) identifying this
+ *          matching rule;
+ *       DESC <qdstring> is a short descriptive string;
+ *       OBSOLETE indicates this matching rule is not active;
+ *       SYNTAX identifies the assertion syntax (the syntax of the assertion
+ *          value) by object identifier; and
+ *       <extensions> describe extensions. * </pre>
+ * 
+ * @see <a href="http://www.faqs.org/rfcs/rfc4512.html">RFC 4512 Section 4.1.3</a>
+ * @see DescriptionUtils#getDescription(MatchingRule)
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface MatchingRule extends OidObject
+{
+    /**
+     * Gets the SyntaxImpl used by this MatchingRule.
+     * 
+     * @return the SyntaxImpl of this MatchingRule
+     * @throws NamingException if there is a failure resolving the object
+     */
+    Syntax getSyntax() throws NamingException;
+
+
+    /**
+     * Gets the Comparator enabling the use of this MatchingRule for ORDERING
+     * and sorted indexing.
+     * 
+     * @return the ordering Comparator
+     * @throws NamingException if there is a failure resolving the object
+     */
+    Comparator getComparator() throws NamingException;
+
+
+    /**
+     * Gets the Normalizer enabling the use of this MatchingRule for EQUALITY
+     * matching and indexing.
+     * 
+     * @return the ordering Comparator
+     * @throws NamingException if there is a failure resolving the object
+     */
+    Normalizer getNormalizer() throws NamingException;
+}

Added: directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/Normalizer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/Normalizer.java?rev=431243&view=auto
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/Normalizer.java
(added)
+++ directory/sandbox/akarasulu/apacheds-2.0/schema/descriptions/src/main/java/org/apache/directory/server2/schema/descriptions/Normalizer.java
Sun Aug 13 14:18:55 2006
@@ -0,0 +1,39 @@
+/*
+ *   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.directory.server2.schema.descriptions;
+
+
+import javax.naming.NamingException;
+
+
+/**
+ * Converts attribute values to a canonical form.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$
+ */
+public interface Normalizer
+{
+    /**
+     * Gets the normalized value.
+     * 
+     * @param value the value to normalize. It must *not* be null !
+     * @return the normalized form for a value
+     * @throws NamingException if an error results during normalization
+     */
+    Object normalize( Object value ) throws NamingException;
+}



Mime
View raw message