directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 1412 - in incubator/directory/ldap/trunk/eve/backend/schema/api: . src src/java src/java/org src/java/org/apache src/java/org/apache/eve src/java/org/apache/eve/schema
Date Sun, 14 Dec 2003 04:27:42 GMT
Author: akarasulu
Date: Sat Dec 13 20:27:42 2003
New Revision: 1412

Added:
   incubator/directory/ldap/trunk/eve/backend/schema/api/
   incubator/directory/ldap/trunk/eve/backend/schema/api/project.xml
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/AttributeType.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ContentRule.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/MatchingRule.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/NameForms.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/Normalizer.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ObjectClass.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/StructureRule.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/Syntax.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/SyntaxChecker.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/UsageEnum.java
   incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/package.html
Log:
initial checkin - not complete yet

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/project.xml
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/project.xml	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project>
+    <extend>${basedir}/../../../project.xml</extend>
+    <groupId>directory</groupId>
+    <id>eve-backend-schema-api</id>
+  
+    <name>Eve Backend Schema API</name>
+    <package>org.apache.eve.schema</package>
+    <currentVersion>SNAPSHOT</currentVersion>
+    <inceptionYear>2002</inceptionYear>
+      
+    <shortDescription>Eve Backend Schema API</shortDescription>
+
+    <description>
+        Set of public interfaces dealing with LDAP and X.500 schema objects.
+    </description>
+      
+    <dependencies>
+        <groupId>commons-lang</groupId>
+        <artifactId>commons-lang</artifactId>
+        <version>2.0</version>
+        <url>http://jakarta.apache.org/commons/lang/api</url>
+    </dependencies>
+</project>
+

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/AttributeType.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/AttributeType.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,252 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import java.util.ArrayList ;
+import java.util.Collection ;
+import java.util.Comparator ;
+
+
+/**
+ * An LDAP and X.500 attribute type definition interface.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface AttributeType
+{
+	/**
+	 * Gets the object identifier for this AttributeType.
+	 * 
+	 * @return the object identifier for this AttributeType
+	 */
+	String getOid() ;
+    
+	/**
+	 * Gets the first name in the list of names for this AttributeTypeImpl.
+	 *
+	 * @return the first name in the list of names
+	 */
+	String getName() ;
+    
+	/**
+	 * Gets all the names for this AttributeType.
+	 *
+	 * @return a Collection of String names for this AttributeType
+	 */
+	Collection getAllNames() ;
+
+	/**
+	 * Gets a description for this AttributeType.
+	 *
+	 * @return the verbal description
+	 */
+	String getDescription() ;
+
+	/**
+	 * Gets the OID of the Syntax specified for this AttributeType.
+	 *
+	 * @return the OID of the Syntax 
+	 */
+	String getSyntaxOid() ;
+
+	/**
+	 * Gets whether or not this AttributeType is single-valued.
+	 *
+	 * @return true if only one value can exist for this AttributeType, false
+	 *      otherwise
+	 */
+	boolean isSingleValue() ;
+
+	/**
+	 * Gets whether or not this AttributeType can be modified by a user.
+	 *
+	 * @return true if users can modify it, false if only the directory can.
+	 */
+	boolean isCanUserModify() ;
+
+	/**
+	 * Determines the usage for this AttributeType.
+	 *
+	 * @return a type safe UsageEnum
+	 */
+	UsageEnum getUsage() ;
+
+	/**
+	 * Gets the name of the superior class for this AttributeType.
+	 *
+	 * @return the super class for this AttributeType 
+	 */
+	String getSuperior() ;
+
+	/**
+	 * Returns the OID of this attribute.
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	String toString() ;
+
+	/**
+	 * Gets whether or not this AttributeType is binary.
+	 * 
+	 * @return true if this AttributeType is binary.
+	 */
+	boolean isBinary() ;
+
+	/**
+	 * Gets whether or not this AttributeType is an integer type.
+	 *
+	 * @return true if this AttributeType is an integer type
+	 */
+	boolean isInteger() ;
+
+	/**
+	 * Gets whether or not this AttributeType is a String type.
+	 *
+	 * @return true if this AttributeType is a String type
+	 */
+	boolean isString() ;
+
+	/**
+	 * Gets the normalizer
+	 *
+	 * @return TODO
+	 */
+	Normalizer getNormalizer() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return the sytax checker
+	 */
+	SyntaxChecker getSyntaxChecker() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	Comparator getComparator() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	ArrayList getChildren() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	String getDesc() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	MatchingRule getEquality() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	ArrayList getNameList() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	MatchingRule getOrdering() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	MatchingRule getSubstr() ;
+
+	/**
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	Syntax getSyntax() ;
+
+	/**
+	 * TODO Document me!
+	 * 
+	 * @return the length of the attribute
+	 */
+	int getLength() ;
+
+	/**
+	 * TODO Document me!
+	 * 
+	 * @return true if the attribute is collective, false otherwise
+	 */
+	boolean isCollective() ;
+    
+    
+	/**
+	 * Generates the description using the AttributeTypeDescription syntax.
+	 * 
+	 * @return this AttributeType instances specification in the 
+	 * AttributeTypeDescription Syntax.
+	 */
+	String getAttributeTypeDescription() ;
+}
\ No newline at end of file

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ContentRule.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ContentRule.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,63 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+/**
+ * An LDAP and X.500 DIT ContentRule definition interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface ContentRule
+{
+
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/MatchingRule.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/MatchingRule.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,132 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import java.util.Comparator ;
+
+
+/**
+ * An LDAP and X.500 matching rule definition interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface MatchingRule
+{
+	/**
+	 * Gets a long description for the MatchingRule.
+	 * 
+	 * @return a long description
+	 */
+	String getDesc() ;
+
+	/**
+	 * Gets a short descriptive name for the MatchingRule. 
+	 * 
+	 * @return a short name
+	 */
+	String getName() ;
+
+	/**
+	 * Gets the oid for this MatchingRule.
+	 * 
+	 * @return the object identifier
+	 */
+	String getOid() ;
+
+	/**
+	 * Gets the SyntaxImpl used by this MatchingRule.
+	 * 
+	 * @return the SyntaxImpl of this MatchingRule
+	 */
+	Syntax getSyntax() ;
+
+	/**
+	 * Gets whether or not this MatchingRule has been obsoleted for another.
+	 * 
+	 * @return true if it is obsolete false otherwise
+	 */
+	boolean isObsolete() ;
+
+	/**
+	 * Gets the Comparator enabling the use of this MatchingRule for ORDERING
+	 * and sorted indexing. 
+	 * 
+	 * @return the ordering Comparator 
+	 */
+	Comparator getComparator() ;
+
+	/**
+	 * Gets the Normalizer enabling the use of this MatchingRule for EQUALITY
+	 * matching and indexing. 
+	 * 
+	 * @return the ordering Comparator 
+	 */
+	Normalizer getNormalizer() ;
+
+	/**
+	 * Gets or generates the MatchingRuleDescription for this MatchingRule as 
+	 * defined by the SyntaxImpl 1.3.6.1.4.1.1466.115.121.1.30.
+	 * 
+	 * <pre>
+	 * "(" whsp
+	 *    numericoid whsp
+	 *    [ "NAME" qdescrs ]
+	 *    [ "DESC" qdstring ]
+	 *    [ "OBSOLETE" whsp ]
+	 *    "SYNTAX" numericoid
+	 * whsp ")"
+	 * </pre>
+	 * @return the MatchingRuleDescription string
+	 */
+	String getMatchingRuleDescription() ;
+}
\ No newline at end of file

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/NameForms.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/NameForms.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,62 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+/**
+ * An LDAP and X.500 NameForm definition interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface NameForms
+{
+
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/Normalizer.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/Normalizer.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,81 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Normalizes attribute values according to the matching rule used to evaluate 
+ * attribute value assertions.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface Normalizer
+{
+	/**
+	 * Gets the equality match OID associated with this normalizer.
+	 *
+	 * @return the OID for the equality match used
+	 */
+	String getMatchingRule() ;
+    
+	/**
+	 * Gets the normalizer associated with the equality matching rule.
+	 *
+	 * @param a_value the value to normalize
+	 * @return the normalized form for a_value
+	 * @throws NamingException if an error results during normalization
+	 */
+	Object normalize( Object a_value ) throws NamingException ;
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ObjectClass.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ObjectClass.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,127 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import java.util.Collection ;
+
+
+/**
+ * An LDAP and X.500 ObjectClass definition interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface ObjectClass
+{
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	String getDesc() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	Collection getSuperClasses() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	ObjectClassTypeEnum getType() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	Collection getMustList() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	Collection getMayList() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	String getOid() ;
+
+	/**
+	 * 
+	 * TODO Document me!
+	 *
+	 * @return TODO
+	 */
+	String getName() ;
+
+	/**
+	 * Document me!
+	 *
+	 * @return the objectClass description syntax for this object class.
+	 */
+	String getObjectClassDescription() ;
+}
\ No newline at end of file

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/ObjectClassTypeEnum.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,158 @@
+/*
+
+ ============================================================================
+				   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+	this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+	this list of conditions and the following disclaimer in the documentation
+	and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+	include  the following  acknowledgment:  "This product includes  software
+	developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+	Alternately, this  acknowledgment may  appear in the software itself,  if
+	and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+	and "Apache Software Foundation"  must not be used to endorse or promote
+	products derived  from this  software without  prior written
+	permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+	"Apache" appear  in their name,  without prior written permission  of the
+	Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import java.util.Map ;
+import java.util.List ;
+
+import org.apache.commons.lang.enum.EnumUtils ;
+import org.apache.commons.lang.enum.ValuedEnum ;
+
+
+/**
+ * Type safe enumerations for an ObjectClasses type.  An ObjectClass type can
+ * be one of the following types:
+ * <ul>
+ * <li>ABSTRACT</li>
+ * <li>AUXILLARY</li>
+ * <li>STRUCTURAL</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public class ObjectClassTypeEnum extends ValuedEnum
+{
+    /** The enumeration constant value for the abstract objectClasses */
+    public static final int ABSTRACT_VAL = 0 ;
+    /** The enumeration constant value for the auxillary objectClasses */
+    public static final int AUXILLARY_VAL = 1 ;
+    /** The enumeration constant value for the structural objectClasses */
+    public static final int STRUCTURAL_VAL = 2 ;
+
+    /** ValuedEnum for abstract objectClasses */
+    public static final ObjectClassTypeEnum ABSTRACT = 
+        new ObjectClassTypeEnum( "ABSTRACT", ABSTRACT_VAL ) ;
+    
+    /** ValuedEnum for auxillary objectClasses */
+    public static final ObjectClassTypeEnum AUXILLARY =
+        new ObjectClassTypeEnum( "AUXILLARY", AUXILLARY_VAL ) ;
+
+    /** ValuedEnum for structural objectClasses */
+    public static final ObjectClassTypeEnum STRUCTURAL =
+        new ObjectClassTypeEnum( "STRUCTURAL", STRUCTURAL_VAL ) ;
+
+
+    /**
+     * Private constructor so no other instances can be created other than the
+     * public static constants in this class.
+     *
+     * @param a_name a string name for the enumeration value.
+     * @param a_value the integer value of the enumeration.
+     */
+    private ObjectClassTypeEnum( final String a_name, final int a_value )
+    {
+        super( a_name, a_value ) ;
+    }
+
+
+    /**
+     * Gets the objectClass type enumeration of AUXILLARY, STRUCTURAL, or,
+     * ABSTRACT.
+     * 
+     * @param a_name options are AUXILLARY, STRUCTURAL, or, ABSTRACT
+     * @return the type safe enumeration for the objectClass type
+     */
+    public static ObjectClassTypeEnum getClassType( String a_name )
+    {
+        String l_upperCase = a_name.trim().toUpperCase() ;
+        
+        if ( l_upperCase.equals( "STRUCTURAL" ) )
+        {
+            return ABSTRACT ;
+        }
+        else if ( l_upperCase.equals( "AUXILLARY" ) )
+        {
+            return AUXILLARY ;
+        }
+        else if ( l_upperCase.equals( "ABSTRACT" ) )
+        {
+            return ABSTRACT ;
+        }
+        
+        throw new IllegalArgumentException( "Unknown objectClass type name '" 
+            + a_name + "': options are AUXILLARY, STRUCTURAL, ABSTRACT." ) ;
+    }
+
+
+	/**
+	 * Gets a List of the enumerations for the ObjectClass type.
+	 * 
+	 * @return the List of enumerations possible for ObjectClass types
+	 */
+	public static List list()
+	{
+		return EnumUtils.getEnumList( ObjectClassTypeEnum.class ) ;
+	}
+	
+	
+	/**
+	 * Gets the Map of ClassTypeEnum objects by name using the ClassTypeEnum 
+	 * class.
+	 * 
+	 * @return the Map by name of ClassTypeEnums
+	 */
+	public static Map map()
+	{
+		return EnumUtils.getEnumMap( ObjectClassTypeEnum.class ) ;
+	}
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/StructureRule.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/StructureRule.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,62 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+/**
+ * An LDAP and X.500 DIT StructureRule definition interface.
+ *
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface StructureRule
+{
+
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/Syntax.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/Syntax.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,117 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+/**
+ * An LDAP and X.500 syntax definition interface.
+ * 
+ * Each attribute stored in a directory has a defined syntax (i.e. data type) 
+ * which constrains the structure and format of its values.  The description 
+ * of each syntax specifies how attribute or assertion values conforming to 
+ * the syntax are normally represented when transferred in LDAP operations.  
+ * This representation is referred to as the LDAP-specific encoding to 
+ * distinguish it from other methods of encoding attribute values.
+ * 
+ * @see <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC 2252</a>
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface Syntax
+{
+	/**
+	 * Gets whether or not the Syntax is human readable.
+	 * 
+	 * @return true if the syntax can be interpretted by humans, false otherwise
+	 */
+	boolean isHumanReadable() ;
+    
+	/**
+	 * Gets a description of this Syntax.
+	 * 
+	 * @return a description
+	 */
+	String getDesc() ;
+    
+	/**
+	 * Gets a short descriptive name for the Syntax. 
+	 * 
+	 * @return a short name
+	 */
+	String getName() ;
+    
+	/**
+	 * Gets the oid for this Syntax.
+	 * 
+	 * @return the object identifier
+	 */
+	String getOid() ;
+    
+	/**
+	 * Gets the SyntaxChecker used to validate values in accordance with this
+	 * Syntax.
+	 * 
+	 * @return the SyntaxChecker
+	 */
+	SyntaxChecker getSyntaxChecker() ;
+
+	/**
+	 * Gets or generates the Syntax Description for this Syntax as defined by 
+	 * the Syntax 1.3.6.1.4.1.1466.115.121.1.54.
+	 * 
+	 * <code>
+	 * "(" whsp numericoid whsp [ "DESC" qdstring ] whsp ")"
+	 * </code>
+	 * @return the Syntax Description
+	 */
+	String getSyntaxDescription() ;
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/SyntaxChecker.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/SyntaxChecker.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,91 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import javax.naming.NamingException ;
+
+
+/**
+ * Used to validate values of a particular syntax.  This interface does not
+ * correlate to any LDAP or X.500 construct.  It has been created as a means
+ * to enforce a syntax within the Eve server.
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author$
+ * @version $Revision$
+ */
+public interface SyntaxChecker
+{
+	/**
+	 * Gets the OID of the attribute syntax.
+	 *
+	 * @return the object identifier of the Syntax this SyntaxChecker validates
+	 */
+	String getSyntaxOid() ;
+
+	/**
+	 * Determines if the attribute's value conforms to the attribute syntax.
+	 *
+	 * @param a_value the value of some attribute with the syntax
+	 * @return true if the value is in the valid syntax, false otherwise
+	 */
+	boolean isValidSyntax( Object a_value ) ;
+    
+	/**
+	 * Asserts whether or not the attribute's value conforms to the attribute 
+	 * syntax.
+	 *
+	 * @param a_value the value of some attribute with the syntax
+	 * @throws NamingException if the value does not conform to the attribute
+	 * syntax.
+	 */    
+	void assertSyntax( Object a_value ) throws NamingException ;
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/UsageEnum.java
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/UsageEnum.java	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,169 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of  source code must  retain the above copyright  notice,
+    this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" 
+    and "Apache Software Foundation"  must not be used to endorse or promote
+    products derived  from this  software without  prior written
+    permission. For written permission, please contact apache@apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
+ ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
+ (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+package org.apache.eve.schema ;
+
+
+import java.util.Map ;
+import java.util.List ;
+
+import org.apache.commons.lang.enum.EnumUtils ;
+import org.apache.commons.lang.enum.ValuedEnum ;
+
+
+/**
+ * Type safe enum for an AttributeType definition's usage string.  This can be
+ * take one of the following four values: 
+ * <ul>
+ * <li>userApplications</li>
+ * <li>directoryOperation</li>
+ * <li>distributedOperation</li>
+ * <li>dSAOperation</li>
+ * </ul>
+ * 
+ * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
+ * @author $Author: akarasulu $
+ * @version $Revision: 1.2 $
+ */
+public class UsageEnum extends ValuedEnum
+{
+	/** value for attributes with userApplications usage */
+	public static final int USERAPPLICATIONS_VAL = 0 ;
+	/** value for attributes with directoryOperation usage */
+	public static final int DIRECTORYOPERATION_VAL = 1 ;
+	/** value for attributes with distributedOperation usage */
+	public static final int DISTRIBUTEDOPERATION_VAL = 2 ;
+	/** value for attributes with dSAOperation usage */
+	public static final int DSAOPERATION_VAL = 3 ;
+
+
+	/** enum for attributes with userApplications usage */
+	public static final UsageEnum USERAPPLICATIONS = 
+		new UsageEnum( "userApplications", USERAPPLICATIONS_VAL ) ;
+	/** enum for attributes with directoryOperation usage */
+	public static final UsageEnum DIRECTORYOPERATION = 
+		new UsageEnum( "directoryOperation", DIRECTORYOPERATION_VAL ) ;
+	/** enum for attributes with distributedOperation usage */
+	public static final UsageEnum DISTRIBUTEDOPERATION = 
+		new UsageEnum( "distributedOperation", DISTRIBUTEDOPERATION_VAL ) ;
+	/** enum for attributes with dSAOperation usage */
+	public static final UsageEnum DSAOPERATION = 
+		new UsageEnum( "dSAOperation", DSAOPERATION_VAL ) ;
+
+
+	/**
+	 * Private construct so no other instances can be created other than the
+	 * public static constants in this class.
+	 *
+	 * @param a_name a string name for the enumeration value.
+	 * @param a_value the integer value of the enumeration.
+	 */
+	private UsageEnum( final String a_name, final int a_value )
+	{
+		super( a_name, a_value ) ;
+	}
+    
+    
+	/**
+	 * Gets the enumeration type for the attributeType usage string regardless 
+	 * of case.
+	 * 
+	 * @param a_usage the usage string
+	 * @return the usage enumeration type
+	 */
+	public static UsageEnum getUsage( String a_usage )
+	{
+		if ( a_usage.equalsIgnoreCase( UsageEnum.USERAPPLICATIONS.getName() ) )
+		{
+			return UsageEnum.USERAPPLICATIONS ;
+		}
+        
+		if ( a_usage.equalsIgnoreCase( 
+			UsageEnum.DIRECTORYOPERATION.getName() ) )
+		{
+			return UsageEnum.DIRECTORYOPERATION ;
+		}
+        
+		if ( a_usage.equalsIgnoreCase( 
+			UsageEnum.DISTRIBUTEDOPERATION.getName() ) )
+		{
+			return UsageEnum.DISTRIBUTEDOPERATION ;
+		}
+        
+		if ( a_usage.equalsIgnoreCase( UsageEnum.DSAOPERATION.getName() ) )
+		{
+			return UsageEnum.DSAOPERATION ;
+		}
+        
+		throw new IllegalArgumentException( "Unknown attributeType usage string"
+			+ a_usage ) ;
+	}
+	
+	
+	/**
+	 * Gets a List of the enumerations for attributeType usage.
+	 * 
+	 * @return the List of enumerations possible for usage
+	 */
+	public static List list()
+	{
+	    return EnumUtils.getEnumList( UsageEnum.class ) ;
+	}
+	
+	
+	/**
+	 * Gets the Map of UsageEnum objects by name using the UsageEnum class.
+	 * 
+	 * @return the Map by name of UsageEnums
+	 */
+	public static Map map()
+	{
+	    return EnumUtils.getEnumMap( UsageEnum.class ) ;
+	}
+}

Added: incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/package.html
==============================================================================
--- (empty file)
+++ incubator/directory/ldap/trunk/eve/backend/schema/api/src/java/org/apache/eve/schema/package.html	Sat Dec 13 20:27:42 2003
@@ -0,0 +1,3 @@
+<p>
+Schema objects used by the Eve directory server.
+</p>
\ No newline at end of file

Mime
View raw message